diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2014-06-10 22:23:09 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-06-11 17:03:54 +1000 |
commit | 33b4819f3b93bbcb934e02cbc64ff3c5e9d0149b (patch) | |
tree | 4d8e4d8fd1196efbb29d9b208501d746d9565c7d /tools/testing/selftests/powerpc/utils.h | |
parent | de506f73dd40cc1f3ba3312bd454e06f2803335b (diff) |
selftests/powerpc: Add support for skipping tests
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'tools/testing/selftests/powerpc/utils.h')
-rw-r--r-- | tools/testing/selftests/powerpc/utils.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/utils.h b/tools/testing/selftests/powerpc/utils.h index 0de064406dab..a93777ae0684 100644 --- a/tools/testing/selftests/powerpc/utils.h +++ b/tools/testing/selftests/powerpc/utils.h @@ -31,6 +31,18 @@ do { \ } \ } while (0) +/* The test harness uses this, yes it's gross */ +#define MAGIC_SKIP_RETURN_VALUE 99 + +#define SKIP_IF(x) \ +do { \ + if ((x)) { \ + fprintf(stderr, \ + "[SKIP] Test skipped on line %d\n", __LINE__); \ + return MAGIC_SKIP_RETURN_VALUE; \ + } \ +} while (0) + #define _str(s) #s #define str(s) _str(s) |