From 5d247c72202e7b5c23cc291f1716984e0f92ff53 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: May 26 2022 09:05:48 +0000 Subject: 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). --- diff --git a/tests/Regression/python-probing/list.stp b/tests/Regression/python-probing/list.stp index 357fef6..f68e700 100755 --- a/tests/Regression/python-probing/list.stp +++ b/tests/Regression/python-probing/list.stp @@ -11,10 +11,12 @@ */ probe python.function.entry { + if ( filename =~ "random" ) printf("%s => %s in %s:%d\n", thread_indent(1), funcname, filename, lineno); } probe python.function.return { + if ( filename =~ "random" ) printf("%s <= %s in %s:%d\n", thread_indent(-1), funcname, filename, lineno); } diff --git a/tests/Regression/python-probing/runtest.sh b/tests/Regression/python-probing/runtest.sh index 52c7091..5ead47e 100755 --- a/tests/Regression/python-probing/runtest.sh +++ b/tests/Regression/python-probing/runtest.sh @@ -65,11 +65,8 @@ rlJournalStart rlRun "stap $script.stp -v -c \"$PYTHON test.py\" > $script" \ 0 "Testing with $script.stp" rlRun "tail -100 $script | col -b" 0 "Inspecting output" - if ! rlRun "grep '/usr/lib.*python.*random.py' '$script'" \ - 0 "Checking for random in the $script output"; then - rlRun "stap $script.stp -vvv -c \"$PYTHON test.py\" > $script" \ - 0 "Running $script.stp once more in verbose mode" - fi + rlRun "grep '/usr/lib.*python.*random.py' '$script'" \ + 0 "Checking for random in the $script output" rlPhaseEnd done diff --git a/tests/Regression/python-probing/top.stp b/tests/Regression/python-probing/top.stp index b5645b2..f32fbf9 100755 --- a/tests/Regression/python-probing/top.stp +++ b/tests/Regression/python-probing/top.stp @@ -8,10 +8,8 @@ probe python.function.entry } 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) { + if (filename =~ "random") printf("%6d %80s %6d %30s %6d\n", pid, filename, lineno, funcname, fn_calls[pid, filename, funcname, lineno]);