From: Daniel Vetter Subject: [PATCH] Revert "tests: Run igt.cocci over tests" Date: Fri, 13 Jun 2014 18:08:34 +0200 Message-ID: <1402675714-17582-1-git-send-email-daniel.vetter@ffwll.ch> References: <1402651089-4027-3-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 6824E6EAAC for ; Fri, 13 Jun 2014 09:08:44 -0700 (PDT) Received: by mail-we0-f171.google.com with SMTP id q58so3054364wes.30 for ; Fri, 13 Jun 2014 09:08:43 -0700 (PDT) In-Reply-To: <1402651089-4027-3-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org This reverts commit 6903ab04e5f9048e3932eb3225e94b6a228681ba. The igt_assert conversion rule is broken and doesn't invert the check as it should. Signed-off-by: Daniel Vetter --- tests/drv_hangman.c | 14 ++++++++++---- tests/kms_psr_sink_crc.c | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c index 667491baf7f1..d74ed483407c 100644 --- a/tests/drv_hangman.c +++ b/tests/drv_hangman.c @@ -118,11 +118,17 @@ static void _assert_dfs_entry(const char *fname, const char *s, bool inverse) read_dfs(fname, tmp, l + 1); if (!inverse) { - igt_assert_f(strncmp(tmp, s, l) != 0, - "contents of %s: '%s' (expected '%s')\n", fname, tmp, s); + if (strncmp(tmp, s, l) != 0) { + fprintf(stderr, "contents of %s: '%s' (expected '%s')\n", + fname, tmp, s); + igt_fail(1); + } } else { - igt_assert_f(strncmp(tmp, s, l) == 0, - "contents of %s: '%s' (expected not '%s'\n", fname, tmp, s); + if (strncmp(tmp, s, l) == 0) { + fprintf(stderr, "contents of %s: '%s' (expected not '%s'\n", + fname, tmp, s); + igt_fail(1); + } } } diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c index a36ae6c1800f..999a0bfd0bb6 100644 --- a/tests/kms_psr_sink_crc.c +++ b/tests/kms_psr_sink_crc.c @@ -269,8 +269,8 @@ static bool psr_sink_support(data_t *data) igt_require(file); ret = fscanf(file, "Sink_Support: %s\n", str); - igt_skip_on_f(ret == 0, - "i915_edp_psr_status format not supported by this test case\n"); + if (ret == 0) + igt_skip("i915_edp_psr_status format not supported by this test case\n"); fclose(file); return strcmp(str, "yes") == 0; -- 2.0.0