From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZOtD-0000Ud-FB for qemu-devel@nongnu.org; Fri, 26 Feb 2016 15:21:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZOtC-0003fo-H0 for qemu-devel@nongnu.org; Fri, 26 Feb 2016 15:21:27 -0500 Received: from mail-qg0-x242.google.com ([2607:f8b0:400d:c04::242]:36429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZOtC-0003f0-C9 for qemu-devel@nongnu.org; Fri, 26 Feb 2016 15:21:26 -0500 Received: by mail-qg0-x242.google.com with SMTP id 14so6321758qgg.3 for ; Fri, 26 Feb 2016 12:21:26 -0800 (PST) Sender: Richard Henderson References: <1456156787-17509-1-git-send-email-alex.bennee@linaro.org> <1456156787-17509-9-git-send-email-alex.bennee@linaro.org> From: Richard Henderson Message-ID: <56D0B3C3.3000904@twiddle.net> Date: Fri, 26 Feb 2016 12:21:23 -0800 MIME-Version: 1.0 In-Reply-To: <1456156787-17509-9-git-send-email-alex.bennee@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v7 8/9] qemu-log: support simple pid substitution for logs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, crosthwaitepeter@gmail.com, dgilbert@redhat.com, aurelien@aurel32.net On 02/22/2016 07:59 AM, Alex Bennée wrote: > When debugging stuff that occurs over several forks it would be useful > not to keep overwriting the one logfile you've set-up. This allows a > simple %d to be included once in the logfile parameter which is > substituted with getpid(). > > As the test cases involve checking user output they need > g_test_trap_subprocess() support. As a result they are currently skipped > on Travis builds due to the older glib involved. > > Signed-off-by: Alex Bennée > Reviewed-by: Leandro Dorileo > Reviewed-by: Aurelien Jarno > > --- > v5 > - add another r-b > v7 > - simpler error check as suggested by Eric Blake > - don't g_error, just error_report (so we don't crash from monitor) > - add some unit tests > --- > tests/test-logging.c | 39 +++++++++++++++++++++++++++++++++++++++ > util/log.c | 22 ++++++++++++++++++++-- > 2 files changed, 59 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~