From patchwork Thu Nov 1 17:46:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Tucker X-Patchwork-Id: 149981 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1080817ljp; Thu, 1 Nov 2018 10:48:20 -0700 (PDT) X-Google-Smtp-Source: AJdET5cSc0rNE0wX4jp0ltM0AcCCnEXKu+8jb0pMiLR6hrNotnaN8K9P+WjkgIoRHqMzlPuv/5tM X-Received: by 2002:a17:902:6b82:: with SMTP id p2-v6mr8643571plk.50.1541094500141; Thu, 01 Nov 2018 10:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541094500; cv=none; d=google.com; s=arc-20160816; b=Yl00uJFBcDH4K5XJ0XWpkM9xWQ7JGFeJ1jjkcQK6aQb4mkmRw6Zljdwc8APHkiy+57 uHYcCGYqV98s2qPugp4KKKqai4tz62bPnbh4r/0C/9eSFIJyUl/Iz5+gjl3HaFaH1JeG XhQirOg8lD73b1AeKWjfZeP8GsGxaoMwDmah4UoSOflX0NasRKV0evxldqmDWISpsLfJ XUAKTuIsnmHAFmEabQM3sQyQIPB4+Rz7yeziczD55O1COY2WWU0O8qJ4gL7JJe2VKIwh xKRsLfWuZHlH4CxPlAoi2Fo0y+sOkreuvB1/pvMCGH0mAw5xo90CFsXiP7CUmTV2pJas 2pHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=cV+p3awN/ftQ5LaewPak7oyPXx/UGhjHE6acKMt4tlI=; b=TfKI1QbOfbt2UGpFKl3umNL5B9n/n+s1c5FdqaePaVhdTav+za7PXKR9lUVSfqKhy6 GrEhmrZ4/HnZ/9btzQd14DGLUKTpJHprSSPUNJxfLShc6H1kcnMyRuwYD4qFZR9yfrTN ETkMqdaxaRtm/EjrAIpjCb/UDJwNgsulqj6taJI0RZd2fy6g0GGgV3dE1HBgR7kPvAxl 1GfNWQkO++2K5rE3PKfxQunJe6WKeEra3cdVcO/jA2HTZCKh1gEtLYhyyY+/jpBk7BKS 3bUtRnJhxxlLJ0WZdeUl56IGTOZTBz8qo4JrgjnBP7LFtIWglX01lixvqwuN0yKatywt 5XYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si31388873plg.241.2018.11.01.10.48.19; Thu, 01 Nov 2018 10:48:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727836AbeKBCwQ (ORCPT + 4 others); Thu, 1 Nov 2018 22:52:16 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57954 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727417AbeKBCwQ (ORCPT ); Thu, 1 Nov 2018 22:52:16 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gtucker) with ESMTPSA id E4EF9260C9D From: Guillaume Tucker To: Hans Verkuil Cc: linux-media@vger.kernel.org, kernel@collabora.com, Ezequiel Garcia , Guillaume Tucker Subject: [PATCH v4l-utils] v4l2-compliance: flush stdout before calling fork() Date: Thu, 1 Nov 2018 17:46:35 +0000 Message-Id: X-Mailer: git-send-email 2.11.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org In order to avoid corrupt log output, flush stdout before calling fork() when running streaming tests. This is to prevent any remaining characters in the stdout buffer from being output both in the parent and child process. Signed-off-by: Guillaume Tucker --- utils/v4l2-compliance/v4l2-test-buffers.cpp | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0 diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index 6864f924daec..ee05739a2f73 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -1204,6 +1204,7 @@ static int testBlockingDQBuf(struct node *node, cv4l_queue &q) * This test checks if a blocking wait in VIDIOC_DQBUF doesn't block * other ioctls. */ + fflush(stdout); pid_dqbuf = fork(); fail_on_test(pid_dqbuf == -1); @@ -1224,6 +1225,7 @@ static int testBlockingDQBuf(struct node *node, cv4l_queue &q) /* Check that it is really blocking */ fail_on_test(pid); + fflush(stdout); pid_streamoff = fork(); fail_on_test(pid_streamoff == -1);