From: Andrew Cooper Date: Sun, 6 Mar 2016 20:26:12 +0000 (+0000) Subject: Reintroduce the test_NULL_unmapped() selftest X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=14f98c2f917045861ba2b8f9931afb9be6131929;p=people%2Froyger%2Fxen-test-framework.git Reintroduce the test_NULL_unmapped() selftest c/s f571b0b "Implement the hvm32 environment" introduced a guard to the test_NULL_unmapped() selftest, as it is inapplicable in an unpaged environment. However, CONFIG_PAGING wasn't ever defined (it disappeared during development), causing the selftest to be unconditionally omitted even in paged environments. Reintroduce the check, based on CONFIG_PAGING_LEVELS being non-zero. Signed-off-by: Andrew Cooper --- diff --git a/tests/selftest/main.c b/tests/selftest/main.c index 6f982ec..7181bf4 100644 --- a/tests/selftest/main.c +++ b/tests/selftest/main.c @@ -174,7 +174,6 @@ static void test_exec_user(void) } } -#ifdef CONFIG_PAGING static void test_NULL_unmapped(void) { extern unsigned long label_test_NULL_unmapped[]; @@ -195,7 +194,6 @@ static void test_NULL_unmapped(void) xtf_exlog_stop(); } -#endif static bool local_unhandled_exception_hook(struct cpu_regs *regs) { @@ -232,9 +230,8 @@ void test_main(void) test_extable(); test_exlog(); test_exec_user(); -#ifdef CONFIG_PAGING - test_NULL_unmapped(); -#endif + if ( CONFIG_PAGING_LEVELS > 0 ) + test_NULL_unmapped(); test_unhandled_exception_hook(); xtf_success(NULL);