]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Reintroduce the test_NULL_unmapped() selftest
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 6 Mar 2016 20:26:12 +0000 (20:26 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 6 Mar 2016 20:26:21 +0000 (20:26 +0000)
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 <andrew.cooper3@citrix.com>
tests/selftest/main.c

index 6f982ec1740a3cb99cf48588f2767dd2f4061ae2..7181bf47b82bc0a6024d4c63deb70a0051ec5870 100644 (file)
@@ -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);