From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67102EB64DC for ; Tue, 18 Jul 2023 01:50:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D1FE10E031; Tue, 18 Jul 2023 01:50:32 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F28D10E031; Tue, 18 Jul 2023 01:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689645030; x=1721181030; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=tmlmWJPgF14gRGSgkO4GJLmrqbxQSnA+RtQDa3tp8FM=; b=ejPjki0umYksgCnaZvjCvbBaIjnUvda7V2oaXMdLI6hxTd9ZsvW5jZmf /Oo9apXpuqlAL5WpGNkVymee2wvuiCohdj9HyqFhCx9icWP/3avrWKk7d XEylHX0uYy1mrobiAJUdDT9o3PWN9yvs0ulriOcACazLTAcKvWiMDYljb KmIARORlEGZQjLnu9r2IP1Zm3zFO2FHX3tqb1xwagonhkDbUVT9KbU1hF scVkvvP/tNN14nvLeDZo+9J5Q/QQNzU0TyINijBVLwtgT15iZWgcHUs3d a7xTJdQfAvPwmCj5cX5lWHzVVX2NieYjowDjUJvfJP3KRCRfVkCQW1pVY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="369635598" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="369635598" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 18:50:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="700710245" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="700710245" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.47.242]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 18:50:28 -0700 Date: Mon, 17 Jul 2023 18:50:27 -0700 Message-ID: <87pm4qhtss.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Vinay Belgaumkar In-Reply-To: <20230717184213.624518-1-vinay.belgaumkar@intel.com> References: <20230717184213.624518-1-vinay.belgaumkar@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Intel-gfx] [igt-dev] [PATCH v2 i-g-t] i915_pm_freq_api: Add some debug to tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 17 Jul 2023 11:42:13 -0700, Vinay Belgaumkar wrote: > > Some subtests seem to be failing in CI, use igt_assert_(lt/eq) which > print the values being compared and some additional debug as well. > > v2: Print GT as well (Ashutosh) > > Signed-off-by: Vinay Belgaumkar > --- > tests/i915/i915_pm_freq_api.c | 18 ++++++++---------- > 1 file changed, 8 insertions(+), 10 deletions(-) > > diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c > index 522abee35..a7bbd4896 100644 > --- a/tests/i915/i915_pm_freq_api.c > +++ b/tests/i915/i915_pm_freq_api.c > @@ -55,6 +55,7 @@ static void test_freq_basic_api(int dirfd, int gt) > rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); > rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); > rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); > + igt_debug("GT: %d, RPn: %d, RPe: %d, RP0: %d", gt, rpn, rpe, rp0); > > /* > * Negative bound tests > @@ -90,21 +91,18 @@ static void test_reset(int i915, int dirfd, int gt, int count) > int fd; > > for (int i = 0; i < count; i++) { > - igt_assert_f(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0, > - "Failed after %d good cycles\n", i); > - igt_assert_f(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0, > - "Failed after %d good cycles\n", i); > + igt_debug("Running cycle: %d", i); > + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0); > + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0); I am R-b'ing this but stuff like this should be using igt_assert_lt() according to the commit message? This _lt stuff has to be fixed all over the file, not just this patch, if it brings any value (again according to the commit message). Let me know if you want to fix this now or in a later patch. I'll wait before merging. Reviewed-by: Ashutosh Dixit > usleep(ACT_FREQ_LATENCY_US); > - igt_assert_f(get_freq(dirfd, RPS_CUR_FREQ_MHZ) == rpn, > - "Failed after %d good cycles\n", i); > + igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn); > > /* Manually trigger a GT reset */ > fd = igt_debugfs_gt_open(i915, gt, "reset", O_WRONLY); > igt_require(fd >= 0); > igt_ignore_warn(write(fd, "1\n", 2)); > > - igt_assert_f(get_freq(dirfd, RPS_CUR_FREQ_MHZ) == rpn, > - "Failed after %d good cycles\n", i); > + igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn); > } > close(fd); > } > @@ -116,13 +114,13 @@ static void test_suspend(int i915, int dirfd, int gt) > igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0); > igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0); > usleep(ACT_FREQ_LATENCY_US); > - igt_assert(get_freq(dirfd, RPS_CUR_FREQ_MHZ) == rpn); > + igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn); > > /* Manually trigger a suspend */ > igt_system_suspend_autoresume(SUSPEND_STATE_S3, > SUSPEND_TEST_NONE); > > - igt_assert(get_freq(dirfd, RPS_CUR_FREQ_MHZ) == rpn); > + igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn); > } > > int i915 = -1; > -- > 2.38.1 >