Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/ftrace: Have pid filter test use instance flag

While running the ftracetests, the pid filter test failed because the
instance "foo" existed, and it was using it to rerun the test under a
instance named foo. The collision caused the test to fail as the mkdir
failed as the name already existed.

As of commit b5b77be812de7 ("selftests: ftrace: Allow some tests to be run
in a tracing instance") all a selftest needs to do to be tested in an
instance is to set the "instance" flag. There's no reason a selftest needs
to create an instance to run its test in an instance directly.

Remove the open coded testing in an instance for the pid filter test and
have it set the "instance" flag instead.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Steven Rostedt (VMware) and committed by
Shuah Khan
a098d9c8 7714d469

+1 -7
+1 -7
tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
··· 1 1 #!/bin/sh 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 # description: ftrace - function pid filters 4 + # flags: instance 4 5 5 6 # Make sure that function pid matching filter works. 6 7 # Also test it on an instance directory ··· 97 96 } 98 97 99 98 do_test 100 - 101 - mkdir instances/foo 102 - cd instances/foo 103 - do_test 104 - cd ../../ 105 - rmdir instances/foo 106 - 107 99 do_reset 108 100 109 101 exit 0