diff options
author | Andy Lutomirski <luto@kernel.org> | 2020-06-26 20:21:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-01 14:12:48 +0300 |
commit | 3650a8cd89c66eaa41e01ca228a4d9b8b3a8baff (patch) | |
tree | 7b71bff9da78e9f89cea3311f6603d5ba95b86dd /tools | |
parent | 117413cd30aa64fca2b14261f9eaff4573204933 (diff) | |
download | linux-3650a8cd89c66eaa41e01ca228a4d9b8b3a8baff.tar.xz |
selftests/x86/syscall_nt: Clear weird flags after each test
[ Upstream commit a61fa2799ef9bf6c4f54cf7295036577cececc72 ]
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 <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/907bfa5a42d4475b8245e18b67a04b13ca51ffdb.1593191971.git.luto@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/x86/syscall_nt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/x86/syscall_nt.c b/tools/testing/selftests/x86/syscall_nt.c index 43fcab367fb0..74e6b3fc2d09 100644 --- a/tools/testing/selftests/x86/syscall_nt.c +++ b/tools/testing/selftests/x86/syscall_nt.c @@ -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 { |