From patchwork Tue Feb 24 14:20:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Jakobi X-Patchwork-Id: 5873031 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 07D70BF440 for ; Tue, 24 Feb 2015 14:24:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF9212037F for ; Tue, 24 Feb 2015 14:24:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE3782038D for ; Tue, 24 Feb 2015 14:23:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbbBXOX6 (ORCPT ); Tue, 24 Feb 2015 09:23:58 -0500 Received: from smtp.math.uni-bielefeld.de ([129.70.45.10]:47926 "EHLO smtp.math.uni-bielefeld.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752421AbbBXOX5 (ORCPT ); Tue, 24 Feb 2015 09:23:57 -0500 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 DEF3A60FF9; Tue, 24 Feb 2015 15:23:55 +0100 (CET) From: Tobias Jakobi To: linux-samsung-soc@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, emil.l.velikov@gmail.com, jy0922.shim@samsung.com, m.szyprowski@samsung.com, robclark@freedesktop.org, Tobias Jakobi Subject: [PATCH v3 06/17] tests/exynos: introduce wait_for_user_input Date: Tue, 24 Feb 2015 15:20:44 +0100 Message-Id: <1424787655-10739-7-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailer: git-send-email 2.0.5 In-Reply-To: <1424787655-10739-1-git-send-email-tjakobi@math.uni-bielefeld.de> References: <1424787655-10739-1-git-send-email-tjakobi@math.uni-bielefeld.de> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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. v3: Compactify printf calls as pointed out by Emil Velikov . Signed-off-by: Tobias Jakobi --- tests/exynos/exynos_fimg2d_test.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c index 0f7cf24..5a2a351 100644 --- a/tests/exynos/exynos_fimg2d_test.c +++ b/tests/exynos/exynos_fimg2d_test.c @@ -237,6 +237,14 @@ void *create_checkerboard_pattern(unsigned int num_tiles_x, return buf; } +static void wait_for_user_input(int last) +{ + printf("press to %s\n", last ? "exit test application" : + "skip to next test"); + + getchar(); +} + static void exynos_destroy_buffer(struct exynos_bo *bo) { exynos_bo_destroy(bo); @@ -756,7 +764,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 +778,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 +786,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 +794,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