[PATCH i-g-t v2 2/2] tests/intel/xe_eu_stall: Check if observation_paranoid file is present

Harish Chegondi harish.chegondi at intel.com
Fri Apr 25 07:21:18 UTC 2025


Add a check for the presence of /proc/sys/dev/xe/observation_paranoid
file.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi at intel.com>
---
 tests/intel/xe_eu_stall.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/intel/xe_eu_stall.c b/tests/intel/xe_eu_stall.c
index b48236425..411c30871 100644
--- a/tests/intel/xe_eu_stall.c
+++ b/tests/intel/xe_eu_stall.c
@@ -39,6 +39,7 @@
 #include <fcntl.h>
 #include <poll.h>
 #include <sys/ioctl.h>
+#include <sys/stat.h>
 #include <sys/wait.h>
 
 #include "igt.h"
@@ -645,6 +646,7 @@ igt_main_args("e:g:o:r:u:w:", long_options, help_str, opt_handler, NULL)
 {
 	int drm_fd;
 	uint32_t devid;
+	struct stat sb;
 	bool blocking_read = true;
 
 	igt_fixture {
@@ -653,6 +655,7 @@ igt_main_args("e:g:o:r:u:w:", long_options, help_str, opt_handler, NULL)
 		devid = intel_get_drm_devid(drm_fd);
 		igt_require(IS_PONTEVECCHIO(devid) || intel_graphics_ver(devid) >= IP_VER(20, 0));
 		igt_require_f(igt_get_gpgpu_fillfunc(devid), "no gpgpu-fill function\n");
+		igt_require_f(!stat(OBSERVATION_PARANOID, &sb), "no observation_paranoid file\n");
 		if (output_file) {
 			output = fopen(output_file, "w");
 			igt_require(output);
-- 
2.48.1



More information about the igt-dev mailing list