CI Tests: make Regression/python-probing less flaky

Make Regression/python-probing less flaky by restricting
the output flow, preventing the transport buffers flood (PR29108).
This commit is contained in:
Martin Cermak 2022-05-26 11:05:48 +02:00
parent ca4fdbacfc
commit 5d247c7220
3 changed files with 5 additions and 8 deletions

View File

@ -11,10 +11,12 @@
*/ */
probe python.function.entry probe python.function.entry
{ {
if ( filename =~ "random" )
printf("%s => %s in %s:%d\n", thread_indent(1), funcname, filename, lineno); printf("%s => %s in %s:%d\n", thread_indent(1), funcname, filename, lineno);
} }
probe python.function.return probe python.function.return
{ {
if ( filename =~ "random" )
printf("%s <= %s in %s:%d\n", thread_indent(-1), funcname, filename, lineno); printf("%s <= %s in %s:%d\n", thread_indent(-1), funcname, filename, lineno);
} }

View File

@ -65,11 +65,8 @@ rlJournalStart
rlRun "stap $script.stp -v -c \"$PYTHON test.py\" > $script" \ rlRun "stap $script.stp -v -c \"$PYTHON test.py\" > $script" \
0 "Testing with $script.stp" 0 "Testing with $script.stp"
rlRun "tail -100 $script | col -b" 0 "Inspecting output" rlRun "tail -100 $script | col -b" 0 "Inspecting output"
if ! rlRun "grep '/usr/lib.*python.*random.py' '$script'" \ rlRun "grep '/usr/lib.*python.*random.py' '$script'" \
0 "Checking for random in the $script output"; then 0 "Checking for random in the $script output"
rlRun "stap $script.stp -vvv -c \"$PYTHON test.py\" > $script" \
0 "Running $script.stp once more in verbose mode"
fi
rlPhaseEnd rlPhaseEnd
done done

View File

@ -8,10 +8,8 @@ probe python.function.entry
} }
probe timer.ms(1000) { probe timer.ms(1000) {
printf("\033[2J\033[1;1H") /* clear screen */
printf("%6s %80s %6s %30s %6s\n",
"PID", "FILENAME", "LINE", "FUNCTION", "CALLS")
foreach ([pid, filename, funcname, lineno] in fn_calls- limit 1000) { foreach ([pid, filename, funcname, lineno] in fn_calls- limit 1000) {
if (filename =~ "random")
printf("%6d %80s %6d %30s %6d\n", printf("%6d %80s %6d %30s %6d\n",
pid, filename, lineno, funcname, pid, filename, lineno, funcname,
fn_calls[pid, filename, funcname, lineno]); fn_calls[pid, filename, funcname, lineno]);