mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
selftests/ftrace: Limit length in subsystem-enable tests
While sched* events being traced and sched* events continuously happen,
"[xx] event tracing - enable/disable with subsystem level files" would
not stop as on some slower systems it seems to take forever.
Select the first 100 lines of output would be enough to judge whether
there are more than 3 types of sched events.
Fixes: 815b18ea66
("ftracetest: Add basic event tracing test cases")
Cc: stable@vger.kernel.org
Signed-off-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
224fe424c3
commit
1a4ea83a6e
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ echo 'sched:*' > set_event
|
|||
|
||||
yield
|
||||
|
||||
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
if [ $count -lt 3 ]; then
|
||||
fail "at least fork, exec and exit events should be recorded"
|
||||
fi
|
||||
|
@ -29,7 +29,7 @@ echo 1 > events/sched/enable
|
|||
|
||||
yield
|
||||
|
||||
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
if [ $count -lt 3 ]; then
|
||||
fail "at least fork, exec and exit events should be recorded"
|
||||
fi
|
||||
|
@ -40,7 +40,7 @@ echo 0 > events/sched/enable
|
|||
|
||||
yield
|
||||
|
||||
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
if [ $count -ne 0 ]; then
|
||||
fail "any of scheduler events should not be recorded"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue