Commit 327d53d0 authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Ingo Molnar

selftests/x86/entry_from_vm86: Exit with 1 if we fail

Fix a logic error that caused the test to exit with 0 even if test
cases failed.
Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stas Sergeev <stsp@list.ru>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bartoldeman@gmail.com
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/b1cc37144038958a469c8f70a5f47a6a5638636a.1521003603.git.luto@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 7958b224
...@@ -318,7 +318,7 @@ int main(void) ...@@ -318,7 +318,7 @@ int main(void)
clearhandler(SIGSEGV); clearhandler(SIGSEGV);
/* Make sure nothing explodes if we fork. */ /* Make sure nothing explodes if we fork. */
if (fork() > 0) if (fork() == 0)
return 0; return 0;
return (nerrs == 0 ? 0 : 1); return (nerrs == 0 ? 0 : 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment