diff mbox series

[i-g-t,v5,05/21] tests/core_hotunplug: Assert successful device filter application

Message ID 20200828075927.17061-6-janusz.krzysztofik@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series tests/core_hotunplug: Fixes and enhancements | expand

Commit Message

Janusz Krzysztofik Aug. 28, 2020, 7:59 a.m. UTC
Return value of igt_device_filter_add() representing a number of
successfully installed device filters is now ignored.  Fail if not 1.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
---
 tests/core_hotunplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 5093233d7..46f9ad118 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -193,7 +193,7 @@  static void set_filter_from_device(int fd)
 	igt_assert(realpath(path, dst));
 
 	igt_device_filter_free_all();
-	igt_device_filter_add(filter);
+	igt_assert_eq(igt_device_filter_add(filter), 1);
 }
 
 /* Subtests */