[PATCH kvm-unit-tests] x86: access: print error code in verbose mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This can help debugging the ac_test_permissions code.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 x86/access.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/x86/access.c b/x86/access.c
index 8df2da8..4acaee5 100644
--- a/x86/access.c
+++ b/x86/access.c
@@ -711,7 +711,11 @@ int ac_test_do_access(ac_test_t *at)
                   "pde %x expected %x", *at->pdep, at->expected_pde);
 
     if (success && verbose) {
-        printf("PASS\n");
+	if (at->expected_fault) {
+            printf("PASS (%x)\n", at->expected_error);
+	} else {
+            printf("PASS\n");
+	}
     }
     return success;
 }
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux