From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id C8F7510E652 for ; Fri, 22 Sep 2023 11:38:45 +0000 (UTC) From: janga.rahul.kumar@intel.com To: igt-dev@lists.freedesktop.org, ramadevi.gandi@intel.com, janga.rahul.kumar@intel.com Date: Fri, 22 Sep 2023 17:11:30 +0530 Message-Id: <20230922114130.820963-1-janga.rahul.kumar@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t] tests/intel/xe_debugfs: Check tile_count info List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sai.gowtham.ch@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Janga Rahul Kumar Check correctness of tile_count info. v2: Use snprintf.(kamil) v3: Add size param. (kamil) Cc: Kamil Konieczny Cc: Sai Gowtham Ch Reviewed-by: Sai Gowtham Ch Signed-off-by: Janga Rahul Kumar --- tests/intel/xe_debugfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/intel/xe_debugfs.c b/tests/intel/xe_debugfs.c index 88b51dbd4..e5bbb364c 100644 --- a/tests/intel/xe_debugfs.c +++ b/tests/intel/xe_debugfs.c @@ -13,7 +13,7 @@ */ #include "igt.h" - +#include "igt_sysfs.h" #include "xe_drm.h" #include "xe/xe_ioctl.h" #include "xe/xe_query.h" @@ -117,6 +117,9 @@ test_base(int fd, struct drm_xe_query_config *config) igt_assert(igt_debugfs_search(fd, "info", reference)); } + snprintf(reference, sizeof(reference), "tile_count %d", xe_sysfs_get_num_tiles(fd)); + igt_assert(igt_debugfs_search(fd, "info", reference)); + igt_assert(igt_debugfs_exists(fd, "gt0", O_RDONLY)); if (config->info[XE_QUERY_CONFIG_GT_COUNT] > 1) igt_assert(igt_debugfs_exists(fd, "gt1", O_RDONLY)); -- 2.25.1