mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 18:06:13 +00:00
abort should only be used for internal library checks - using abort() we get a "crash" result, using igt_fail we get "fail" in piglit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
54 lines
735 B
Plaintext
54 lines
735 B
Plaintext
// Replace open-coded augmented igt_assert/skip/require with macro versions
|
|
@@
|
|
expression Ec;
|
|
expression list[n] Ep;
|
|
@@
|
|
- if (Ec) {
|
|
(
|
|
- igt_warn( Ep );
|
|
|
|
|
- igt_info( Ep );
|
|
|
|
|
- igt_debug( Ep );
|
|
)
|
|
- igt_fail(...);
|
|
- }
|
|
+ igt_assert_f(Ec, Ep);
|
|
@@
|
|
expression Ec;
|
|
expression list[n] Ep;
|
|
@@
|
|
- if (Ec) {
|
|
- igt_skip(Ep);
|
|
- }
|
|
+ igt_skip_on_f(Ec, Ep);
|
|
|
|
// Enforce use of logging functions
|
|
@@
|
|
expression list[n] Ep;
|
|
@@
|
|
-fprintf(stderr, Ep);
|
|
+igt_warn(Ep);
|
|
@@
|
|
expression E;
|
|
@@
|
|
-perror(E);
|
|
+igt_warn(E);
|
|
@@
|
|
expression list[n] Ep;
|
|
@@
|
|
-fprintf(stdout, Ep);
|
|
+igt_info(Ep);
|
|
@@
|
|
expression list[n] Ep;
|
|
@@
|
|
-printf(Ep);
|
|
+igt_info(Ep);
|
|
|
|
// No abort for tests, really. Should only be used for internal library checks
|
|
// in lib/*
|
|
@@
|
|
@@
|
|
-abort();
|
|
+igt_fail(1);
|