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

Configure Feed

Select the types of activity you want to include in your feed.

tracing/selftests: Run the ownership test twice

A regression happened where running the ownership test passes on the first
iteration but fails running it a second time. This was caught and fixed,
but a later change brought it back. The regression was missed because the
automated tests only run the tests once per boot.

Change the ownership test to iterate through the tests twice, as this will
catch the regression with a single run.

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

authored by

Steven Rostedt (Google) and committed by
Shuah Khan
53af1a4b 98f8faea

+20 -14
+20 -14
tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc
··· 83 83 done 84 84 } 85 85 86 - mount -o remount,"$new_options" . 86 + # Run the tests twice as leftovers can cause issues 87 + for loop in 1 2 ; do 87 88 88 - run_tests 89 + echo "Running iteration $loop" 89 90 90 - mount -o remount,"$mount_options" . 91 + mount -o remount,"$new_options" . 91 92 92 - for d in "." "events" "events/sched" "events/sched/sched_switch" "events/sched/sched_switch/enable" $canary; do 93 - test "$d" $original_group 94 - done 93 + run_tests 94 + 95 + mount -o remount,"$mount_options" . 96 + 97 + for d in "." "events" "events/sched" "events/sched/sched_switch" "events/sched/sched_switch/enable" $canary; do 98 + test "$d" $original_group 99 + done 95 100 96 101 # check instances as well 97 102 98 - chgrp $other_group instances 103 + chgrp $other_group instances 99 104 100 - instance="$(mktemp -u test-XXXXXX)" 105 + instance="$(mktemp -u test-XXXXXX)" 101 106 102 - mkdir instances/$instance 107 + mkdir instances/$instance 103 108 104 - cd instances/$instance 109 + cd instances/$instance 105 110 106 - run_tests 111 + run_tests 107 112 108 - cd ../.. 113 + cd ../.. 109 114 110 - rmdir instances/$instance 115 + rmdir instances/$instance 111 116 112 - chgrp $original_group instances 117 + chgrp $original_group instances 118 + done 113 119 114 120 exit 0