From 082a8705758e05621e88725d3ee2da8f9bd84dd1 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Wed, 3 Aug 2016 12:48:39 +0100 Subject: [PATCH] Audit the use of the skip result Report a skip for swint-emulation if the main purpose of the test is unable to be performed. However, run the first half of the tests against real hardware to confirm that the algorithm is correct Signed-off-by: Andrew Cooper --- docs/introduction.dox | 2 +- include/xtf/report.h | 5 +++-- tests/swint-emulation/main.c | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/introduction.dox b/docs/introduction.dox index b178e9f..3352dae 100644 --- a/docs/introduction.dox +++ b/docs/introduction.dox @@ -170,7 +170,7 @@ The result is covered by the report.h API. In short, the options are: - Success - The test passed. - Skip - - The test cannot be completed (likely a configuration issue). + - The test cannot be completed for configuration reasons. - Error - An error in the environment or test code itself. - Failure diff --git a/include/xtf/report.h b/include/xtf/report.h index 3d08fb0..9a59d6f 100644 --- a/include/xtf/report.h +++ b/include/xtf/report.h @@ -16,8 +16,9 @@ * - Failure * * 'Success' indicates that everything went well, while 'Skip' indicates that - * the test cannot be completed. 'Error' indicates a bug in the test code or - * environment itself, while 'Failure' indicates a bug in the code under test. + * the test cannot be completed for configuration reasons. 'Error' indicates + * a bug in the test code or environment itself, while 'Failure' indicates a + * bug in the code under test. * * If multiple statuses are reported, the most severe is the one which is * kept. diff --git a/tests/swint-emulation/main.c b/tests/swint-emulation/main.c index 5807f77..1f9f505 100644 --- a/tests/swint-emulation/main.c +++ b/tests/swint-emulation/main.c @@ -370,8 +370,12 @@ void test_main(void) { printk("Trap emulation\n"); + /* + * Even if FEP is unavailable, run the tests against real hardware to + * check the algorithm, but don't claim overall success. + */ if ( !xtf_has_fep ) - xtf_warning("Warning: FEP support not detected - some tests will be skipped\n"); + xtf_skip("FEP support not detected - some tests will be skipped\n"); /* Setup. Hook unhandled exceptions for debugging purposes. */ xtf_unhandled_exception_hook = unhandled_exception; -- 2.39.5