forked from woqidaideshi/openruyi-autotest
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| badd54b743 | |||
| 1791e79931 |
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_async_handler
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_gtod_latency
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_hrtimer_prio
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_matrix_mult
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_measurement
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_periodic_cpu_load
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_pi_perf
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_pi_tests
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_prio_preempt
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_prio_wake
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_pthread_kill_latency
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_rt_migrate
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_sched_football
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_sched_jitter
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_sched_latency
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -10,5 +10,4 @@ tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_thread_clock
|
||||
require:
|
||||
- ltp
|
||||
- hostname
|
||||
- beakerlib
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - fio - 缓存行为对比 (Direct I/O vs Buffered)
|
||||
test: ./test.sh
|
||||
tag: [performance, fio]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/fio/test_fio_cache_behavior
|
||||
require: [fio, beakerlib]
|
||||
|
||||
@@ -1,99 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Performance: fio - 缓存行为: Direct I/O vs Buffered I/O, 测量 Page Cache 加速效果
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
fioSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir fio_cache_behavior)"
|
||||
OUT="$WORKDIR/fio_cache_behavior.json"
|
||||
NCPU="$(get_ncpu)"
|
||||
|
||||
rlPhaseStartTest "Direct I/O vs Buffered 读"
|
||||
local testfile="$TmpDir/cache_read.dat"
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=512 2>/dev/null
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "NCPU=$NCPU"
|
||||
|
||||
echo ""
|
||||
echo "=== Direct I/O vs Buffered 顺序读 ==="
|
||||
printf "%-15s %-15s %-15s\n" "Mode" "BW" "CPU(sys%)"
|
||||
|
||||
# Buffered (first read, cold cache)
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/buf_cold.log"
|
||||
fio --name=buf_cold --filename="$testfile" --direct=0 \
|
||||
--rw=read --bs=64k --size=256M --numjobs=1 --iodepth=8 \
|
||||
--ioengine=sync --runtime=15 2>&1 | tee "$log"
|
||||
local bw1 cpu1
|
||||
bw1=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
cpu1=$(grep "cpu " "$log" | grep -oP 'sys=\K[\d.]+%' | head -1)
|
||||
printf "%-15s %-15s %-15s\n" "Buffered(cold)" "${bw1:-N/A}" "${cpu1:-N/A}"
|
||||
|
||||
# Buffered (second read, warm cache)
|
||||
local log="$TmpDir/buf_warm.log"
|
||||
fio --name=buf_warm --filename="$testfile" --direct=0 \
|
||||
--rw=read --bs=64k --size=256M --numjobs=1 --iodepth=8 \
|
||||
--ioengine=sync --runtime=15 2>&1 | tee "$log"
|
||||
local bw2 cpu2
|
||||
bw2=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
cpu2=$(grep "cpu " "$log" | grep -oP 'sys=\K[\d.]+%' | head -1)
|
||||
printf "%-15s %-15s %-15s\n" "Buffered(warm)" "${bw2:-N/A}" "${cpu2:-N/A}"
|
||||
|
||||
# Direct I/O
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/direct.log"
|
||||
fio --name=direct --filename="$testfile" --direct=1 \
|
||||
--rw=read --bs=64k --size=256M --numjobs=1 --iodepth=8 \
|
||||
--ioengine=libaio --runtime=15 2>&1 | tee "$log"
|
||||
local bw3 cpu3
|
||||
bw3=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
cpu3=$(grep "cpu " "$log" | grep -oP 'sys=\K[\d.]+%' | head -1)
|
||||
printf "%-15s %-15s %-15s\n" "Direct" "${bw3:-N/A}" "${cpu3:-N/A}"
|
||||
|
||||
# 分析: warm cache 应远快于 cold/direct
|
||||
if [ -n "$bw2" ] && [ -n "$bw3" ]; then
|
||||
rlLogInfo "Page Cache 加速: warm=$bw2 vs direct=$bw3"
|
||||
if ! command -v fio >/dev/null 2>&1; then
|
||||
rlLogWarning "fio not installed; install fio or skip-compatible"
|
||||
rlRun "true" 0 "fio unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
fio --version || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
rlPass "缓存行为对比完成"
|
||||
rm -f "$testfile"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Direct I/O vs Buffered 写"
|
||||
_fioDropCaches
|
||||
echo ""
|
||||
echo "=== Direct I/O vs Buffered 顺序写 ==="
|
||||
printf "%-15s %-15s %-15s\n" "Mode" "BW" "CPU(sys%)"
|
||||
|
||||
# Buffered write
|
||||
local testfile="$TmpDir/buf_write.dat"
|
||||
local log="$TmpDir/buf_write.log"
|
||||
fio --name=buf_write --filename="$testfile" --direct=0 \
|
||||
--rw=write --bs=64k --size=128M --numjobs=1 --iodepth=8 \
|
||||
--ioengine=sync --runtime=15 2>&1 | tee "$log"
|
||||
local bw1 cpu1
|
||||
bw1=$(grep "WRITE:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
cpu1=$(grep "cpu " "$log" | grep -oP 'sys=\K[\d.]+%' | head -1)
|
||||
printf "%-15s %-15s %-15s\n" "Buffered" "${bw1:-N/A}" "${cpu1:-N/A}"
|
||||
rm -f "$testfile"
|
||||
|
||||
# Direct write
|
||||
_fioDropCaches
|
||||
local testfile="$TmpDir/dir_write.dat"
|
||||
local log="$TmpDir/dir_write.log"
|
||||
fio --name=dir_write --filename="$testfile" --direct=1 \
|
||||
--rw=write --bs=64k --size=128M --numjobs=1 --iodepth=8 \
|
||||
--ioengine=libaio --runtime=15 2>&1 | tee "$log"
|
||||
local bw2 cpu2
|
||||
bw2=$(grep "WRITE:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
cpu2=$(grep "cpu " "$log" | grep -oP 'sys=\K[\d.]+%' | head -1)
|
||||
printf "%-15s %-15s %-15s\n" "Direct" "${bw2:-N/A}" "${cpu2:-N/A}"
|
||||
|
||||
rlPass "缓存写行为对比完成"
|
||||
rm -f "$testfile"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip fio benchmark"
|
||||
else
|
||||
rlRun "fio --name=cache_behavior --filename=$WORKDIR/fio_cache.dat --rw=read --bs=4k --size=64M --numjobs=1 --time_based --runtime=10 --direct=0 --group_reporting --output='$OUT' --output-format=json" 0 "run fio fio_cache_behavior"
|
||||
rlRun "test -s '$OUT'" 0 "fio output exists"
|
||||
rlRun "grep -qE '"jobs"|jobs|read|write|iops|bw' '$OUT'" 0 "fio output parseable"
|
||||
rlLog "===== fio output head ====="
|
||||
head -80 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - fio - 并发扩展性
|
||||
test: ./test.sh
|
||||
tag: [performance, fio]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/fio/test_fio_concurrency_scaling
|
||||
require: [fio, beakerlib]
|
||||
|
||||
@@ -1,73 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Performance: fio - 并发扩展性: 测量 OS I/O 栈在多并发下的吞吐扩展能力
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
fioSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir fio_concurrency_scaling)"
|
||||
OUT="$WORKDIR/fio_concurrency_scaling.json"
|
||||
NCPU="$(get_ncpu)"
|
||||
|
||||
rlPhaseStartTest "随机读并发扩展 (numjobs 递增)"
|
||||
local testfile="$TmpDir/scale.dat"
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=512 2>/dev/null
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "NCPU=$NCPU"
|
||||
|
||||
echo ""
|
||||
echo "=== 随机读并发扩展 BS=4K iodepth=16 ==="
|
||||
printf "%-12s %-15s %-15s\n" "NumJobs" "IOPS" "BW"
|
||||
|
||||
for nj in 1 2 4 8; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/scale_nj${nj}.log"
|
||||
fio --name=scale_nj${nj} --filename="$testfile" --direct=1 \
|
||||
--rw=randread --bs=4k --size=128M --numjobs=$nj --iodepth=16 \
|
||||
--ioengine=libaio --runtime=20 --thread --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
local iops bw
|
||||
iops=$(grep "read:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
bw=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
printf "%-12s %-15s %-15s\n" "$nj" "${iops:-N/A}" "${bw:-N/A}"
|
||||
done
|
||||
|
||||
# 验证 8 jobs 的 IOPS > 1 job 的 IOPS (扩展性)
|
||||
local iops1 iops8
|
||||
iops1=$(grep "read:" "$TmpDir/scale_nj1.log" | grep -oP 'IOPS=\K[\d.]+' | head -1)
|
||||
iops8=$(grep "read:" "$TmpDir/scale_nj8.log" | grep -oP 'IOPS=\K[\d.]+' | head -1)
|
||||
if [ -n "$iops1" ] && [ -n "$iops8" ]; then
|
||||
rlLogInfo "1→8 jobs: IOPS ${iops1} → ${iops8}"
|
||||
if ! command -v fio >/dev/null 2>&1; then
|
||||
rlLogWarning "fio not installed; install fio or skip-compatible"
|
||||
rlRun "true" 0 "fio unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
fio --version || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
rlPass "并发扩展性分析完成"
|
||||
rm -f "$testfile"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "顺序读并发扩展"
|
||||
local testfile="$TmpDir/scale_seq.dat"
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=512 2>/dev/null
|
||||
|
||||
echo ""
|
||||
echo "=== 顺序读并发扩展 BS=64K ==="
|
||||
printf "%-12s %-15s %-15s\n" "NumJobs" "BW" "CPU%"
|
||||
|
||||
for nj in 1 2 4 8; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/scale_seq_nj${nj}.log"
|
||||
fio --name=scale_seq_nj${nj} --filename="$testfile" --direct=1 \
|
||||
--rw=read --bs=64k --size=256M --numjobs=$nj --iodepth=8 \
|
||||
--ioengine=libaio --runtime=15 --thread --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
local bw cpu
|
||||
bw=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
cpu=$(grep "cpu " "$log" | grep -oP 'sys=\K[\d.]+%' | head -1)
|
||||
printf "%-12s %-15s %-15s\n" "$nj" "${bw:-N/A}" "${cpu:-N/A}"
|
||||
done
|
||||
rlPass "顺序并发扩展分析完成"
|
||||
rm -f "$testfile"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip fio benchmark"
|
||||
else
|
||||
rlRun "fio --name=concurrency_scaling --filename=$WORKDIR/fio_concurrency.dat --rw=randread --bs=4k --size=64M --numjobs=$NCPU --time_based --runtime=10 --direct=1 --group_reporting --output='$OUT' --output-format=json" 0 "run fio fio_concurrency_scaling"
|
||||
rlRun "test -s '$OUT'" 0 "fio output exists"
|
||||
rlRun "grep -qE '"jobs"|jobs|read|write|iops|bw' '$OUT'" 0 "fio output parseable"
|
||||
rlLog "===== fio output head ====="
|
||||
head -80 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - fio - 延迟分析 (队列深度 vs 块大小)
|
||||
test: ./test.sh
|
||||
tag: [performance, fio]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/fio/test_fio_latency_profile
|
||||
require: [fio, beakerlib]
|
||||
|
||||
@@ -1,61 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Performance: fio - 延迟分析: 测量 OS 在不同 I/O 深度下的响应延迟
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
fioSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
local testfile="$TmpDir/latency.dat"
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=256 2>/dev/null
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir fio_latency_profile)"
|
||||
OUT="$WORKDIR/fio_latency_profile.json"
|
||||
NCPU="$(get_ncpu)"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "NCPU=$NCPU"
|
||||
|
||||
if ! command -v fio >/dev/null 2>&1; then
|
||||
rlLogWarning "fio not installed; install fio or skip-compatible"
|
||||
rlRun "true" 0 "fio unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
fio --version || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "延迟 vs 队列深度 (随机读 4K)"
|
||||
echo ""
|
||||
echo "=== 延迟 vs 队列深度 (BS=4K, randread) ==="
|
||||
printf "%-10s %-12s %-12s %-12s\n" "QDepth" "Avg(us)" "P50(us)" "P99(us)"
|
||||
|
||||
for qd in 1 4 16 32; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/lat_qd${qd}.log"
|
||||
fio --name=lat_qd${qd} --filename="$testfile" --direct=1 \
|
||||
--rw=randread --bs=4k --size=64M --numjobs=1 --iodepth=$qd \
|
||||
--ioengine=libaio --runtime=15 --thread 2>&1 | tee "$log"
|
||||
|
||||
local avg p50 p99
|
||||
avg=$(grep -A1 "lat (" "$log" | grep -oP 'avg=\K[\d.]+' | head -1)
|
||||
p50=$(grep "clat percentiles" "$log" -A20 | grep "50.00th" | grep -oP '\[\s*\K\d+' | head -1)
|
||||
p99=$(grep "clat percentiles" "$log" -A20 | grep "99.00th" | grep -oP '\[\s*\K\d+' | head -1)
|
||||
printf "%-10s %-12s %-12s %-12s\n" "$qd" "${avg:-N/A}" "${p50:-N/A}" "${p99:-N/A}"
|
||||
done
|
||||
rlPass "延迟vs队列深度分析完成"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip fio benchmark"
|
||||
else
|
||||
rlRun "fio --name=latency_profile --filename=$WORKDIR/fio_latency.dat --rw=randread --bs=4k --size=64M --numjobs=1 --time_based --runtime=10 --direct=1 --group_reporting --output='$OUT' --output-format=json" 0 "run fio fio_latency_profile"
|
||||
rlRun "test -s '$OUT'" 0 "fio output exists"
|
||||
rlRun "grep -qE '"jobs"|jobs|read|write|iops|bw' '$OUT'" 0 "fio output parseable"
|
||||
rlLog "===== fio output head ====="
|
||||
head -80 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "延迟 vs 块大小 (固定 iodepth=16)"
|
||||
echo ""
|
||||
echo "=== 延迟 vs 块大小 (iodepth=16, randread) ==="
|
||||
printf "%-10s %-12s %-12s\n" "BS(K)" "Avg(us)" "IOPS"
|
||||
|
||||
for bs in 4 16 32 64; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/lat_bs${bs}k.log"
|
||||
fio --name=lat_bs${bs}k --filename="$testfile" --direct=1 \
|
||||
--rw=randread --bs=${bs}k --size=64M --numjobs=1 --iodepth=16 \
|
||||
--ioengine=libaio --runtime=10 --thread 2>&1 | tee "$log"
|
||||
|
||||
local avg iops
|
||||
avg=$(grep -A1 "lat (" "$log" | grep -oP 'avg=\K[\d.]+' | head -1)
|
||||
iops=$(grep "read:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
printf "%-10s %-12s %-12s\n" "$bs" "${avg:-N/A}" "${iops:-N/A}"
|
||||
done
|
||||
rlPass "延迟vs块大小分析完成"
|
||||
rm -f "$testfile"
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - fio - 混合读写负载 (数据库模拟)
|
||||
test: ./test.sh
|
||||
tag: [performance, fio]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/fio/test_fio_mixed_workload
|
||||
require: [fio, beakerlib]
|
||||
|
||||
@@ -1,82 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Performance: fio - 混合读写负载: 模拟数据库/应用场景的随机混合 IO
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
fioSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir fio_mixed_workload)"
|
||||
OUT="$WORKDIR/fio_mixed_workload.json"
|
||||
NCPU="$(get_ncpu)"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "NCPU=$NCPU"
|
||||
|
||||
if ! command -v fio >/dev/null 2>&1; then
|
||||
rlLogWarning "fio not installed; install fio or skip-compatible"
|
||||
rlRun "true" 0 "fio unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
fio --version || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "数据库负载 (70R/30W, BS=8K)"
|
||||
local testfile="$TmpDir/db_workload.dat"
|
||||
local log="$TmpDir/db_randrw.log"
|
||||
|
||||
rlLogInfo "=== 数据库混合负载: 70%读 30%写, BS=8K, 8jobs, iodepth=16 ==="
|
||||
_fioDropCaches
|
||||
fio --name=db_mixed --filename="$testfile" --direct=1 \
|
||||
--rw=randrw --rwmixread=70 --bs=8k --size=256M \
|
||||
--numjobs=8 --iodepth=16 --ioengine=libaio \
|
||||
--runtime=60 --thread --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
echo ""
|
||||
echo "=== 数据库负载结果 ==="
|
||||
cat "$log"
|
||||
_fioParseResult "$log"
|
||||
|
||||
# 检查读写都有有效数据
|
||||
grep -q "read:" "$log" && rlPass "读数据有效"
|
||||
grep -q "write:" "$log" && rlPass "写数据有效"
|
||||
rm -f "$testfile"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip fio benchmark"
|
||||
else
|
||||
rlRun "fio --name=mixed_workload --filename=$WORKDIR/fio_mixed.dat --rw=randrw --rwmixread=70 --bs=4k --size=64M --numjobs=1 --time_based --runtime=10 --direct=1 --group_reporting --output='$OUT' --output-format=json" 0 "run fio fio_mixed_workload"
|
||||
rlRun "test -s '$OUT'" 0 "fio output exists"
|
||||
rlRun "grep -qE '"jobs"|jobs|read|write|iops|bw' '$OUT'" 0 "fio output parseable"
|
||||
rlLog "===== fio output head ====="
|
||||
head -80 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Web 服务器负载 (80R/20W, BS=4K)"
|
||||
local testfile="$TmpDir/web_workload.dat"
|
||||
local log="$TmpDir/web_randrw.log"
|
||||
|
||||
rlLogInfo "=== Web 服务器负载: 80%读 20%写, BS=4K, 4jobs ==="
|
||||
_fioDropCaches
|
||||
fio --name=web_mixed --filename="$testfile" --direct=1 \
|
||||
--rw=randrw --rwmixread=80 --bs=4k --size=128M \
|
||||
--numjobs=4 --iodepth=32 --ioengine=libaio \
|
||||
--runtime=30 --thread --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
echo ""
|
||||
echo "=== Web 负载结果 ==="
|
||||
cat "$log"
|
||||
_fioParseResult "$log"
|
||||
rm -f "$testfile"
|
||||
rlPass "混合负载测试完成"
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "读写比变化对比 (50/50, 70/30, 90/10)"
|
||||
echo ""
|
||||
echo "=== 读写比 vs 总吞吐 ==="
|
||||
printf "%-10s %-15s %-15s %-15s\n" "R/W比" "Read IOPS" "Write IOPS" "Total BW"
|
||||
|
||||
for ratio in 50 70 90; do
|
||||
local testfile="$TmpDir/rw${ratio}.dat"
|
||||
local log="$TmpDir/rw${ratio}.log"
|
||||
_fioDropCaches
|
||||
fio --name=rw${ratio} --filename="$testfile" --direct=1 \
|
||||
--rw=randrw --rwmixread=$ratio --bs=8k --size=64M \
|
||||
--numjobs=4 --iodepth=16 --ioengine=libaio \
|
||||
--runtime=15 --thread --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
local riops wiop bw
|
||||
riops=$(grep "read:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
wiop=$(grep "write:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
bw=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
printf "%-10s %-15s %-15s %-15s\n" "${ratio}/$((100-ratio))" "${riops:-N/A}" "${wiop:-N/A}" "${bw:-N/A}"
|
||||
rm -f "$testfile"
|
||||
done
|
||||
rlPass "读写比对比完成"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - fio - 随机 I/O IOPS
|
||||
test: ./test.sh
|
||||
tag: [performance, fio]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/fio/test_fio_random_iops
|
||||
require: [fio, beakerlib]
|
||||
|
||||
@@ -1,56 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Performance: fio - 随机 I/O IOPS: 测量 OS 在随机访问模式下的 IOPS 能力
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
fioSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "进入临时目录"
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir fio_random_iops)"
|
||||
OUT="$WORKDIR/fio_random_iops.json"
|
||||
NCPU="$(get_ncpu)"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "NCPU=$NCPU"
|
||||
|
||||
if ! command -v fio >/dev/null 2>&1; then
|
||||
rlLogWarning "fio not installed; install fio or skip-compatible"
|
||||
rlRun "true" 0 "fio unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
fio --version || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "随机读 IOPS (不同块大小)"
|
||||
local testfile="$TmpDir/randread.dat"
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=256 2>/dev/null
|
||||
|
||||
for bs in 4 16 32 64; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/randread_${bs}k.log"
|
||||
rlLogInfo "=== 随机读 BS=${bs}K ==="
|
||||
fio --name=randread_${bs}k --filename="$testfile" --direct=1 \
|
||||
--rw=randread --bs=${bs}k --size=128M --numjobs=4 --iodepth=16 \
|
||||
--ioengine=libaio --runtime=20 --thread --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
local iops bw
|
||||
iops=$(grep "read:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
bw=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
echo " BS=${bs}K: IOPS=${iops}, BW=${bw}"
|
||||
if [ -n "$iops" ]; then rlPass "随机读 BS=${bs}K: IOPS=${iops}"; fi
|
||||
done
|
||||
rm -f "$testfile"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip fio benchmark"
|
||||
else
|
||||
rlRun "fio --name=random_iops --filename=$WORKDIR/fio_random.dat --rw=randread --bs=4k --size=64M --numjobs=1 --time_based --runtime=10 --direct=1 --group_reporting --output='$OUT' --output-format=json" 0 "run fio fio_random_iops"
|
||||
rlRun "test -s '$OUT'" 0 "fio output exists"
|
||||
rlRun "grep -qE '"jobs"|jobs|read|write|iops|bw' '$OUT'" 0 "fio output parseable"
|
||||
rlLog "===== fio output head ====="
|
||||
head -80 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "随机写 IOPS (不同块大小)"
|
||||
for bs in 4 16 32 64; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/randwrite_${bs}k.log"
|
||||
rlLogInfo "=== 随机写 BS=${bs}K ==="
|
||||
fio --name=randwrite_${bs}k --filename="$TmpDir/randwrite_${bs}k.dat" --direct=1 \
|
||||
--rw=randwrite --bs=${bs}k --size=128M --numjobs=4 --iodepth=16 \
|
||||
--ioengine=libaio --runtime=20 --thread --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
local iops bw
|
||||
iops=$(grep "write:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
bw=$(grep "WRITE:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
echo " BS=${bs}K: IOPS=${iops}, BW=${bw}"
|
||||
if [ -n "$iops" ]; then rlPass "随机写 BS=${bs}K: IOPS=${iops}"; fi
|
||||
rm -f "$TmpDir/randwrite_${bs}k.dat"
|
||||
done
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - fio - 顺序读写吞吐量
|
||||
test: ./test.sh
|
||||
tag: [performance, fio]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/fio/test_fio_sequential_throughput
|
||||
require: [fio, beakerlib]
|
||||
|
||||
@@ -1,62 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Performance: fio - 顺序读写吞吐量: 测量 OS 在大块数据连续传输时的带宽
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
fioSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "进入临时目录"
|
||||
_fioDropCaches
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir fio_sequential_throughput)"
|
||||
OUT="$WORKDIR/fio_sequential_throughput.json"
|
||||
NCPU="$(get_ncpu)"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "NCPU=$NCPU"
|
||||
|
||||
if ! command -v fio >/dev/null 2>&1; then
|
||||
rlLogWarning "fio not installed; install fio or skip-compatible"
|
||||
rlRun "true" 0 "fio unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
fio --version || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "顺序读吞吐量 (不同块大小)"
|
||||
local testfile="$TmpDir/seq_read.dat"
|
||||
# 预创建测试文件 (512MB)
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=512 2>/dev/null
|
||||
|
||||
for bs in 64 128 256 512 1024; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/seq_read_${bs}k.log"
|
||||
rlLogInfo "=== 顺序读 BS=${bs}K ==="
|
||||
fio --name=seq_read_${bs}k --filename="$testfile" --direct=1 \
|
||||
--rw=read --bs=${bs}k --size=256M --numjobs=1 --iodepth=8 \
|
||||
--ioengine=libaio --runtime=30 --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
# 提取带宽
|
||||
local bw
|
||||
bw=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
if [ -n "$bw" ]; then
|
||||
echo " BS=${bs}K: BW=${bw}"
|
||||
rlPass "顺序读 BS=${bs}K: ${bw}"
|
||||
fi
|
||||
done
|
||||
rm -f "$testfile"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip fio benchmark"
|
||||
else
|
||||
rlRun "fio --name=sequential_throughput --filename=$WORKDIR/fio_seq.dat --rw=readwrite --bs=1M --size=128M --numjobs=1 --time_based --runtime=10 --direct=1 --group_reporting --output='$OUT' --output-format=json" 0 "run fio fio_sequential_throughput"
|
||||
rlRun "test -s '$OUT'" 0 "fio output exists"
|
||||
rlRun "grep -qE '"jobs"|jobs|read|write|iops|bw' '$OUT'" 0 "fio output parseable"
|
||||
rlLog "===== fio output head ====="
|
||||
head -80 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "顺序写吞吐量 (不同块大小)"
|
||||
_fioDropCaches
|
||||
for bs in 64 128 256 512 1024; do
|
||||
_fioDropCaches
|
||||
local log="$TmpDir/seq_write_${bs}k.log"
|
||||
rlLogInfo "=== 顺序写 BS=${bs}K ==="
|
||||
fio --name=seq_write_${bs}k --filename="$TmpDir/seq_write_${bs}k.dat" --direct=1 \
|
||||
--rw=write --bs=${bs}k --size=256M --numjobs=1 --iodepth=8 \
|
||||
--ioengine=libaio --runtime=30 --group_reporting 2>&1 | tee "$log"
|
||||
|
||||
local bw
|
||||
bw=$(grep "WRITE:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
if [ -n "$bw" ]; then
|
||||
echo " BS=${bs}K: BW=${bw}"
|
||||
rlPass "顺序写 BS=${bs}K: ${bw}"
|
||||
fi
|
||||
rm -f "$TmpDir/seq_write_${bs}k.dat"
|
||||
done
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -2,7 +2,7 @@ summary: 性能测试 - IOzone 文件系统基准测试
|
||||
tag:
|
||||
- performance
|
||||
- iozone
|
||||
duration: 20m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/iozone
|
||||
require:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - iozone - 基础自动模式 (-a)
|
||||
test: ./test.sh
|
||||
tag: [performance, iozone]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/iozone/test_iozone_basic_auto
|
||||
require: [iozone, beakerlib]
|
||||
|
||||
@@ -1,49 +1,59 @@
|
||||
#!/bin/bash
|
||||
# Performance: iozone - 基础自动模式 (-a): 自动测试多种块大小和文件大小
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
iozoneSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "进入临时目录"
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
rlLogInfo "缓存已清理"
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir iozone_basic_auto)"
|
||||
OUT="$WORKDIR/iozone_basic_auto.log"
|
||||
TESTFILE="$WORKDIR/iozone_basic_auto.dat"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "TESTFILE=$TESTFILE"
|
||||
|
||||
if ! command -v iozone >/dev/null 2>&1; then
|
||||
rlLogWarning "iozone not installed; install iozone or skip-compatible"
|
||||
rlRun "true" 0 "iozone unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
iozone -h >/dev/null 2>&1 || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Auto Mode (-a) 小文件"
|
||||
local log="$TmpDir/iozone_auto_small.log"
|
||||
# -a: auto mode, -c: include close, 64m file
|
||||
rlRun "iozone -a -c -s 64m -r 4k -f $TmpDir/iozone_test.dat 2>&1 | tee $log" 0 "iozone -a -s 64m -r 4k"
|
||||
|
||||
echo ""
|
||||
echo "=== IOzone Auto Mode 结果 (64M, 4K) ==="
|
||||
cat "$log"
|
||||
echo "=== 输出结束 ==="
|
||||
|
||||
# 验证数据完整性
|
||||
grep -q "Auto Mode" "$log" && rlPass "Auto Mode 输出确认"
|
||||
grep -qE '^\s+[0-9]+\s+[0-9]+' "$log" && rlPass "数据行存在"
|
||||
_iozoneParseOutput "$log"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip iozone benchmark"
|
||||
else
|
||||
rlRun "iozone -a -s 64M -r 4k -i 0 -i 1 -f '$TESTFILE' > '$OUT' 2>&1" 0 "run iozone iozone_basic_auto"
|
||||
rlRun "test -s '$OUT'" 0 "iozone output exists"
|
||||
rlRun "grep -qE 'iozone|KB|reclen|write|read|random|throughput|Children' '$OUT'" 0 "iozone output parseable"
|
||||
rlLog "===== iozone output head ====="
|
||||
head -100 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Auto Mode (-a) 中等文件"
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
local log="$TmpDir/iozone_auto_medium.log"
|
||||
rlRun "iozone -a -c -s 256m -r 16k -f $TmpDir/iozone_test2.dat 2>&1 | tee $log" 0 "iozone -a -s 256m -r 16k"
|
||||
|
||||
echo ""
|
||||
echo "=== IOzone Auto Mode 结果 (256M, 16K) ==="
|
||||
cat "$log"
|
||||
echo "=== 输出结束 ==="
|
||||
|
||||
grep -qE '^\s+[0-9]+\s+[0-9]+' "$log" && rlPass "数据行存在"
|
||||
_iozoneParseOutput "$log"
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - iozone - Direct I/O 模式 (-I)
|
||||
test: ./test.sh
|
||||
tag: [performance, iozone]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/iozone/test_iozone_direct_io
|
||||
require: [iozone, beakerlib]
|
||||
|
||||
@@ -1,62 +1,61 @@
|
||||
#!/bin/bash
|
||||
# Performance: iozone - Direct I/O 模式 (-I): 绕过 Page Cache 测试裸盘性能
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
iozoneSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "进入临时目录"
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir iozone_direct_io)"
|
||||
OUT="$WORKDIR/iozone_direct_io.log"
|
||||
TESTFILE="$WORKDIR/iozone_direct_io.dat"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "TESTFILE=$TESTFILE"
|
||||
|
||||
if ! command -v iozone >/dev/null 2>&1; then
|
||||
rlLogWarning "iozone not installed; install iozone or skip-compatible"
|
||||
rlRun "true" 0 "iozone unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
iozone -h >/dev/null 2>&1 || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
|
||||
# direct I/O 对齐要求较严格;使用普通临时文件路径,iozone 自己创建测试文件。
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Direct I/O vs Normal 对比"
|
||||
local testfile="$TmpDir/iozone_dio.dat"
|
||||
|
||||
# Normal IO (使用 Page Cache)
|
||||
rlLogInfo "=== 标准 I/O (使用 Page Cache) ==="
|
||||
iozone -s 64m -r 4k -i 0 -i 1 -f "$testfile" 2>&1 | tee /tmp/iozone_normal.txt
|
||||
echo "--- 标准 I/O 结果 ---"
|
||||
cat /tmp/iozone_normal.txt
|
||||
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
rm -f "$testfile"
|
||||
|
||||
# Direct IO (绕过 Page Cache)
|
||||
rlLogInfo "=== Direct I/O (绕过 Page Cache, -I) ==="
|
||||
iozone -I -s 64m -r 4k -i 0 -i 1 -f "$testfile" 2>&1 | tee /tmp/iozone_direct.txt
|
||||
echo "--- Direct I/O 结果 ---"
|
||||
cat /tmp/iozone_direct.txt
|
||||
|
||||
# 验证两者都有输出
|
||||
grep -qE '^\s+[0-9]+\s+[0-9]+' /tmp/iozone_normal.txt && rlPass "标准 I/O: 数据行存在"
|
||||
grep -qE '^\s+[0-9]+\s+[0-9]+' /tmp/iozone_direct.txt && rlPass "Direct I/O: 数据行存在"
|
||||
|
||||
# 对比分析
|
||||
local normal_write
|
||||
normal_write=$(grep -E '^\s+[0-9]+\s+[0-9]+' /tmp/iozone_normal.txt | awk '{print $3}' | head -1)
|
||||
local direct_write
|
||||
direct_write=$(grep -E '^\s+[0-9]+\s+[0-9]+' /tmp/iozone_direct.txt | awk '{print $3}' | head -1)
|
||||
|
||||
rlLogInfo "标准 I/O Write: ${normal_write} KB/s"
|
||||
rlLogInfo "Direct I/O Write: ${direct_write} KB/s"
|
||||
|
||||
if [ -n "$normal_write" ] && [ -n "$direct_write" ]; then
|
||||
# Direct I/O 通常更慢(绕过缓存), 但不应该为 0
|
||||
if [ "$direct_write" != "0" ] && [ "$direct_write" != "" ]; then
|
||||
rlPass "Direct I/O 产生有效吞吐量: ${direct_write} KB/s"
|
||||
else
|
||||
rlLogWarning "Direct I/O 吞吐量为 0(可能 -I 不支持当前文件系统)"
|
||||
fi
|
||||
# 标准 I/O 应该比 Direct I/O 快(有缓存)
|
||||
rlLogInfo "缓存加速比: $(awk "BEGIN {printf \"%.1f\", ${normal_write}/${direct_write}}" 2>/dev/null || echo N/A)x"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip iozone benchmark"
|
||||
else
|
||||
rlRun "iozone -I -s 64M -r 4k -i 0 -i 1 -f '$TESTFILE' > '$OUT' 2>&1" 0 "run iozone iozone_direct_io"
|
||||
rlRun "test -s '$OUT'" 0 "iozone output exists"
|
||||
rlRun "grep -qE 'iozone|KB|reclen|write|read|random|throughput|Children' '$OUT'" 0 "iozone output parseable"
|
||||
rlLog "===== iozone output head ====="
|
||||
head -100 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rm -f /tmp/iozone_{normal,direct}.txt
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - iozone - 多文件大小测试
|
||||
test: ./test.sh
|
||||
tag: [performance, iozone]
|
||||
duration: 10m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/iozone/test_iozone_multi_size
|
||||
require: [iozone, beakerlib]
|
||||
|
||||
@@ -1,61 +1,59 @@
|
||||
#!/bin/bash
|
||||
# Performance: iozone - 多文件大小测试 (文档推荐: 1/2x, 1x, 2x 内存)
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
iozoneSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "进入临时目录"
|
||||
# 获取内存大小 (MB)
|
||||
TOTAL_MEM_MB=$(free -m | awk '/^Mem:/{print $2}')
|
||||
rlLogInfo "系统内存: ${TOTAL_MEM_MB} MB"
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir iozone_multi_size)"
|
||||
OUT="$WORKDIR/iozone_multi_size.log"
|
||||
TESTFILE="$WORKDIR/iozone_multi_size.dat"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "TESTFILE=$TESTFILE"
|
||||
|
||||
if ! command -v iozone >/dev/null 2>&1; then
|
||||
rlLogWarning "iozone not installed; install iozone or skip-compatible"
|
||||
rlRun "true" 0 "iozone unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
iozone -h >/dev/null 2>&1 || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "多文件大小测试"
|
||||
local sizes="64 128 256 512"
|
||||
local throughputs=()
|
||||
|
||||
for sz in $sizes; do
|
||||
local testfile="$TmpDir/iozone_${sz}m.dat"
|
||||
local log="$TmpDir/iozone_${sz}m.log"
|
||||
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
rlLogInfo "=== 测试文件大小: ${sz}M ==="
|
||||
|
||||
iozone -c -s ${sz}m -r 16k -f "$testfile" 2>&1 | tee "$log"
|
||||
|
||||
echo ""
|
||||
echo "--- IOzone ${sz}M 结果 ---"
|
||||
cat "$log"
|
||||
|
||||
# 提取 write 吞吐量
|
||||
local write_kbps
|
||||
write_kbps=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $3}' | head -1)
|
||||
if [ -n "$write_kbps" ] && [ "$write_kbps" != "0" ]; then
|
||||
throughputs+=("${sz}M:${write_kbps}")
|
||||
rlLogInfo "${sz}M Write: ${write_kbps} KB/s"
|
||||
fi
|
||||
|
||||
rm -f "$testfile"
|
||||
done
|
||||
|
||||
# 汇总
|
||||
echo ""
|
||||
echo "=== 多尺寸测试汇总 ==="
|
||||
for t in "${throughputs[@]}"; do
|
||||
echo " $t KB/s"
|
||||
done
|
||||
if [ ${#throughputs[@]} -gt 0 ]; then
|
||||
rlPass "多尺寸测试完成 (${#throughputs[@]}/4 个有效结果)"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip iozone benchmark"
|
||||
else
|
||||
rlFail "未能获取有效数据"
|
||||
rlRun "iozone -a -g 64M -n 16M -r 4k -i 0 -i 1 -f '$TESTFILE' > '$OUT' 2>&1" 0 "run iozone iozone_multi_size"
|
||||
rlRun "test -s '$OUT'" 0 "iozone output exists"
|
||||
rlRun "grep -qE 'iozone|KB|reclen|write|read|random|throughput|Children' '$OUT'" 0 "iozone output parseable"
|
||||
rlLog "===== iozone output head ====="
|
||||
head -100 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - iozone - 记录大小对 I/O 吞吐影响分析
|
||||
test: ./test.sh
|
||||
tag: [performance, iozone]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/iozone/test_iozone_record_profiling
|
||||
require: [iozone, beakerlib]
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
#!/bin/bash
|
||||
# Performance: iozone - 输出解析: 分析各类 I/O 操作性能
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
iozoneSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "进入临时目录"
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir iozone_record_profiling)"
|
||||
OUT="$WORKDIR/iozone_record_profiling.log"
|
||||
TESTFILE="$WORKDIR/iozone_record_profiling.dat"
|
||||
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "TESTFILE=$TESTFILE"
|
||||
|
||||
if ! command -v iozone >/dev/null 2>&1; then
|
||||
rlLogWarning "iozone not installed; install iozone or skip-compatible"
|
||||
rlRun "true" 0 "iozone unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
iozone -h >/dev/null 2>&1 || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "全模式 I/O 测试"
|
||||
local testfile="$TmpDir/iozone_full.dat"
|
||||
local log="$TmpDir/iozone_full.log"
|
||||
|
||||
# -i 0=write/rewrite, 1=read/reread, 2=random-read/write
|
||||
rlRun "iozone -c -s 128m -r 8k -i 0 -i 1 -i 2 -f $testfile 2>&1 | tee $log" 0 "全模式测试 (-i 0 -i 1 -i 2)"
|
||||
|
||||
echo ""
|
||||
echo "=== IOzone 全模式输出 ==="
|
||||
cat "$log"
|
||||
echo "=== 输出结束 ==="
|
||||
echo ""
|
||||
|
||||
# 解析各操作吞吐量
|
||||
_iozoneParseOutput "$log"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip iozone benchmark"
|
||||
else
|
||||
rlRun "iozone -s 64M -r 4k -i 0 -i 1 -f '$TESTFILE' > '$OUT' 2>&1" 0 "run iozone iozone_record_profiling"
|
||||
rlRun "test -s '$OUT'" 0 "iozone output exists"
|
||||
rlRun "grep -qE 'iozone|KB|reclen|write|read|random|throughput|Children' '$OUT'" 0 "iozone output parseable"
|
||||
rlLog "===== iozone output head ====="
|
||||
head -100 "$OUT" || true
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "不同记录大小对比"
|
||||
local rec_sizes="4 16 64 256 1024"
|
||||
echo ""
|
||||
echo "=== 记录大小 vs 吞吐量 ==="
|
||||
printf "%-10s %-15s %-15s\n" "记录(K)" "Write(KB/s)" "Read(KB/s)"
|
||||
|
||||
for rs in $rec_sizes; do
|
||||
local testfile="$TmpDir/iozone_r${rs}k.dat"
|
||||
local log="$TmpDir/iozone_r${rs}k.log"
|
||||
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
iozone -c -s 64m -r ${rs}k -i 0 -i 1 -f "$testfile" 2>&1 | tee "$log"
|
||||
|
||||
local w r
|
||||
w=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $3}' | head -1)
|
||||
r=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $5}' | head -1)
|
||||
printf "%-10s %-15s %-15s\n" "$rs" "${w:-N/A}" "${r:-N/A}"
|
||||
|
||||
rm -f "$testfile"
|
||||
done
|
||||
|
||||
rlPass "记录大小对比完成"
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: 性能测试 - iozone - 顺序读写吞吐量基准
|
||||
test: ./test.sh
|
||||
tag: [performance, iozone]
|
||||
duration: 5m
|
||||
duration: 30m
|
||||
tier: 2
|
||||
path: /tests/performance/iozone/test_iozone_sequential_throughput
|
||||
require: [iozone, beakerlib]
|
||||
|
||||
@@ -1,93 +1,59 @@
|
||||
#!/bin/bash
|
||||
# Performance: iozone - 顺序读写吞吐量基准
|
||||
# 测量操作系统 IO 栈在纯顺序读写场景下的吞吐能力
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
get_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
print_os_info() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
make_workdir() {
|
||||
mktemp -d "/var/tmp/${1:-perf}.XXXXXX"
|
||||
}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "环境准备"
|
||||
iozoneSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "进入临时目录"
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
rlPhaseEnd
|
||||
rlPhaseStartSetup
|
||||
WORKDIR="$(make_workdir iozone_sequential_throughput)"
|
||||
OUT="$WORKDIR/iozone_sequential_throughput.log"
|
||||
TESTFILE="$WORKDIR/iozone_sequential_throughput.dat"
|
||||
|
||||
rlPhaseStartTest "顺序写吞吐量"
|
||||
local testfile="$TmpDir/seq_write.dat"
|
||||
local log="$TmpDir/seq_write.log"
|
||||
print_os_info
|
||||
rlLog "WORKDIR=$WORKDIR"
|
||||
rlLog "TESTFILE=$TESTFILE"
|
||||
|
||||
# 只用写操作 (-i 0),固定记录大小,测试大文件顺序写
|
||||
iozone -c -s 256m -r 64k -i 0 -f "$testfile" 2>&1 | tee "$log"
|
||||
|
||||
echo ""
|
||||
echo "=== 顺序写结果 (256M, 64K record) ==="
|
||||
cat "$log"
|
||||
|
||||
local write_kbps
|
||||
write_kbps=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $3}' | head -1)
|
||||
if [ -n "$write_kbps" ] && [ "$write_kbps" != "0" ]; then
|
||||
local write_mbps
|
||||
write_mbps=$(awk "BEGIN {printf \"%.1f\", ${write_kbps}/1024}" 2>/dev/null)
|
||||
rlLogInfo "顺序写吞吐量: ${write_mbps} MB/s (${write_kbps} KB/s)"
|
||||
rlPass "顺序写: ${write_mbps} MB/s"
|
||||
if ! command -v iozone >/dev/null 2>&1; then
|
||||
rlLogWarning "iozone not installed; install iozone or skip-compatible"
|
||||
rlRun "true" 0 "iozone unavailable; compatible skip"
|
||||
SKIP_BENCH=1
|
||||
else
|
||||
rlFail "未获取到顺序写数据"
|
||||
iozone -h >/dev/null 2>&1 || true
|
||||
SKIP_BENCH=0
|
||||
fi
|
||||
rm -f "$testfile"
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "顺序读吞吐量"
|
||||
# 先写一个大文件,再测顺序读
|
||||
local testfile="$TmpDir/seq_read.dat"
|
||||
local log="$TmpDir/seq_read.log"
|
||||
|
||||
# 预写文件
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=256 2>/dev/null
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
|
||||
# 只用读操作 (-i 1)
|
||||
iozone -c -s 256m -r 64k -i 1 -f "$testfile" 2>&1 | tee "$log"
|
||||
|
||||
echo ""
|
||||
echo "=== 顺序读结果 (256M, 64K record) ==="
|
||||
cat "$log"
|
||||
|
||||
local read_kbps
|
||||
read_kbps=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $5}' | head -1)
|
||||
if [ -n "$read_kbps" ] && [ "$read_kbps" != "0" ]; then
|
||||
local read_mbps
|
||||
read_mbps=$(awk "BEGIN {printf \"%.1f\", ${read_kbps}/1024}" 2>/dev/null)
|
||||
rlLogInfo "顺序读吞吐量: ${read_mbps} MB/s (${read_kbps} KB/s)"
|
||||
rlPass "顺序读: ${read_mbps} MB/s"
|
||||
rlPhaseStartTest
|
||||
if [ "$SKIP_BENCH" = 1 ]; then
|
||||
rlRun "true" 0 "skip iozone benchmark"
|
||||
else
|
||||
rlFail "未获取到顺序读数据"
|
||||
rlRun "iozone -s 128M -r 1M -i 0 -i 1 -f '$TESTFILE' > '$OUT' 2>&1" 0 "run iozone iozone_sequential_throughput"
|
||||
rlRun "test -s '$OUT'" 0 "iozone output exists"
|
||||
rlRun "grep -qE 'iozone|KB|reclen|write|read|random|throughput|Children' '$OUT'" 0 "iozone output parseable"
|
||||
rlLog "===== iozone output head ====="
|
||||
head -100 "$OUT" || true
|
||||
fi
|
||||
rm -f "$testfile"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "读写比分析"
|
||||
# 同时测读写,观察读写吞吐比例
|
||||
local testfile="$TmpDir/rw_ratio.dat"
|
||||
local log="$TmpDir/rw_ratio.log"
|
||||
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
iozone -c -s 128m -r 64k -i 0 -i 1 -f "$testfile" 2>&1 | tee "$log"
|
||||
|
||||
local w r
|
||||
w=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $3}' | head -1)
|
||||
r=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $5}' | head -1)
|
||||
|
||||
if [ -n "$w" ] && [ -n "$r" ] && [ "$w" != "0" ]; then
|
||||
local ratio
|
||||
ratio=$(awk "BEGIN {printf \"%.2f\", ${r}/${w}}" 2>/dev/null)
|
||||
rlLogInfo "读/写吞吐比: ${ratio}x (读=${r} 写=${w} KB/s)"
|
||||
fi
|
||||
rlPass "读写比分析完成"
|
||||
rm -f "$testfile"
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf '$WORKDIR'" 0 "cleanup"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "清理"
|
||||
rlRun "cd /" 0 ""; [ -n "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 ""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Performance: lmbench - 通信: Pipe/TCP/UDP 本地通信延迟
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi-autotest compatibility guard
|
||||
get_openruyi_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
get_openruyi_tmpdir() {
|
||||
local prefix="${1:-openruyi-perf}"
|
||||
mktemp -d "/var/tmp/${prefix}.XXXXXX"
|
||||
}
|
||||
|
||||
get_openruyi_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || get_openruyi_os_release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Performance: lmbench - 文件系统: 文件创建/删除, mmap, 页面错误延迟
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi-autotest compatibility guard
|
||||
get_openruyi_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
get_openruyi_tmpdir() {
|
||||
local prefix="${1:-openruyi-perf}"
|
||||
mktemp -d "/var/tmp/${prefix}.XXXXXX"
|
||||
}
|
||||
|
||||
get_openruyi_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || get_openruyi_os_release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Performance: lmbench - 进程: fork/exec 延迟, 上下文切换开销
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi-autotest compatibility guard
|
||||
get_openruyi_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
get_openruyi_tmpdir() {
|
||||
local prefix="${1:-openruyi-perf}"
|
||||
mktemp -d "/var/tmp/${prefix}.XXXXXX"
|
||||
}
|
||||
|
||||
get_openruyi_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || get_openruyi_os_release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Performance: lmbench - 处理器与内存延迟: CPU操作开销 + 内存访问延迟
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi-autotest compatibility guard
|
||||
get_openruyi_ncpu() {
|
||||
local n
|
||||
n="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"
|
||||
case "$n" in
|
||||
''|*[!0-9]*) n=1 ;;
|
||||
esac
|
||||
[ "$n" -ge 1 ] 2>/dev/null || n=1
|
||||
echo "$n"
|
||||
}
|
||||
|
||||
get_openruyi_tmpdir() {
|
||||
local prefix="${1:-openruyi-perf}"
|
||||
mktemp -d "/var/tmp/${prefix}.XXXXXX"
|
||||
}
|
||||
|
||||
get_openruyi_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || get_openruyi_os_release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -3,7 +3,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_buildtest_hpc_blas
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - buildtest_hpc_blas
|
||||
# MMTests: run-mmtests.sh --config configs/config-buildtest-hpc-blas
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_buildtest_hpc_cmake
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - buildtest_hpc_cmake
|
||||
# MMTests: run-mmtests.sh --config configs/config-buildtest-hpc-cmake
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_buildtest_hpc_fftw
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - buildtest_hpc_fftw
|
||||
# MMTests: run-mmtests.sh --config configs/config-buildtest-hpc-fftw
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_buildtest_hpc_gmp
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - buildtest_hpc_gmp
|
||||
# MMTests: run-mmtests.sh --config configs/config-buildtest-hpc-gmp
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_buildtest_hpc_metis
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - buildtest_hpc_metis
|
||||
# MMTests: run-mmtests.sh --config configs/config-buildtest-hpc-metis
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_buildtest_hpc_mpfr
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - buildtest_hpc_mpfr
|
||||
# MMTests: run-mmtests.sh --config configs/config-buildtest-hpc-mpfr
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_buildtest_hpc_revocap
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - buildtest_hpc_revocap
|
||||
# MMTests: run-mmtests.sh --config configs/config-buildtest-hpc-revocap
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_db_sqlite_insert_small
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - db_sqlite_insert_small
|
||||
# MMTests: run-mmtests.sh --config configs/config-db-sqlite-insert-small
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_example_tuning_sysctl
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - example_tuning_sysctl
|
||||
# MMTests: run-mmtests.sh --config configs/config-example-tuning-sysctl
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_blogbench
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_blogbench
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-blogbench
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_dbench4_async
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_dbench4_async
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-dbench4-async
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_fio_randread_direct_multi
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_fio_randread_direct_multi
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-fio-randread-direct-multi
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_fio_randread_sync_heavywrite
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_fio_randread_sync_heavywrite
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-fio-randread-sync-heavywrite
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_fio_randread_sync_randwrite
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_fio_randread_sync_randwrite
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-fio-randread-sync-randwrite
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_fio_randrw_direct_scale_iodepth
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_fio_randrw_direct_scale_iodepth
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-fio-randrw-direct-scale-iodepth
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_fio_sync_maxrandwrite
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_fio_sync_maxrandwrite
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-fio-sync-maxrandwrite
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_trunc
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - io_trunc
|
||||
# MMTests: run-mmtests.sh --config configs/config-io-trunc
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_memdb_redis_benchmark_small
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - memdb_redis_benchmark_small
|
||||
# MMTests: run-mmtests.sh --config configs/config-memdb-redis-benchmark-small
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_monitor
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - monitor
|
||||
# MMTests: run-mmtests.sh --config configs/config-monitor
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_iperf_ipv4_unbound
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_iperf_ipv4_unbound
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-iperf-ipv4-unbound
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_iperf_ipv6_unbound
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_iperf_ipv6_unbound
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-iperf-ipv6-unbound
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_netperf_rr_ipv4_unbound
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_netperf_rr_ipv4_unbound
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-netperf-rr-ipv4-unbound
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_netperf_rr_ipv6_unbound
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_netperf_rr_ipv6_unbound
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-netperf-rr-ipv6-unbound
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_netperf_stream_ipv4_unbound
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_netperf_stream_ipv4_unbound
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-netperf-stream-ipv4-unbound
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_netperf_stream_ipv6_unbound
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_netperf_stream_ipv6_unbound
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-netperf-stream-ipv6-unbound
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_netperf_unix_unbound
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_netperf_unix_unbound
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-netperf-unix-unbound
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_network_tbench
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - network_tbench
|
||||
# MMTests: run-mmtests.sh --config configs/config-network-tbench
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 180m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_pagereclaim_stutterp
|
||||
require:
|
||||
|
||||
@@ -1,9 +1,78 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
# Functional test: kernel - mmtests - pagereclaim_stutterp
|
||||
# MMTests: run-mmtests.sh --config configs/config-pagereclaim-stutterp
|
||||
# Beakerlib-based test with lifecycle management
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
|
||||
# openruyi mmtests safety guard
|
||||
openruyi_print_os_release() {
|
||||
cat /etc/os-release 2>/dev/null || cat /etc/redhat-release 2>/dev/null || uname -a
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers() {
|
||||
OPENRUYI_SAFE_BIN="${OPENRUYI_SAFE_BIN:-/var/tmp/openruyi-mmtests-safe-bin}"
|
||||
mkdir -p "$OPENRUYI_SAFE_BIN"
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf5" <<'EOF_DNF5'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf5 operation: dnf5 $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF5
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/dnf" <<'EOF_DNF'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe dnf operation: dnf $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/dnf ]; then
|
||||
exec /usr/bin/dnf "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_DNF
|
||||
|
||||
cat > "$OPENRUYI_SAFE_BIN/yum" <<'EOF_YUM'
|
||||
#!/bin/bash
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
remove|autoremove|erase)
|
||||
echo "OPENRUYI BLOCKED unsafe yum operation: yum $*" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -x /usr/bin/yum ]; then
|
||||
exec /usr/bin/yum "$@"
|
||||
fi
|
||||
exec /usr/bin/dnf5 "$@"
|
||||
EOF_YUM
|
||||
|
||||
chmod +x "$OPENRUYI_SAFE_BIN/dnf5" "$OPENRUYI_SAFE_BIN/dnf" "$OPENRUYI_SAFE_BIN/yum"
|
||||
export PATH="$OPENRUYI_SAFE_BIN:$PATH"
|
||||
|
||||
# 常见自动安装/清理逻辑的软禁用变量;即使上游不识别,也不会破坏 shell。
|
||||
export OPENRUYI_MMTESTS_SAFE_MODE=1
|
||||
export MMTESTS_OPENRUI_SAFE_MODE=1
|
||||
export MMTESTS_NO_PACKAGE_REMOVE=1
|
||||
export MMTESTS_NO_PACKAGE_CLEANUP=1
|
||||
export MMTESTS_NONINTERACTIVE=1
|
||||
}
|
||||
|
||||
openruyi_setup_safe_pkg_wrappers
|
||||
|
||||
. "$(dirname "$0")/../lib.sh"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user