Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B83D6EDDC for ; Thu, 16 Sep 2021 14:12:01 +0000 (UTC) From: Vidya Srinivas Date: Thu, 16 Sep 2021 19:29:55 +0530 Message-Id: <20210916135955.17270-1-vidya.srinivas@intel.com> In-Reply-To: <20210902151334.15818-1-vidya.srinivas@intel.com> References: <20210902151334.15818-1-vidya.srinivas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Skip tests if selected fetch is not available List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: igt-dev@lists.freedesktop.org Cc: Bhanuprakash.Modem@intel.com, markyacoub@google.com, Vidya Srinivas List-ID: Currently the tests are failing on systems where selected fetch feature is not availble. Kernel returns -EINVAL when the test executes reporting "Invalid debug mask 4". Patch skips if selected fetch feature is not available in the kernel. v2: Incorportated Mark Yacoub's comments. Changed igt_skip to igt_require_f Signed-off-by: Vidya Srinivas --- lib/igt_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_psr.c b/lib/igt_psr.c index 68240f9a33b4..0af503fb796e 100644 --- a/lib/igt_psr.c +++ b/lib/igt_psr.c @@ -167,7 +167,7 @@ static bool psr_set(int device, int debugfs_fd, int mode) } ret = psr_write(debugfs_fd, debug_val); - igt_assert(ret > 0); + igt_require_f(ret == 0, "PSR2 SF feature not available\n"); } /* Restore original value on exit */ -- 2.33.0