From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58048 invoked by alias); 27 Feb 2015 12:08:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 58028 invoked by uid 89); 27 Feb 2015 12:08:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f174.google.com Received: from mail-pd0-f174.google.com (HELO mail-pd0-f174.google.com) (209.85.192.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 27 Feb 2015 12:08:27 +0000 Received: by pdev10 with SMTP id v10so20662174pde.10 for ; Fri, 27 Feb 2015 04:08:25 -0800 (PST) X-Received: by 10.68.115.196 with SMTP id jq4mr23640578pbb.150.1425038905396; Fri, 27 Feb 2015 04:08:25 -0800 (PST) Received: from [127.0.0.1] (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id gt10sm3867716pac.32.2015.02.27.04.08.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 04:08:24 -0800 (PST) Message-ID: <54F05E34.7070401@gmail.com> Date: Fri, 27 Feb 2015 12:08:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pedro Alves CC: gdb-patches@sourceware.org Subject: Re: [PATCH 5/6] testsuite: Introduce $inferior_spawn_id References: <1424699660-11727-1-git-send-email-palves@redhat.com> <1424699660-11727-6-git-send-email-palves@redhat.com> <867fv7xodw.fsf@gmail.com> <54F04A2B.5@redhat.com> In-Reply-To: <54F04A2B.5@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00812.txt.bz2 On 27/02/15 10:42, Pedro Alves wrote: > I tried it now, and the problem is that when the gdbserver/inferior is > started without a tty, then stdout is put in unbuffered mode, so the I think you meant "fully buffered mode", don't you? > printf calls don't flush... > > Adding: > setvbuf (stdout, NULL, _IONBF, BUFSIZ); > > to interrupt.c fixes it. > > > Or we could fix the tests themselves to explicitly call setvbuf > if needed and not bother boards at all. I count only around 20 > tests that check gdb,noinferiorio, or use gdb_skip_stdio_test, and > we could fix them incrementally, as they're converted to > use $inferior_spawn_id. Maybe that's the cleanest. We can > e.g., add: > > #include "lib/set_unbuffered_mode.c" I prefer this one. -- Yao (齐尧)