public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: realmode: report failures
@ 2014-06-06  0:00 Nadav Amit
  2014-06-09 21:43 ` Bandan Das
  0 siblings, 1 reply; 2+ messages in thread
From: Nadav Amit @ 2014-06-06  0:00 UTC (permalink / raw)
  To: pbonzini; +Cc: gleb, kvm, Nadav Amit

The current realmode tests always report success when done, regardless to
whether any of the tests failed.  Although the log includes the individual test
results, this behavior complicates the life of the tester.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
---
 x86/realmode.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/x86/realmode.c b/x86/realmode.c
index 6e74883..dc4a1d3 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -103,6 +103,8 @@ static void print_serial_u32(u32 value)
 	print_serial(p);
 }
 
+static int failed;
+
 static void exit(int code)
 {
 	outb(code, 0xf4);
@@ -222,6 +224,8 @@ static void report(const char *name, u16 regs_ignore, _Bool ok)
     print_serial(ok ? "PASS: " : "FAIL: ");
     print_serial(name);
     print_serial("\n");
+    if (!ok)
+	failed = 1;
 }
 
 #define MK_INSN(name, str)				\
@@ -1715,7 +1719,7 @@ void realmode_start(void)
 	test_perf_memory_store();
 	test_perf_memory_rmw();
 
-	exit(0);
+	exit(failed);
 }
 
 unsigned long long r_gdt[] = { 0, 0x9b000000ffff, 0x93000000ffff };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-09 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-06  0:00 [PATCH] x86: realmode: report failures Nadav Amit
2014-06-09 21:43 ` Bandan Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox