[PATCH i-g-t] tests/tools_test: Make sure l3_parity is supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check support before executing test.
v2: Skip test only if intel_l3_parity tool tells us to skip. (Petri)

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101650
Cc: Petri Latvala <petri.latvala@xxxxxxxxx>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx>
---
 tests/tools_test.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/tools_test.c b/tests/tools_test.c
index ccd165d..ebd4a9d 100644
--- a/tests/tools_test.c
+++ b/tests/tools_test.c
@@ -89,7 +89,8 @@ igt_main
 		igt_system_cmd(exec_return,
 			       "../tools/intel_l3_parity -r 0 -b 0 "
 			       "-s 0 -e");
-		igt_assert(exec_return == IGT_EXIT_SUCCESS);
+		igt_skip_on_f(exec_return == IGT_EXIT_SKIP,
+			      "intel_l3_parity not supported\n");
 
 		igt_system_cmd(exec_return,
 			       "../tools/intel_l3_parity -l | "
@@ -101,13 +102,14 @@ igt_main
 					       &val);
 			igt_assert(val == 1);
 		} else {
-			igt_fail(IGT_EXIT_FAILURE);
+			igt_skip("intel_l3_parity not supported\n");
 		}
 
 		igt_system_cmd(exec_return,
 			       "../tools/intel_l3_parity -r 0 -b 0 "
 			       "-s 0 -e");
-		igt_assert(exec_return == IGT_EXIT_SUCCESS);
+		igt_skip_on_f(exec_return == IGT_EXIT_SKIP,
+			      "intel_l3_parity not supported\n");
 
 		/* Check that we can clear remaps */
 		igt_system_cmd(exec_return,
@@ -119,7 +121,7 @@ igt_main
 					       &val);
 			igt_assert(val == 1);
 		} else {
-			igt_fail(IGT_EXIT_FAILURE);
+			igt_skip("intel_l3_parity not supported\n");
 		}
 	}
 
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux