From patchwork Mon Feb 16 13:46:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Jakobi X-Patchwork-Id: 5835411 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E1B49F380 for ; Tue, 17 Feb 2015 00:29:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4EC1F201FE for ; Tue, 17 Feb 2015 00:29:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6E5BC201E4 for ; Tue, 17 Feb 2015 00:29:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C18F6E203; Mon, 16 Feb 2015 16:29:31 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.math.uni-bielefeld.de (smtp.math.uni-bielefeld.de [129.70.45.10]) by gabe.freedesktop.org (Postfix) with ESMTP id D46106E27C for ; Mon, 16 Feb 2015 05:47:00 -0800 (PST) Received: from chidori.math.uni-bielefeld.de (dhcp24-141.math.uni-bielefeld.de [129.70.24.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by smtp.math.uni-bielefeld.de (Postfix) with ESMTPSA id D3C1F60F17; Mon, 16 Feb 2015 14:46:59 +0100 (CET) From: Tobias Jakobi To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 06/15] tests/exynos: introduce wait_for_user_input Date: Mon, 16 Feb 2015 14:46:36 +0100 Message-Id: <1424094405-6314-7-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailer: git-send-email 2.0.5 In-Reply-To: <1424094405-6314-1-git-send-email-tjakobi@math.uni-bielefeld.de> References: <1424094405-6314-1-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailman-Approved-At: Mon, 16 Feb 2015 16:29:29 -0800 Cc: dri-devel@lists.freedesktop.org, Tobias Jakobi , robclark@freedesktop.org, m.szyprowski@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently getchar() is used to pause execution after each test. The user isn't informed if one is supposed to do anything for the tests to continue, so print a simple message to make this more clear. Signed-off-by: Tobias Jakobi --- tests/exynos/exynos_fimg2d_test.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c index 55d2970..446a6c6 100644 --- a/tests/exynos/exynos_fimg2d_test.c +++ b/tests/exynos/exynos_fimg2d_test.c @@ -237,6 +237,18 @@ void *create_checkerboard_pattern(unsigned int num_tiles_x, return buf; } +static void wait_for_user_input(int last) +{ + printf("press to "); + + if (last) + printf("exit test application\n"); + else + printf("skip to next test\n"); + + getchar(); +} + static void exynos_destroy_buffer(struct exynos_bo *bo) { exynos_bo_destroy(bo); @@ -756,7 +768,7 @@ int main(int argc, char **argv) goto err_rm_fb; } - getchar(); + wait_for_user_input(0); src = exynos_create_buffer(dev, screen_width * screen_height * 4, 0); if (!src) { @@ -770,7 +782,7 @@ int main(int argc, char **argv) goto err_free_src; } - getchar(); + wait_for_user_input(0); ret = test_case.copy_with_scale(dev, src, bo, G2D_IMGBUF_GEM); if (ret < 0) { @@ -778,7 +790,7 @@ int main(int argc, char **argv) goto err_free_src; } - getchar(); + wait_for_user_input(0); ret = test_case.checkerboard(dev, src, bo, G2D_IMGBUF_GEM); if (ret < 0) { @@ -786,7 +798,7 @@ int main(int argc, char **argv) goto err_free_src; } - getchar(); + wait_for_user_input(1); /* The blend test uses the userptr functionality of exynos-drm, which * * is currently not safe to use. If the kernel hasn't been build with *