mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
selftests/x86/syscall_nt: Clear weird flags after each test
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
This commit is contained in:
parent
e4ef7de160
commit
a61fa2799e
@ -59,6 +59,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user