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

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Mar 19 02:59:07 PDT 2018


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=327d53d005ca47b10eae940616ed11c569f75a9b
Commit:     327d53d005ca47b10eae940616ed11c569f75a9b
Parent:     7958b2246fadf54b7ff820a2a5a2c5ca1554716f
Author:     Andy Lutomirski <luto at kernel.org>
AuthorDate: Tue Mar 13 22:03:10 2018 -0700
Committer:  Ingo Molnar <mingo at kernel.org>
CommitDate: Wed Mar 14 09:21:01 2018 +0100

    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: Andy Lutomirski <luto at kernel.org>
    Cc: Borislav Petkov <bp at alien8.de>
    Cc: Brian Gerst <brgerst at gmail.com>
    Cc: Denys Vlasenko <dvlasenk at redhat.com>
    Cc: H. Peter Anvin <hpa at zytor.com>
    Cc: Josh Poimboeuf <jpoimboe at redhat.com>
    Cc: Linus Torvalds <torvalds at linux-foundation.org>
    Cc: Peter Zijlstra <peterz at infradead.org>
    Cc: Stas Sergeev <stsp at list.ru>
    Cc: Thomas Gleixner <tglx at linutronix.de>
    Cc: bartoldeman at gmail.com
    Cc: stable at vger.kernel.org
    Link: http://lkml.kernel.org/r/b1cc37144038958a469c8f70a5f47a6a5638636a.1521003603.git.luto@kernel.org
    Signed-off-by: Ingo Molnar <mingo at kernel.org>
---
 tools/testing/selftests/x86/entry_from_vm86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/x86/entry_from_vm86.c b/tools/testing/selftests/x86/entry_from_vm86.c
index 361466a2eaef..6e85f0d0498d 100644
--- a/tools/testing/selftests/x86/entry_from_vm86.c
+++ b/tools/testing/selftests/x86/entry_from_vm86.c
@@ -318,7 +318,7 @@ int main(void)
 	clearhandler(SIGSEGV);
 
 	/* Make sure nothing explodes if we fork. */
-	if (fork() > 0)
+	if (fork() == 0)
 		return 0;
 
 	return (nerrs == 0 ? 0 : 1);



More information about the linux-mtd-cvs mailing list