public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: kernel: make flamegraph generation opt-in
@ 2026-09-11 13:23 Ondrej Mosnacek
0 siblings, 0 replies; only message in thread
From: Ondrej Mosnacek @ 2026-09-11 13:23 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 0c58cf0a60ccf1d15493dc5d853206fd3a4411a3
Author : Ondrej Mosnacek <omosnace@redhat.com>
Date : 2025-07-24T17:05:11+02:00
Stats : +26/-8 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/0c58cf0a60ccf1d15493dc5d853206fd3a4411a3?branch=pr775-checkpolicy-revdeps
Log:
kernel: make flamegraph generation opt-in
To avoid running code from untrusted repositories, make the generation
of flamegraphs optional (via a test parameter) and disabled by default.
The test parameter should only be set to 1 as needed when running the
test manually and kept disabled in automated test runs.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
diff --git a/kernel/journald_performance/runtest.sh b/kernel/journald_performance/runtest.sh
index bb960db..a207d54 100755
--- a/kernel/journald_performance/runtest.sh
+++ b/kernel/journald_performance/runtest.sh
@@ -7,6 +7,9 @@
# Include Beakerlib environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
+# Set this parameter to 1 to also generate a flamegraph.
+GENERATE_FLAMEGRAPH="${GENERATE_FLAMEGRAPH:-0}"
+
FG_URL="https://github.com/brendangregg/FlameGraph"
FG_DIR="FlameGraph"
@@ -17,7 +20,9 @@ rlJournalStart
rlPhaseStartSetup
rlRun "uname -r" 0 "Print running kernel version"
- rlRun "git clone $FG_URL $FG_DIR"
+ if [ "$GENERATE_FLAMEGRAPH" != 0 ]; then
+ rlRun "git clone $FG_URL $FG_DIR"
+ fi
rlPhaseEnd
rlPhaseStartTest
@@ -30,7 +35,9 @@ rlJournalStart
"Capture perf data on systemd-journald"
rlRun "kill %1"
- rlRun "perf script -i perf.data | $FG_DIR/stackcollapse-perf.pl | $FG_DIR/flamegraph.pl > flamegraph.svg"
+ if [ "$GENERATE_FLAMEGRAPH" != 0 ]; then
+ rlRun "perf script -i perf.data | $FG_DIR/stackcollapse-perf.pl | $FG_DIR/flamegraph.pl > flamegraph.svg"
+ fi
rlRun "perf report -i perf.data -g none --pretty raw | grep $TARGET_SYMBOL"
PERCENT="$(perf report -g none --pretty raw | grep $TARGET_SYMBOL | \
@@ -42,10 +49,12 @@ rlJournalStart
rlPhaseStartCleanup
rlFileSubmit "perf.data"
- rlFileSubmit "flamegraph.svg"
+ if [ "$GENERATE_FLAMEGRAPH" != 0 ]; then
+ rlFileSubmit "flamegraph.svg"
- rlRun "rm -rf $FG_DIR"
- rlRun "rm -f perf.data flamegraph.svg"
+ rlRun "rm -rf $FG_DIR flamegraph.svg"
+ fi
+ rlRun "rm -f perf.data"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
diff --git a/kernel/synflood/runtest.sh b/kernel/synflood/runtest.sh
index aaaf8ab..7a4327c 100755
--- a/kernel/synflood/runtest.sh
+++ b/kernel/synflood/runtest.sh
@@ -7,6 +7,9 @@
# Include Beakerlib environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
+# Set this parameter to 1 to also generate a flamegraph.
+GENERATE_FLAMEGRAPH="${GENERATE_FLAMEGRAPH:-0}"
+
TEST_PORT=8080
FG_URL="https://github.com/brendangregg/FlameGraph"
@@ -32,7 +35,9 @@ else
rlRun "uname -r"
- rlRun "git clone $FG_URL $FG_DIR"
+ if [ "$GENERATE_FLAMEGRAPH" != 0 ]; then
+ rlRun "git clone $FG_URL $FG_DIR"
+ fi
rlPhaseEnd
rlPhaseStartTest
@@ -64,10 +69,14 @@ else
rlPhaseEnd
rlPhaseStartCleanup
- rlRun "perf script -i perf.data | $FG_DIR/stackcollapse-perf.pl | $FG_DIR/flamegraph.pl > flamegraph.svg"
+ if [ "$GENERATE_FLAMEGRAPH" != 0 ]; then
+ rlRun "perf script -i perf.data | $FG_DIR/stackcollapse-perf.pl | $FG_DIR/flamegraph.pl > flamegraph.svg"
+ rlFileSubmit "flamegraph.svg"
+ rlRun "rm -f flamegraph.svg"
+ fi
rlRun "xz -T0 perf.data"
- for file in "perf.data.xz" "flamegraph.svg" "perf-report.txt"; do
+ for file in "perf.data.xz" "perf-report.txt"; do
rlFileSubmit "$file"
rlRun "rm -f $file"
done
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:23 [tests/selinux] pr775-checkpolicy-revdeps: kernel: make flamegraph generation opt-in Ondrej Mosnacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox