Skip to content

Commit

Permalink
selftests/x86/syscall_nt: Clear weird flags after each test
Browse files Browse the repository at this point in the history
[ Upstream commit a61fa27 ]

Clear the weird flags before logging to improve strace output --
logging results while, say, TF is set does no one any favors.

Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lkml.kernel.org/r/907bfa5a42d4475b8245e18b67a04b13ca51ffdb.1593191971.git.luto@kernel.org
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
amluto authored and gregkh committed Oct 1, 2020
1 parent d1a2a1c commit 2566557
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/x86/syscall_nt.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static void do_it(unsigned long extraflags)
set_eflags(get_eflags() | extraflags);
syscall(SYS_getpid);
flags = get_eflags();
set_eflags(X86_EFLAGS_IF | X86_EFLAGS_FIXED);
if ((flags & extraflags) == extraflags) {
printf("[OK]\tThe syscall worked and flags are still set\n");
} else {
Expand Down

0 comments on commit 2566557

Please sign in to comment.