From 310eaeb60579110c5a8e2f31d87ec659ab66b3b8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 5 Jun 2017 11:55:57 +0100 Subject: lib: Force global reset + uevents for hang detector The hang detector relies on a uevent for notification and aborting the test. As proposed, fine-grained resets may not produce a global uevent and so this hang detection becomes void. As we don't expect any hang, we can just reduce the reset to only a global + uevent and so maintain functionality, and switch back to fine-grained resets afterwards. Note that any test that requires testing fine-grained resets should ensure that they are enabled first as igt may leave the global parameters in an inconsistent state. v2: Restore fine-grained resets for explict igt_allow_hang() Signed-off-by: Chris Wilson Cc: Michel Thierry Reviewed-by: Michel Thierry --- lib/igt_sysfs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/igt_sysfs.h') diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h index 4089535d..d666438a 100644 --- a/lib/igt_sysfs.h +++ b/lib/igt_sysfs.h @@ -29,6 +29,10 @@ int igt_sysfs_open(int device, int *idx); int igt_sysfs_open_parameters(int device); +bool igt_sysfs_set_parameter(int device, + const char *parameter, + const char *fmt, ...) + __attribute__((format(printf,3,4))); int igt_sysfs_read(int dir, const char *attr, void *data, int len); int igt_sysfs_write(int dir, const char *attr, const void *data, int len); @@ -38,6 +42,8 @@ char *igt_sysfs_get(int dir, const char *attr); int igt_sysfs_scanf(int dir, const char *attr, const char *fmt, ...) __attribute__((format(scanf,3,4))); +int igt_sysfs_vprintf(int dir, const char *attr, const char *fmt, va_list ap) + __attribute__((format(printf,3,0))); int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...) __attribute__((format(printf,3,4))); -- cgit v1.2.3