Fix benchmarks incomplete run#562
Open
Suneeth-D wants to merge 2 commits into
Open
Conversation
pack_contents does `mkdir -p $dst` before `cp -a`, so passing "$srcdir/linux-$kernel_ver/" copied the source into a nested linux/linux-5.9/ dir. The run script's `cd linux && ../kernbench` then failed its include/linux/kernel.h check with "No kernel source found; exiting". Append `/.` to copy the contents into linux/ directly. Fixes: a8a700f("programs/kernbench/pkg/PKGBUILD: resolve missing benchmark path") Signed-off-by: Suneeth D <Suneeth.D@amd.com>
…t setup The run script uses sed to inject a line into the generated lmbench wrapper that creates the pagefault test file with dd when it is missing. Two problems exist: - The wrapper is executed by /bin/sh, but commit b072fec ("programs: refactor to use bash") blindly rewrote the sed-inserted condition from the POSIX [ -f $FILE ] to the bashism [[ -f $FILE ]]. That commit switched programs/lmbench3/run itself to bash, but the string passed to sed lands in the sh wrapper, where [[ ... ]] is invalid and fails. - The sed command appended the dd line unconditionally, so re-running the test injected it repeatedly into the wrapper. Guard the sed insertion with a grep so the dd line is added only once, and restore the POSIX-compatible [ -f $FILE ] form for the sh wrapper. Fixes: b072fec ("programs: refactor to use bash") Signed-off-by: Suneeth D <Suneeth.D@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 2 commits in this series addresses two different issues introduced by these two commits b072fec ("programs: refactor to use bash") and a8a700f ("programs/kernbench/pkg/PKGBUILD: resolve missing benchmark path").
Before the patch on kernbench and lmbench3
kernbench o/p:
2026-06-15 09:46:18 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/cpuid/one-shot-monitor
2026-06-15 09:46:18 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/hwinfo/one-shot-monitor
2026-06-15 09:46:18 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/inxi/one-shot-monitor
2026-06-15 09:46:19 cd /lkp/benchmarks/kernbench
No kernel source found; exiting
2026-06-15 09:46:24 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/cpuid/one-shot-monitor
2026-06-15 09:46:24 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/hwinfo/one-shot-monitor
2026-06-15 09:46:24 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/inxi/one-shot-monitor
lmbench3 o/p:
./lmbench: 201: [[: not found
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 2.77183 s, 387 MB/s
./lmbench: 202: [[: not found
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.37569 s, 318 MB/s
Pagefaults on /var/tmp/XXX: 0.0138 microseconds
After the patch on kernbench and lmbench3
kernbench o/p:
2026-06-15 10:01:24 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/cpuid/one-shot-monitor
2026-06-15 10:01:24 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/hwinfo/one-shot-monitor
2026-06-15 10:01:24 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/inxi/one-shot-monitor
2026-06-15 10:01:25 cd /lkp/benchmarks/kernbench
256 cpus found
Cleaning source tree...
No old config found, using allnoconfig
Making mrproper
Making allnoconfig...
Kernel 7.0.3-03e81f004d7e-9d0263b744
Performing 1 runs of
make -j 128
All data logged to kernbench.log
Optimal load -j 128 run number 1...
Average Optimal load -j 128 Run (std deviation):
Elapsed Time 8.630000
User Time 209.560000
System Time 133.420000
Percent CPU 3971.000000
Context Switches 5309.000000
Sleeps 28597.000000
2026-06-15 10:01:58 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/cpuid/one-shot-monitor
2026-06-15 10:01:58 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/hwinfo/one-shot-monitor
2026-06-15 10:01:58 +0000 WARN -- skip non-executable /home/suneeth/lkp-tests/programs/inxi/one-shot-monitor
lmbench3 o/p:
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.88753 s, 569 MB/s
Pagefaults on /var/tmp/XXX: 0.0143 microseconds