forked from woqidaideshi/openruyi-autotest
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a337f204d4 | ||
|
|
9d8a140b68 | ||
|
|
1d7340e96e | ||
|
|
9f0b3f5935 | ||
|
|
fac8213444 | ||
|
|
74b4eb4ef2 | ||
|
|
1c44966f8b | ||
|
|
166498ad14 |
@@ -35,7 +35,6 @@ rlJournalStart
|
||||
rlRun "kubectl --kubeconfig=$K8S_KUBECONFIG cluster-info" 0 "Cluster API reachable"
|
||||
|
||||
# 4. All nodes Ready (expect 2)
|
||||
local node_count ready_count
|
||||
node_count=$(kubectl --kubeconfig=$K8S_KUBECONFIG get nodes --no-headers 2>/dev/null | wc -l)
|
||||
ready_count=$(kubectl --kubeconfig=$K8S_KUBECONFIG get nodes --no-headers 2>/dev/null | awk '{print $2}' | grep -c '^Ready$')
|
||||
rlLogInfo "Node count: $node_count, Ready count: $ready_count (expect $EXPECT_NODES)"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
summary: Functional test - editorconfig-core-c-devel cmake verify
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- cmake
|
||||
- editorconfig-core-c
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/cmake/test_editorconfig-core-c-devel_cmake_verify
|
||||
require:
|
||||
- editorconfig-core-c-devel
|
||||
- editorconfig-core-c-static
|
||||
- cmake
|
||||
- gcc
|
||||
- beakerlib
|
||||
- gcc-c++
|
||||
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Functional test: editorconfig-core-c-devel - cmake export integrity verification
|
||||
# Verify that all files referenced by .cmake files provided by the package actually exist
|
||||
#
|
||||
# Verification principle:
|
||||
# find_package(CONFIG) -> *Config.cmake -> *Targets.cmake
|
||||
# Targets.cmake referencing non-existent .a/.so will cause cmake configuration to fail directly
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PKG="editorconfig-core-c-devel"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "Environment Setup"
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "Enter temporary test directory"
|
||||
|
||||
CMAKE_COUNT=$(rpm -ql "$PKG" 2>/dev/null | grep -c '\.cmake$' || echo 0)
|
||||
rlLogInfo "$PKG provides $CMAKE_COUNT .cmake file(s)"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "find_package(CONFIG) - Verify cmake export integrity"
|
||||
if [ "$CMAKE_COUNT" -eq 0 ]; then
|
||||
rlLogWarning "$PKG provides no .cmake files, skipping cmake verification"
|
||||
else
|
||||
# --- find_package(EditorConfig) ---
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(EditorConfig REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(EditorConfig) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(EditorConfig CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_0"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_0" 0 \
|
||||
"cmake configuration (find_package EditorConfig CONFIG)"; then
|
||||
rlPass "find_package(EditorConfig CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(EditorConfig CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "Clean up test environment"
|
||||
rlRun "cd /" 0 "Leave test directory"
|
||||
if [ -n "$TmpDir" ] && [ -d "$TmpDir" ]; then
|
||||
rlRun "rm -rf $TmpDir" 0 "Clean up temporary test directory"
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
@@ -0,0 +1,17 @@
|
||||
summary: Functional test - fltk-devel cmake verify
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- cmake
|
||||
- fltk
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/cmake/test_fltk-devel_cmake_verify
|
||||
require:
|
||||
- fltk-devel
|
||||
- fltk-static
|
||||
- fltk-fluid
|
||||
- cmake
|
||||
- gcc
|
||||
- beakerlib
|
||||
- gcc-c++
|
||||
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Functional test: fltk-devel - cmake export integrity verification
|
||||
# Verify that all files referenced by .cmake files provided by the package actually exist
|
||||
#
|
||||
# Verification principle:
|
||||
# find_package(CONFIG) -> *Config.cmake -> *Targets.cmake
|
||||
# Targets.cmake referencing non-existent .a/.so will cause cmake configuration to fail directly
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PKG="fltk-devel"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "Environment Setup"
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "Enter temporary test directory"
|
||||
|
||||
CMAKE_COUNT=$(rpm -ql "$PKG" 2>/dev/null | grep -c '\.cmake$' || echo 0)
|
||||
rlLogInfo "$PKG provides $CMAKE_COUNT .cmake file(s)"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "find_package(CONFIG) - Verify cmake export integrity"
|
||||
if [ "$CMAKE_COUNT" -eq 0 ]; then
|
||||
rlLogWarning "$PKG provides no .cmake files, skipping cmake verification"
|
||||
else
|
||||
# --- find_package(FLTK) ---
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(FLTK REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(FLTK) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(FLTK CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_0"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_0" 0 \
|
||||
"cmake configuration (find_package FLTK CONFIG)"; then
|
||||
rlPass "find_package(FLTK CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(FLTK CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "Clean up test environment"
|
||||
rlRun "cd /" 0 "Leave test directory"
|
||||
if [ -n "$TmpDir" ] && [ -d "$TmpDir" ]; then
|
||||
rlRun "rm -rf $TmpDir" 0 "Clean up temporary test directory"
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
@@ -6,7 +6,7 @@ tag:
|
||||
- qt6-qttools
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/pkgs/cmake_batch/generated/test_qt6-qttools-devel_cmake_verify
|
||||
path: /tests/functional/cmake/test_qt6-qttools-devel_cmake_verify
|
||||
require:
|
||||
- qt6-qttools-devel
|
||||
- qt6-doctools
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
summary: Functional test - spirv-cross-devel cmake verify
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- cmake
|
||||
- spirv-cross
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/cmake/test_spirv-cross-devel_cmake_verify
|
||||
require:
|
||||
- spirv-cross-devel
|
||||
- spirv-cross-static
|
||||
- cmake
|
||||
- gcc
|
||||
- beakerlib
|
||||
- gcc-c++
|
||||
@@ -0,0 +1,247 @@
|
||||
#!/bin/bash
|
||||
# Functional test: spirv-cross-devel - cmake export integrity verification
|
||||
# Verify that all files referenced by .cmake files provided by the package actually exist
|
||||
#
|
||||
# Verification principle:
|
||||
# find_package(CONFIG) -> *Config.cmake -> *Targets.cmake
|
||||
# Targets.cmake referencing non-existent .a/.so will cause cmake configuration to fail directly
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PKG="spirv-cross-devel"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "Environment Setup"
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "Enter temporary test directory"
|
||||
|
||||
CMAKE_COUNT=$(rpm -ql "$PKG" 2>/dev/null | grep -c '\.cmake$' || echo 0)
|
||||
rlLogInfo "$PKG provides $CMAKE_COUNT .cmake file(s)"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "find_package(CONFIG) - Verify cmake export integrity"
|
||||
if [ "$CMAKE_COUNT" -eq 0 ]; then
|
||||
rlLogWarning "$PKG provides no .cmake files, skipping cmake verification"
|
||||
else
|
||||
# --- find_package(spirv_cross_c) ---
|
||||
# spirv_cross_c depends on: glsl, hlsl, msl, cpp, reflect
|
||||
# glsl/hlsl/msl/cpp depend on: core
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_core REQUIRED CONFIG)
|
||||
find_package(spirv_cross_glsl REQUIRED CONFIG)
|
||||
find_package(spirv_cross_hlsl REQUIRED CONFIG)
|
||||
find_package(spirv_cross_msl REQUIRED CONFIG)
|
||||
find_package(spirv_cross_cpp REQUIRED CONFIG)
|
||||
find_package(spirv_cross_reflect REQUIRED CONFIG)
|
||||
find_package(spirv_cross_c REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_c) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_c CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_0"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_0" 0 \
|
||||
"cmake configuration (find_package spirv_cross_c CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_c CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_c CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_c_shared) ---
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_c_shared REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_c_shared) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_c_shared CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_1"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_1" 0 \
|
||||
"cmake configuration (find_package spirv_cross_c_shared CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_c_shared CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_c_shared CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_core) ---
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_core REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_core) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_core CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_2"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_2" 0 \
|
||||
"cmake configuration (find_package spirv_cross_core CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_core CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_core CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_cpp) ---
|
||||
# spirv_cross_cpp depends on: glsl -> core
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_core REQUIRED CONFIG)
|
||||
find_package(spirv_cross_glsl REQUIRED CONFIG)
|
||||
find_package(spirv_cross_cpp REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_cpp) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_cpp CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_3"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_3" 0 \
|
||||
"cmake configuration (find_package spirv_cross_cpp CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_cpp CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_cpp CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_glsl) ---
|
||||
# spirv_cross_glsl depends on: core
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_core REQUIRED CONFIG)
|
||||
find_package(spirv_cross_glsl REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_glsl) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_glsl CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_4"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_4" 0 \
|
||||
"cmake configuration (find_package spirv_cross_glsl CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_glsl CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_glsl CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_hlsl) ---
|
||||
# spirv_cross_hlsl depends on: glsl -> core
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_core REQUIRED CONFIG)
|
||||
find_package(spirv_cross_glsl REQUIRED CONFIG)
|
||||
find_package(spirv_cross_hlsl REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_hlsl) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_hlsl CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_5"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_5" 0 \
|
||||
"cmake configuration (find_package spirv_cross_hlsl CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_hlsl CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_hlsl CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_msl) ---
|
||||
# spirv_cross_msl depends on: glsl -> core
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_core REQUIRED CONFIG)
|
||||
find_package(spirv_cross_glsl REQUIRED CONFIG)
|
||||
find_package(spirv_cross_msl REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_msl) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_msl CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_6"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_6" 0 \
|
||||
"cmake configuration (find_package spirv_cross_msl CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_msl CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_msl CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_reflect) ---
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_reflect REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_reflect) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_reflect CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_7"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_7" 0 \
|
||||
"cmake configuration (find_package spirv_cross_reflect CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_reflect CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_reflect CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
# --- find_package(spirv_cross_util) ---
|
||||
# spirv_cross_util depends on: core
|
||||
cat > "$TmpDir/CMakeLists.txt" << 'EOF'
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(cmake_verify
|
||||
VERSION "0.1"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
find_package(spirv_cross_core REQUIRED CONFIG)
|
||||
find_package(spirv_cross_util REQUIRED CONFIG)
|
||||
|
||||
message(STATUS "find_package(spirv_cross_util) succeeded")
|
||||
EOF
|
||||
|
||||
rlLogInfo "Verifying find_package(spirv_cross_util CONFIG) ..."
|
||||
rm -rf "$TmpDir/build_8"
|
||||
if rlRun "cmake -S $TmpDir -B $TmpDir/build_8" 0 \
|
||||
"cmake configuration (find_package spirv_cross_util CONFIG)"; then
|
||||
rlPass "find_package(spirv_cross_util CONFIG) verification passed"
|
||||
else
|
||||
rlFail "find_package(spirv_cross_util CONFIG) verification failed"
|
||||
fi
|
||||
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup "Clean up test environment"
|
||||
rlRun "cd /" 0 "Leave test directory"
|
||||
if [ -n "$TmpDir" ] && [ -d "$TmpDir" ]; then
|
||||
rlRun "rm -rf $TmpDir" 0 "Clean up temporary test directory"
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
@@ -61,10 +61,10 @@ rlJournalStart
|
||||
rlPhaseStartTest "differential testing"
|
||||
|
||||
|
||||
local diff_failures=0
|
||||
diff_failures=0
|
||||
|
||||
|
||||
local total_tests=0
|
||||
total_tests=0
|
||||
|
||||
|
||||
|
||||
@@ -73,19 +73,19 @@ rlJournalStart
|
||||
for i in 1 2 3; do
|
||||
|
||||
|
||||
local src="csmith_diff_${i}.c"
|
||||
src="csmith_diff_${i}.c"
|
||||
|
||||
|
||||
local gcc_bin="csmith_diff_${i}_gcc"
|
||||
gcc_bin="csmith_diff_${i}_gcc"
|
||||
|
||||
|
||||
local clang_bin="csmith_diff_${i}_clang"
|
||||
clang_bin="csmith_diff_${i}_clang"
|
||||
|
||||
|
||||
local gcc_out="csmith_diff_${i}_gcc_out.txt"
|
||||
gcc_out="csmith_diff_${i}_gcc_out.txt"
|
||||
|
||||
|
||||
local clang_out="csmith_diff_${i}_clang_out.txt"
|
||||
clang_out="csmith_diff_${i}_clang_out.txt"
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ rlJournalStart
|
||||
timeout 10./"$gcc_bin" > "$gcc_out" 2>/tmp/csmith_gcc_runerr_${i}.txt
|
||||
|
||||
|
||||
local gcc_run_rc=$?
|
||||
gcc_run_rc=$?
|
||||
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ rlJournalStart
|
||||
timeout 10./"$clang_bin" > "$clang_out" 2>/tmp/csmith_clang_runerr_${i}.txt
|
||||
|
||||
|
||||
local clang_run_rc=$?
|
||||
clang_run_rc=$?
|
||||
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ rlJournalStart
|
||||
# Check for runtime errors
|
||||
|
||||
|
||||
local has_error=0
|
||||
has_error=0
|
||||
|
||||
|
||||
if grep -qi "segmentation fault\|core dumped\|stack smash\|buffer overflow" /tmp/csmith_gcc_runerr_${i}.txt 2>/dev/null; then
|
||||
|
||||
@@ -44,7 +44,7 @@ rlJournalStart
|
||||
|
||||
gcc -O2 csmith_test.c -o csmith_gcc -w 2>/tmp/csmith_gcc_err.txt
|
||||
|
||||
local gcc_rc=$?
|
||||
gcc_rc=$?
|
||||
|
||||
rlRun "echo \"GCC exit: $gcc_rc\"" 0 "GCC compileexit code: $gcc_rc"
|
||||
|
||||
@@ -78,7 +78,6 @@ rlJournalStart
|
||||
|
||||
if [ -s /tmp/csmith_gcc_err.txt ]; then
|
||||
|
||||
local warn_count
|
||||
|
||||
warn_count=$(grep -c "warning:" /tmp/csmith_gcc_err.txt 2>/dev/null || echo 0)
|
||||
|
||||
@@ -104,7 +103,7 @@ rlJournalStart
|
||||
|
||||
clang -O2 csmith_test.c -o csmith_clang -w 2>/tmp/csmith_clang_err.txt
|
||||
|
||||
local clang_rc=$?
|
||||
clang_rc=$?
|
||||
|
||||
rlRun "echo \"Clang exit: $clang_rc\"" 0 "Clang compileexit code: $clang_rc"
|
||||
|
||||
@@ -134,7 +133,6 @@ rlJournalStart
|
||||
|
||||
if [ -s /tmp/csmith_clang_err.txt ]; then
|
||||
|
||||
local warn_count
|
||||
|
||||
warn_count=$(grep -c "warning:" /tmp/csmith_clang_err.txt 2>/dev/null || echo 0)
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ rlJournalStart
|
||||
|
||||
if [ -s random1.c ]; then
|
||||
|
||||
local lines
|
||||
|
||||
lines=$(wc -l < random1.c)
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ CEOF
|
||||
|
||||
timeout 5./overflow_gcc >/tmp/overflow_gcc.txt 2>&1
|
||||
|
||||
local rc=$?
|
||||
rc=$?
|
||||
|
||||
rlLogInfo "overflow programexit code: $rc"
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ EEOF
|
||||
|
||||
runtest --tool gcc gcc.dg/dejagnu_test.exp 2>&1 | tee /tmp/dejagnu_gcc_run.log
|
||||
|
||||
local rc=${PIPESTATUS[0]}
|
||||
rc=${PIPESTATUS[0]}
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ EEOF
|
||||
|
||||
if grep -q "^PASS:" gcc.sum; then
|
||||
|
||||
local pass_count
|
||||
|
||||
pass_count=$(grep -c "^PASS:" gcc.sum)
|
||||
|
||||
@@ -170,7 +169,6 @@ EEOF
|
||||
|
||||
if grep -q "^FAIL:" gcc.sum; then
|
||||
|
||||
local fail_count
|
||||
|
||||
fail_count=$(grep -c "^FAIL:" gcc.sum)
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ EEOF
|
||||
|
||||
runtest --tool g++ g++.dg/dejagnu_gxx_test.exp 2>&1 | tee /tmp/dejagnu_gxx_run.log
|
||||
|
||||
local rc=${PIPESTATUS[0]}
|
||||
rc=${PIPESTATUS[0]}
|
||||
|
||||
|
||||
|
||||
@@ -164,7 +164,6 @@ EEOF
|
||||
|
||||
if grep -q "^PASS:" g++.sum; then
|
||||
|
||||
local pass_count
|
||||
|
||||
pass_count=$(grep -c "^PASS:" g++.sum)
|
||||
|
||||
@@ -180,7 +179,6 @@ EEOF
|
||||
|
||||
if grep -q "^FAIL:" g++.sum; then
|
||||
|
||||
local fail_count
|
||||
|
||||
fail_count=$(grep -c "^FAIL:" g++.sum)
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ rlJournalStart
|
||||
|
||||
runtest 2>&1 | tee /tmp/dejagnu_noargs.txt
|
||||
|
||||
local rc=$?
|
||||
rc=$?
|
||||
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ rlJournalStart
|
||||
|
||||
# checkGenerateoutputfile
|
||||
|
||||
local gen_files=0
|
||||
gen_files=0
|
||||
|
||||
for f in init.h func.cpp driver.cpp; do
|
||||
|
||||
|
||||
@@ -64,10 +64,10 @@ rlJournalStart
|
||||
rlPhaseStartTest "differential testing"
|
||||
|
||||
|
||||
local diff_failures=0
|
||||
diff_failures=0
|
||||
|
||||
|
||||
local total_tests=0
|
||||
total_tests=0
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ rlJournalStart
|
||||
g++ -fPIC func.cpp driver.cpp -o test_gxx -O2 2>/tmp/yarpgen_diff_gxx_err_${round}.txt
|
||||
|
||||
|
||||
local gxx_rc=$?
|
||||
gxx_rc=$?
|
||||
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ rlJournalStart
|
||||
clang++ -fPIC func.cpp driver.cpp -o test_clang -O2 2>/tmp/yarpgen_diff_clang_err_${round}.txt
|
||||
|
||||
|
||||
local clang_rc=$?
|
||||
clang_rc=$?
|
||||
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ rlJournalStart
|
||||
timeout 10./test_gxx > gxx_output.txt 2>/tmp/yarpgen_run_gxx_${round}.txt
|
||||
|
||||
|
||||
local gxx_run_rc=$?
|
||||
gxx_run_rc=$?
|
||||
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ rlJournalStart
|
||||
timeout 10./test_clang > clang_output.txt 2>/tmp/yarpgen_run_clang_${round}.txt
|
||||
|
||||
|
||||
local clang_run_rc=$?
|
||||
clang_run_rc=$?
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ rlJournalStart
|
||||
|
||||
rlRun "file./yarpgen_gxx_O0 | grep -i elf" 0 "G++ -O0 Output is ELF"
|
||||
|
||||
local warn_O0
|
||||
|
||||
warn_O0=$(grep -c "warning:" /tmp/yarpgen_gxx_O0_err.txt 2>/dev/null || echo 0)
|
||||
|
||||
@@ -92,7 +91,6 @@ rlJournalStart
|
||||
|
||||
rlPass "G++ -O2 Compile succeeded"
|
||||
|
||||
local warn_O2
|
||||
|
||||
warn_O2=$(grep -c "warning:" /tmp/yarpgen_gxx_O2_err.txt 2>/dev/null || echo 0)
|
||||
|
||||
@@ -116,7 +114,6 @@ rlJournalStart
|
||||
|
||||
rlPass "G++ -O3 Compile succeeded"
|
||||
|
||||
local warn_O3
|
||||
|
||||
warn_O3=$(grep -c "warning:" /tmp/yarpgen_gxx_O3_err.txt 2>/dev/null || echo 0)
|
||||
|
||||
@@ -158,7 +155,6 @@ rlJournalStart
|
||||
|
||||
rlPass "Clang -O2 Compile succeeded"
|
||||
|
||||
local warn_O2
|
||||
|
||||
warn_O2=$(grep -c "warning:" /tmp/yarpgen_clang_O2_err.txt 2>/dev/null || echo 0)
|
||||
|
||||
@@ -178,7 +174,6 @@ rlJournalStart
|
||||
|
||||
rlPass "Clang -O3 Compile succeeded"
|
||||
|
||||
local warn_O3
|
||||
|
||||
warn_O3=$(grep -c "warning:" /tmp/yarpgen_clang_O3_err.txt 2>/dev/null || echo 0)
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ EOF" 2>/dev/null || true
|
||||
|
||||
timeout --signal=KILL --kill-after=10 600 \
|
||||
|
||||
bash./check "$test_name" 2>&1 | tee "$out"
|
||||
bash ./check "$test_name" 2>&1 | tee "$out"
|
||||
|
||||
local rc=${PIPESTATUS[0]}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- functional
|
||||
- kernel
|
||||
- blktests
|
||||
duration: 5m
|
||||
duration: 15m
|
||||
tier: 2
|
||||
path: /tests/functional/kernel/blktests/scsi/test_blktests_scsi_007
|
||||
require:
|
||||
|
||||
@@ -24,7 +24,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "Direct I/O vs Buffered read"
|
||||
|
||||
local testfile="$TmpDir/cache_read.dat"
|
||||
testfile="$TmpDir/cache_read.dat"
|
||||
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=512 2>/dev/null
|
||||
|
||||
@@ -42,7 +42,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/buf_cold.log"
|
||||
log="$TmpDir/buf_cold.log"
|
||||
|
||||
fio --name=buf_cold --filename="$testfile" --direct=0 \
|
||||
|
||||
@@ -50,7 +50,6 @@ rlJournalStart
|
||||
|
||||
--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)
|
||||
|
||||
@@ -62,7 +61,7 @@ rlJournalStart
|
||||
|
||||
# Buffered (second read, warm cache)
|
||||
|
||||
local log="$TmpDir/buf_warm.log"
|
||||
log="$TmpDir/buf_warm.log"
|
||||
|
||||
fio --name=buf_warm --filename="$testfile" --direct=0 \
|
||||
|
||||
@@ -70,7 +69,6 @@ rlJournalStart
|
||||
|
||||
--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)
|
||||
|
||||
@@ -84,7 +82,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/direct.log"
|
||||
log="$TmpDir/direct.log"
|
||||
|
||||
fio --name=direct --filename="$testfile" --direct=1 \
|
||||
|
||||
@@ -92,7 +90,6 @@ rlJournalStart
|
||||
|
||||
--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)
|
||||
|
||||
@@ -132,9 +129,9 @@ rlJournalStart
|
||||
|
||||
# Buffered write
|
||||
|
||||
local testfile="$TmpDir/buf_write.dat"
|
||||
testfile="$TmpDir/buf_write.dat"
|
||||
|
||||
local log="$TmpDir/buf_write.log"
|
||||
log="$TmpDir/buf_write.log"
|
||||
|
||||
fio --name=buf_write --filename="$testfile" --direct=0 \
|
||||
|
||||
@@ -142,7 +139,6 @@ rlJournalStart
|
||||
|
||||
--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)
|
||||
|
||||
@@ -158,9 +154,9 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local testfile="$TmpDir/dir_write.dat"
|
||||
testfile="$TmpDir/dir_write.dat"
|
||||
|
||||
local log="$TmpDir/dir_write.log"
|
||||
log="$TmpDir/dir_write.log"
|
||||
|
||||
fio --name=dir_write --filename="$testfile" --direct=1 \
|
||||
|
||||
@@ -168,7 +164,6 @@ rlJournalStart
|
||||
|
||||
--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)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "random readand (numjobs)"
|
||||
|
||||
local testfile="$TmpDir/scale.dat"
|
||||
testfile="$TmpDir/scale.dat"
|
||||
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=512 2>/dev/null
|
||||
|
||||
@@ -42,7 +42,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/scale_nj${nj}.log"
|
||||
log="$TmpDir/scale_nj${nj}.log"
|
||||
|
||||
fio --name=scale_nj${nj} --filename="$testfile" --direct=1 \
|
||||
|
||||
@@ -52,7 +52,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local iops bw
|
||||
|
||||
iops=$(grep "read:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
|
||||
@@ -66,7 +65,6 @@ rlJournalStart
|
||||
|
||||
# verify 8 jobs IOPS > 1 job IOPS ()
|
||||
|
||||
local iops1 iops8
|
||||
|
||||
iops1=$(grep "read:" "$TmpDir/scale_nj1.log" | grep -oP 'IOPS=\K[\d.]+' | head -1)
|
||||
|
||||
@@ -88,7 +86,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "sequential readand"
|
||||
|
||||
local testfile="$TmpDir/scale_seq.dat"
|
||||
testfile="$TmpDir/scale_seq.dat"
|
||||
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=512 2>/dev/null
|
||||
|
||||
@@ -106,7 +104,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/scale_seq_nj${nj}.log"
|
||||
log="$TmpDir/scale_seq_nj${nj}.log"
|
||||
|
||||
fio --name=scale_seq_nj${nj} --filename="$testfile" --direct=1 \
|
||||
|
||||
@@ -116,7 +114,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local bw cpu
|
||||
|
||||
bw=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ rlJournalStart
|
||||
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
|
||||
local testfile="$TmpDir/latency.dat"
|
||||
testfile="$TmpDir/latency.dat"
|
||||
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=256 2>/dev/null
|
||||
|
||||
@@ -40,7 +40,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/lat_qd${qd}.log"
|
||||
log="$TmpDir/lat_qd${qd}.log"
|
||||
|
||||
fio --name=lat_qd${qd} --filename="$testfile" --direct=1 \
|
||||
|
||||
@@ -50,7 +50,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local avg p50 p99
|
||||
|
||||
avg=$(grep -A1 "lat (" "$log" | grep -oP 'avg=\K[\d.]+' | head -1)
|
||||
|
||||
@@ -82,7 +81,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/lat_bs${bs}k.log"
|
||||
log="$TmpDir/lat_bs${bs}k.log"
|
||||
|
||||
fio --name=lat_bs${bs}k --filename="$testfile" --direct=1 \
|
||||
|
||||
@@ -92,7 +91,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local avg iops
|
||||
|
||||
avg=$(grep -A1 "lat (" "$log" | grep -oP 'avg=\K[\d.]+' | head -1)
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "datalibraryload (70R/30W, BS=8K)"
|
||||
|
||||
local testfile="$TmpDir/db_workload.dat"
|
||||
testfile="$TmpDir/db_workload.dat"
|
||||
|
||||
local log="$TmpDir/db_randrw.log"
|
||||
log="$TmpDir/db_randrw.log"
|
||||
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "Web serverload (80R/20W, BS=4K)"
|
||||
|
||||
local testfile="$TmpDir/web_workload.dat"
|
||||
testfile="$TmpDir/web_workload.dat"
|
||||
|
||||
local log="$TmpDir/web_randrw.log"
|
||||
log="$TmpDir/web_randrw.log"
|
||||
|
||||
|
||||
|
||||
@@ -116,9 +116,9 @@ rlJournalStart
|
||||
|
||||
for ratio in 50 70 90; do
|
||||
|
||||
local testfile="$TmpDir/rw${ratio}.dat"
|
||||
testfile="$TmpDir/rw${ratio}.dat"
|
||||
|
||||
local log="$TmpDir/rw${ratio}.log"
|
||||
log="$TmpDir/rw${ratio}.log"
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
@@ -132,7 +132,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local riops wiop bw
|
||||
|
||||
riops=$(grep "read:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "random read IOPS (different block sizes)"
|
||||
|
||||
local testfile="$TmpDir/randread.dat"
|
||||
testfile="$TmpDir/randread.dat"
|
||||
|
||||
dd if=/dev/zero of="$testfile" bs=1M count=256 2>/dev/null
|
||||
|
||||
@@ -34,7 +34,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/randread_${bs}k.log"
|
||||
log="$TmpDir/randread_${bs}k.log"
|
||||
|
||||
rlLogInfo "=== random read BS=${bs}K ==="
|
||||
|
||||
@@ -46,7 +46,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local iops bw
|
||||
|
||||
iops=$(grep "read:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
|
||||
@@ -70,7 +69,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/randwrite_${bs}k.log"
|
||||
log="$TmpDir/randwrite_${bs}k.log"
|
||||
|
||||
rlLogInfo "=== randomwrite BS=${bs}K ==="
|
||||
|
||||
@@ -82,7 +81,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local iops bw
|
||||
|
||||
iops=$(grep "write:" "$log" | grep -oP 'IOPS=\K[\d.]+k?' | head -1)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "sequential read throughput (different block sizes)"
|
||||
|
||||
local testfile="$TmpDir/seq_read.dat"
|
||||
testfile="$TmpDir/seq_read.dat"
|
||||
|
||||
# preCreate test file (512MB)
|
||||
|
||||
@@ -38,7 +38,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/seq_read_${bs}k.log"
|
||||
log="$TmpDir/seq_read_${bs}k.log"
|
||||
|
||||
rlLogInfo "=== sequential read BS=${bs}K ==="
|
||||
|
||||
@@ -52,7 +52,6 @@ rlJournalStart
|
||||
|
||||
# extractbandwidth
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "READ:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
|
||||
@@ -80,7 +79,7 @@ rlJournalStart
|
||||
|
||||
_fioDropCaches
|
||||
|
||||
local log="$TmpDir/seq_write_${bs}k.log"
|
||||
log="$TmpDir/seq_write_${bs}k.log"
|
||||
|
||||
rlLogInfo "=== sequential write BS=${bs}K ==="
|
||||
|
||||
@@ -92,7 +91,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "WRITE:" "$log" | grep -oP 'bw=\K[\d.]+[KMG]iB/s' | head -1)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "Auto Mode (-a) file"
|
||||
|
||||
local log="$TmpDir/iozone_auto_small.log"
|
||||
log="$TmpDir/iozone_auto_small.log"
|
||||
|
||||
# -a: auto mode, -c: include close, 64m file
|
||||
|
||||
@@ -62,7 +62,7 @@ rlJournalStart
|
||||
|
||||
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true
|
||||
|
||||
local log="$TmpDir/iozone_auto_medium.log"
|
||||
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"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "Direct I/O vs Normal comparison"
|
||||
|
||||
local testfile="$TmpDir/iozone_dio.dat"
|
||||
testfile="$TmpDir/iozone_dio.dat"
|
||||
|
||||
|
||||
|
||||
@@ -70,11 +70,9 @@ rlJournalStart
|
||||
|
||||
# comparisonanalysis
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@@ -30,17 +30,17 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "multifilesizetest"
|
||||
|
||||
local sizes="64 128 256 512"
|
||||
sizes="64 128 256 512"
|
||||
|
||||
local throughputs=()
|
||||
throughputs=()
|
||||
|
||||
|
||||
|
||||
for sz in $sizes; do
|
||||
|
||||
local testfile="$TmpDir/iozone_${sz}m.dat"
|
||||
testfile="$TmpDir/iozone_${sz}m.dat"
|
||||
|
||||
local log="$TmpDir/iozone_${sz}m.log"
|
||||
log="$TmpDir/iozone_${sz}m.log"
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@ rlJournalStart
|
||||
|
||||
# extract write
|
||||
|
||||
local write_kbps
|
||||
|
||||
write_kbps=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $3}' | head -1)
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "all modes I/O test"
|
||||
|
||||
local testfile="$TmpDir/iozone_full.dat"
|
||||
testfile="$TmpDir/iozone_full.dat"
|
||||
|
||||
local log="$TmpDir/iozone_full.log"
|
||||
log="$TmpDir/iozone_full.log"
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "differentrecordsizecomparison"
|
||||
|
||||
local rec_sizes="4 16 64 256 1024"
|
||||
rec_sizes="4 16 64 256 1024"
|
||||
|
||||
echo ""
|
||||
|
||||
@@ -72,9 +72,9 @@ rlJournalStart
|
||||
|
||||
for rs in $rec_sizes; do
|
||||
|
||||
local testfile="$TmpDir/iozone_r${rs}k.dat"
|
||||
testfile="$TmpDir/iozone_r${rs}k.dat"
|
||||
|
||||
local log="$TmpDir/iozone_r${rs}k.log"
|
||||
log="$TmpDir/iozone_r${rs}k.log"
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local w r
|
||||
|
||||
w=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $3}' | head -1)
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "sequential write throughput"
|
||||
|
||||
local testfile="$TmpDir/seq_write.dat"
|
||||
testfile="$TmpDir/seq_write.dat"
|
||||
|
||||
local log="$TmpDir/seq_write.log"
|
||||
log="$TmpDir/seq_write.log"
|
||||
|
||||
|
||||
|
||||
@@ -48,13 +48,11 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
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)
|
||||
|
||||
@@ -78,9 +76,9 @@ rlJournalStart
|
||||
|
||||
# writefile, sequential read
|
||||
|
||||
local testfile="$TmpDir/seq_read.dat"
|
||||
testfile="$TmpDir/seq_read.dat"
|
||||
|
||||
local log="$TmpDir/seq_read.log"
|
||||
log="$TmpDir/seq_read.log"
|
||||
|
||||
|
||||
|
||||
@@ -106,13 +104,11 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
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)
|
||||
|
||||
@@ -136,9 +132,9 @@ rlJournalStart
|
||||
|
||||
# simultaneouslyreadwrite, readwrite
|
||||
|
||||
local testfile="$TmpDir/rw_ratio.dat"
|
||||
testfile="$TmpDir/rw_ratio.dat"
|
||||
|
||||
local log="$TmpDir/rw_ratio.log"
|
||||
log="$TmpDir/rw_ratio.log"
|
||||
|
||||
|
||||
|
||||
@@ -148,7 +144,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local w r
|
||||
|
||||
w=$(grep -E '^\s+[0-9]+\s+[0-9]+' "$log" | awk '{print $3}' | head -1)
|
||||
|
||||
@@ -158,7 +153,6 @@ rlJournalStart
|
||||
|
||||
if [ -n "$w" ] && [ -n "$r" ] && [ "$w" != "0" ]; then
|
||||
|
||||
local ratio
|
||||
|
||||
ratio=$(awk "BEGIN {printf \"%.2f\", ${r}/${w}}" 2>/dev/null)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ rlJournalStart
|
||||
|
||||
./bin/lat_tcp -s 2>&1 &
|
||||
|
||||
local tcp_pid=$!
|
||||
tcp_pid=$!
|
||||
|
||||
sleep 1
|
||||
|
||||
@@ -74,7 +74,7 @@ rlJournalStart
|
||||
|
||||
./bin/lat_udp -s 2>&1 &
|
||||
|
||||
local udp_pid=$!
|
||||
udp_pid=$!
|
||||
|
||||
sleep 1
|
||||
|
||||
|
||||
@@ -114,7 +114,6 @@ rlJournalStart
|
||||
|
||||
for op in rd wr rdwr cp fwr frd fcp bzero bcopy; do
|
||||
|
||||
local out
|
||||
|
||||
out=$(./bin/bw_mem 16M "$op" 2>&1 | tail -1)
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ _mmtestsRunCase() {
|
||||
|
||||
local exit_lines
|
||||
|
||||
exit_lines=$(grep "test exit:" "$out" 2>/dev/null)
|
||||
exit_lines=$(grep '^test exit :: ' "$out" 2>/dev/null)
|
||||
|
||||
if [ -z "$exit_lines" ]; then
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 90m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_blogbench
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 120m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_io_trunc
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 60m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_memdb_redis_benchmark_small
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 55m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_pagereclaim_stutterp
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 45m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_workload_ebizzy
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 60m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_workload_usemem_stress_numa_compact
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 120m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_workload_will_it_scale_io_processes
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 120m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_workload_will_it_scale_io_threads
|
||||
require:
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ tag:
|
||||
- performance
|
||||
- kernel
|
||||
- mmtests
|
||||
duration: 30m
|
||||
duration: 55m
|
||||
tier: 1
|
||||
path: /tests/performance/mmtests/test_mmtests_workload_will_it_scale_sys_processes
|
||||
require:
|
||||
|
||||
@@ -20,7 +20,6 @@ rlJournalStart
|
||||
|
||||
# getsize
|
||||
|
||||
local l1_kb l2_kb l3_kb
|
||||
|
||||
l1_kb=$(lscpu 2>/dev/null | grep "L1d cache" | grep -oP '\d+' | head -1)
|
||||
|
||||
@@ -54,9 +53,9 @@ rlJournalStart
|
||||
|
||||
for elems in 10000 100000 500000 1000000 5000000 10000000; do
|
||||
|
||||
local name="stream_${elems}"
|
||||
name="stream_${elems}"
|
||||
|
||||
local log="/tmp/${name}.log"
|
||||
log="/tmp/${name}.log"
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +73,6 @@ rlJournalStart
|
||||
|
||||
OMP_NUM_THREADS=1./"$name" > "$log" 2>&1
|
||||
|
||||
local triad
|
||||
|
||||
triad=$(grep "^Triad:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
@@ -82,9 +80,9 @@ rlJournalStart
|
||||
|
||||
# datain
|
||||
|
||||
local bytes=$((elems * 8 * 3)) # 3 arrays × 8 bytes
|
||||
bytes=$((elems * 8 * 3)) # 3 arrays × 8 bytes
|
||||
|
||||
local fit="DRAM"
|
||||
fit="DRAM"
|
||||
|
||||
if [ -n "$l3_kb" ] && [ "$bytes" -le $((l3_kb * 1024)) ]; then fit="L3"; fi
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ rlJournalStart
|
||||
|
||||
fi
|
||||
|
||||
local elems
|
||||
|
||||
elems=$(grep "^array_size=" "$STREAM_FLAG" 2>/dev/null | cut -d= -f2)
|
||||
|
||||
@@ -56,7 +55,7 @@ rlJournalStart
|
||||
|
||||
for compiler in gcc clang; do
|
||||
|
||||
local bin="stream_${compiler}"
|
||||
bin="stream_${compiler}"
|
||||
|
||||
"$compiler" -O3 -fopenmp -DSTREAM_ARRAY_SIZE=$elems -DNTIMES=15 \
|
||||
|
||||
@@ -66,13 +65,12 @@ rlJournalStart
|
||||
|
||||
if [ -x "$bin" ]; then
|
||||
|
||||
local log="/tmp/stream_${compiler}.log"
|
||||
log="/tmp/stream_${compiler}.log"
|
||||
|
||||
OMP_NUM_THREADS=1./"$bin" > "$log" 2>&1
|
||||
|
||||
|
||||
|
||||
local copy scale add triad
|
||||
|
||||
copy=$(grep "^Copy:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
@@ -124,7 +122,7 @@ rlJournalStart
|
||||
|
||||
for opt in O2 O3 Ofast; do
|
||||
|
||||
local bin="stream_gcc_${opt}"
|
||||
bin="stream_gcc_${opt}"
|
||||
|
||||
gcc -${opt} -fopenmp -DSTREAM_ARRAY_SIZE=$elems -DNTIMES=15 \
|
||||
|
||||
@@ -134,13 +132,12 @@ rlJournalStart
|
||||
|
||||
if [ -x "$bin" ]; then
|
||||
|
||||
local log="/tmp/stream_gcc_${opt}.log"
|
||||
log="/tmp/stream_gcc_${opt}.log"
|
||||
|
||||
OMP_NUM_THREADS=1./"$bin" > "$log" 2>&1
|
||||
|
||||
|
||||
|
||||
local copy scale add triad
|
||||
|
||||
copy=$(grep "^Copy:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ rlJournalStart
|
||||
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
|
||||
local max_cores=$(nproc)
|
||||
max_cores=$(nproc)
|
||||
|
||||
rlLogInfo "CPU corecount: $max_cores"
|
||||
|
||||
@@ -34,7 +34,7 @@ rlJournalStart
|
||||
|
||||
printf "%-8s %-15s %-15s %-15s\n" "Cores" "Triad(MB/s)" "Copy(MB/s)" ""
|
||||
|
||||
local single_bw=""
|
||||
single_bw=""
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local log="/tmp/stream_${t}core.log"
|
||||
log="/tmp/stream_${t}core.log"
|
||||
|
||||
rlLogInfo "=== ${t} core TRIAD ==="
|
||||
|
||||
@@ -56,7 +56,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local triad copy
|
||||
|
||||
triad=$(grep "^Triad:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
@@ -72,7 +71,7 @@ rlJournalStart
|
||||
|
||||
fi
|
||||
|
||||
local eff="N/A"
|
||||
eff="N/A"
|
||||
|
||||
if [ -n "$single_bw" ] && [ "$single_bw" != "0" ]; then
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "single-core COPY (1R+1W)"
|
||||
|
||||
local log="/tmp/stream_copy.log"
|
||||
log="/tmp/stream_copy.log"
|
||||
|
||||
export OMP_NUM_THREADS=1
|
||||
|
||||
@@ -36,7 +36,6 @@ rlJournalStart
|
||||
|
||||
rlRun "cat $log" 0 "STREAM COPY full output"
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "^Copy:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
@@ -62,7 +61,7 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local log="/tmp/stream_scale.log"
|
||||
log="/tmp/stream_scale.log"
|
||||
|
||||
export OMP_NUM_THREADS=1
|
||||
|
||||
@@ -70,7 +69,6 @@ rlJournalStart
|
||||
|
||||
rlRun "cat $log" 0 "STREAM SCALE full output"
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "^Scale:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
@@ -82,7 +80,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "single-core ADD (2R+1W)"
|
||||
|
||||
local log="/tmp/stream_add.log"
|
||||
log="/tmp/stream_add.log"
|
||||
|
||||
export OMP_NUM_THREADS=1
|
||||
|
||||
@@ -90,7 +88,6 @@ rlJournalStart
|
||||
|
||||
rlRun "cat $log" 0 "STREAM ADD full output"
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "^Add:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
@@ -102,7 +99,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "single-core TRIAD (2R+1W,)"
|
||||
|
||||
local log="/tmp/stream_triad.log"
|
||||
log="/tmp/stream_triad.log"
|
||||
|
||||
export OMP_NUM_THREADS=1
|
||||
|
||||
@@ -118,7 +115,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "^Triad:" "$log" | awk '{print $2}' | head -1)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "single-core CPU"
|
||||
|
||||
local log="/tmp/sb_cpu_1.log"
|
||||
log="/tmp/sb_cpu_1.log"
|
||||
|
||||
rlLogInfo "=== CPU single-core (--threads=1) ==="
|
||||
|
||||
@@ -32,7 +32,6 @@ rlJournalStart
|
||||
|
||||
_sysbenchParse "$log"
|
||||
|
||||
local eps
|
||||
|
||||
eps=$(grep "events per second" "$log" | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
@@ -44,9 +43,9 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "multi-core CPU"
|
||||
|
||||
local cores=$(nproc)
|
||||
cores=$(nproc)
|
||||
|
||||
local log="/tmp/sb_cpu_n.log"
|
||||
log="/tmp/sb_cpu_n.log"
|
||||
|
||||
rlLogInfo "=== CPU multi-core (--threads=$cores) ==="
|
||||
|
||||
@@ -54,7 +53,6 @@ rlJournalStart
|
||||
|
||||
_sysbenchParse "$log"
|
||||
|
||||
local eps
|
||||
|
||||
eps=$(grep "events per second" "$log" | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
@@ -66,7 +64,6 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "single-core vs multi-core comparison"
|
||||
|
||||
local eps1 epsN
|
||||
|
||||
eps1=$(grep "events per second" /tmp/sb_cpu_1.log | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ rlJournalStart
|
||||
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
|
||||
local cores=$(nproc)
|
||||
cores=$(nproc)
|
||||
|
||||
local data_dir="$TmpDir/sb_fileio"
|
||||
data_dir="$TmpDir/sb_fileio"
|
||||
|
||||
mkdir -p "$data_dir"
|
||||
|
||||
@@ -46,7 +46,7 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local log="/tmp/sb_fileio_${mode}.log"
|
||||
log="/tmp/sb_fileio_${mode}.log"
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local bw iops
|
||||
|
||||
bw=$(grep "MiB/sec" "$log" | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ rlJournalStart
|
||||
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
|
||||
local cores=$(nproc)
|
||||
cores=$(nproc)
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
@@ -36,7 +36,7 @@ rlJournalStart
|
||||
|
||||
for op in read write; do
|
||||
|
||||
local log="/tmp/sb_mem_seq_${op}.log"
|
||||
log="/tmp/sb_mem_seq_${op}.log"
|
||||
|
||||
sysbench --threads=$cores --memory-block-size=1M --memory-total-size=10000G \
|
||||
|
||||
@@ -46,7 +46,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "MiB/sec" "$log" | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
@@ -72,7 +71,7 @@ rlJournalStart
|
||||
|
||||
for op in read write; do
|
||||
|
||||
local log="/tmp/sb_mem_rnd_${op}.log"
|
||||
log="/tmp/sb_mem_rnd_${op}.log"
|
||||
|
||||
sysbench --threads=$cores --memory-block-size=8K --memory-total-size=200G \
|
||||
|
||||
@@ -82,7 +81,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local bw
|
||||
|
||||
bw=$(grep "MiB/sec" "$log" | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ rlJournalStart
|
||||
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
|
||||
local cores=$(nproc)
|
||||
cores=$(nproc)
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
@@ -36,7 +36,7 @@ rlJournalStart
|
||||
|
||||
for mn in 64 512 1024 2048; do
|
||||
|
||||
local log="/tmp/sb_mutex_${mn}.log"
|
||||
log="/tmp/sb_mutex_${mn}.log"
|
||||
|
||||
sysbench --threads=$cores --mutex-num=$mn --mutex-loops=50000 \
|
||||
|
||||
@@ -46,7 +46,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local eps lat locks
|
||||
|
||||
eps=$(grep "events per second" "$log" | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ rlJournalStart
|
||||
|
||||
rlRun "cd $TmpDir" 0 ""
|
||||
|
||||
local cores=$(nproc)
|
||||
cores=$(nproc)
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
@@ -36,7 +36,7 @@ rlJournalStart
|
||||
|
||||
for locks in 8 $cores $((cores * 2)); do
|
||||
|
||||
local log="/tmp/sb_threads_${locks}.log"
|
||||
log="/tmp/sb_threads_${locks}.log"
|
||||
|
||||
sysbench --threads=$cores --thread-locks=$locks --time=30 \
|
||||
|
||||
@@ -44,7 +44,6 @@ rlJournalStart
|
||||
|
||||
|
||||
|
||||
local eps lat fair
|
||||
|
||||
eps=$(grep "events per second" "$log" | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ test: ./test.sh
|
||||
tag:
|
||||
- performance
|
||||
- unixbench
|
||||
duration: 10m
|
||||
duration: 35m
|
||||
tier: 2
|
||||
path: /tests/performance/unixbench/test_unixbench_half_cpu
|
||||
require:
|
||||
|
||||
@@ -3,7 +3,7 @@ test: ./test.sh
|
||||
tag:
|
||||
- performance
|
||||
- unixbench
|
||||
duration: 10m
|
||||
duration: 35m
|
||||
tier: 2
|
||||
path: /tests/performance/unixbench/test_unixbench_multi_thread
|
||||
require:
|
||||
|
||||
@@ -3,7 +3,7 @@ test: ./test.sh
|
||||
tag:
|
||||
- performance
|
||||
- unixbench
|
||||
duration: 10m
|
||||
duration: 20m
|
||||
tier: 2
|
||||
path: /tests/performance/unixbench/test_unixbench_quick_mode
|
||||
require:
|
||||
|
||||
@@ -3,7 +3,7 @@ test: ./test.sh
|
||||
tag:
|
||||
- performance
|
||||
- unixbench
|
||||
duration: 10m
|
||||
duration: 35m
|
||||
tier: 2
|
||||
path: /tests/performance/unixbench/test_unixbench_single_thread
|
||||
require:
|
||||
|
||||
@@ -28,7 +28,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "combined stress: CPU+MEM+PROC"
|
||||
|
||||
local log="$TmpDir/combo1.log"
|
||||
log="$TmpDir/combo1.log"
|
||||
|
||||
# simultaneously CPU(2thread) + VM(128M) + FORK(2thread)
|
||||
|
||||
@@ -58,11 +58,11 @@ rlJournalStart
|
||||
|
||||
# useDocumentation recommends 13 workload (time)
|
||||
|
||||
local log="$TmpDir/combo2.log"
|
||||
log="$TmpDir/combo2.log"
|
||||
|
||||
local workloads="cpu context fork get mmap vm-splice wait zombie"
|
||||
workloads="cpu context fork get mmap vm-splice wait zombie"
|
||||
|
||||
local args=""
|
||||
args=""
|
||||
|
||||
for w in $workloads; do args="$args --$w 1"; done
|
||||
|
||||
@@ -76,7 +76,6 @@ rlJournalStart
|
||||
|
||||
# count passed count
|
||||
|
||||
local passed
|
||||
|
||||
passed=$(grep -oP 'passed:\s*\K\d+' "$log" | awk '{s+=$1} END {print s}')
|
||||
|
||||
@@ -92,7 +91,6 @@ rlJournalStart
|
||||
|
||||
# confirmnofailed
|
||||
|
||||
local failed
|
||||
|
||||
failed=$(grep -oP 'failed:\s*\K\d+' "$log" | awk '{s+=$1} END {print s}')
|
||||
|
||||
@@ -112,7 +110,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "metrics analysis"
|
||||
|
||||
local log="$TmpDir/combo1.log"
|
||||
log="$TmpDir/combo1.log"
|
||||
|
||||
# analysis usr/sys time
|
||||
|
||||
@@ -122,7 +120,6 @@ rlJournalStart
|
||||
|
||||
# usr time shouldtotaltime
|
||||
|
||||
local total_usr total_sys
|
||||
|
||||
total_usr=$(grep -oP 'usr time\s+\K[\d.]+' "$log" | head -1)
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "CPU stress rampthread"
|
||||
|
||||
local bogo_vals=()
|
||||
bogo_vals=()
|
||||
|
||||
for t in 1 2 4; do
|
||||
|
||||
local log="$TmpDir/cpu_${t}.log"
|
||||
log="$TmpDir/cpu_${t}.log"
|
||||
|
||||
rlRun "stress-ng --cpu $t --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "CPU $t thread"
|
||||
|
||||
@@ -42,7 +42,6 @@ rlJournalStart
|
||||
|
||||
# extract bogo ops/s
|
||||
|
||||
local bogo
|
||||
|
||||
bogo=$(grep "cpu" "$log" | grep -oP '\d+\.?\d*(?=\s*\(\s*real)' | head -1)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "HDD stress (IO)"
|
||||
|
||||
local log="$TmpDir/hdd.log"
|
||||
log="$TmpDir/hdd.log"
|
||||
|
||||
rlRun "stress-ng --hdd 2 --hdd-bytes 32M --temp-path $TmpDir/io_test --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--hdd 2"
|
||||
|
||||
@@ -42,7 +42,7 @@ rlJournalStart
|
||||
|
||||
# aio needs libaio supports, possiblesystemnot supported
|
||||
|
||||
local log="$TmpDir/aio.log"
|
||||
log="$TmpDir/aio.log"
|
||||
|
||||
stress-ng --aio 2 --timeout 20s --metrics-brief --log-file "$log" 2>&1 | tail -5
|
||||
|
||||
@@ -64,7 +64,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "GETDENT stress (directory)"
|
||||
|
||||
local log="$TmpDir/getdent.log"
|
||||
log="$TmpDir/getdent.log"
|
||||
|
||||
rlRun "stress-ng --getdent 2 --timeout 20s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--getdent 2"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "MATRIX stress ()"
|
||||
|
||||
local log="$TmpDir/matrix.log"
|
||||
log="$TmpDir/matrix.log"
|
||||
|
||||
rlRun "stress-ng --matrix 2 --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--matrix 2"
|
||||
|
||||
@@ -36,7 +36,6 @@ rlJournalStart
|
||||
|
||||
if grep -q "matrix" "$log"; then
|
||||
|
||||
local usr sys
|
||||
|
||||
usr=$(grep "matrix" "$log" | awk '{for(i=1;i<=NF;i++){if($i~/^[0-9.]+$/&&$(i-1)~/secs/)print $i}}' | head -1)
|
||||
|
||||
@@ -50,7 +49,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "AF-ALG stress (kernelcrypto)"
|
||||
|
||||
local log="$TmpDir/af_alg.log"
|
||||
log="$TmpDir/af_alg.log"
|
||||
|
||||
stress-ng --af-alg 2 --timeout 20s --metrics-brief --log-file "$log" 2>&1 | tail -5
|
||||
|
||||
@@ -72,7 +71,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "VM-SPLICE stress (pipe splice)"
|
||||
|
||||
local log="$TmpDir/vm_splice.log"
|
||||
log="$TmpDir/vm_splice.log"
|
||||
|
||||
stress-ng --vm-splice 2 --timeout 20s --metrics-brief --log-file "$log" 2>&1 | tail -5
|
||||
|
||||
@@ -96,7 +95,7 @@ rlJournalStart
|
||||
|
||||
#: itemswillExceptionsignalhandlepath, possiblehaspreerror
|
||||
|
||||
local log="$TmpDir/bad_altstack.log"
|
||||
log="$TmpDir/bad_altstack.log"
|
||||
|
||||
rlRun "stress-ng --bad-altstack 1 --timeout 10s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--bad-altstack 1"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "VM stress (memory)"
|
||||
|
||||
local log="$TmpDir/vm.log"
|
||||
log="$TmpDir/vm.log"
|
||||
|
||||
rlRun "stress-ng --vm 2 --vm-bytes 128M --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--vm 2x128M"
|
||||
|
||||
@@ -38,7 +38,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "MMAP stress"
|
||||
|
||||
local log="$TmpDir/mmap.log"
|
||||
log="$TmpDir/mmap.log"
|
||||
|
||||
rlRun "stress-ng --mmap 2 --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--mmap 2"
|
||||
|
||||
@@ -50,7 +50,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "MADVISE stress"
|
||||
|
||||
local log="$TmpDir/madvise.log"
|
||||
log="$TmpDir/madvise.log"
|
||||
|
||||
rlRun "stress-ng --madvise 2 --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--madvise 2"
|
||||
|
||||
@@ -62,7 +62,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "Memory combined stress"
|
||||
|
||||
local log="$TmpDir/mem_combo.log"
|
||||
log="$TmpDir/mem_combo.log"
|
||||
|
||||
# simultaneously VM + MMAP
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "FORK stress"
|
||||
|
||||
local log="$TmpDir/fork.log"
|
||||
log="$TmpDir/fork.log"
|
||||
|
||||
rlRun "stress-ng --fork 4 --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--fork 4"
|
||||
|
||||
@@ -42,7 +42,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "CONTEXT switch stress"
|
||||
|
||||
local log="$TmpDir/context.log"
|
||||
log="$TmpDir/context.log"
|
||||
|
||||
rlRun "stress-ng --context 4 --timeout 30s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--context 4"
|
||||
|
||||
@@ -56,7 +56,7 @@ rlJournalStart
|
||||
|
||||
# zombie willproducedprocesspost, possiblehaspreerror
|
||||
|
||||
local log="$TmpDir/zombie.log"
|
||||
log="$TmpDir/zombie.log"
|
||||
|
||||
rlRun "stress-ng --zombie 2 --timeout 15s --metrics-brief --log-file $log 2>&1 | tail -5" 0 "--zombie 2"
|
||||
|
||||
@@ -68,7 +68,7 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "WAIT stress (get/gettid)"
|
||||
|
||||
local log="$TmpDir/wait.log"
|
||||
log="$TmpDir/wait.log"
|
||||
|
||||
# --get: callwith getpid/getppid
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "system callstest"
|
||||
|
||||
local log_file="$TmpDir/trinity_basic.log"
|
||||
log_file="$TmpDir/trinity_basic.log"
|
||||
|
||||
# by non- root userrun trinity, time 60s
|
||||
|
||||
timeout 70 sudo -u "$TRINITY_USER" trinity -q -N 99999 > "$log_file" 2>&1
|
||||
|
||||
local rc=$?
|
||||
rc=$?
|
||||
|
||||
rlLogInfo "Trinity exit code: $rc"
|
||||
|
||||
|
||||
@@ -40,11 +40,11 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "excludeall syscall"
|
||||
|
||||
local log="$TmpDir/trinity_exclude.log"
|
||||
log="$TmpDir/trinity_exclude.log"
|
||||
|
||||
# build -x parameter
|
||||
|
||||
local exclude_args=""
|
||||
exclude_args=""
|
||||
|
||||
for call in $DANGEROUS; do
|
||||
|
||||
@@ -56,7 +56,7 @@ rlJournalStart
|
||||
|
||||
timeout 45 sudo -u "$TRINITY_USER" trinity -q $exclude_args -N 20000 > "$log" 2>&1
|
||||
|
||||
local rc=$?
|
||||
rc=$?
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ rlJournalStart
|
||||
|
||||
# verifyexcludecallwithnotexport
|
||||
|
||||
local leak=0
|
||||
leak=0
|
||||
|
||||
for call in $DANGEROUS; do
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ rlJournalStart
|
||||
|
||||
chmod 777 "$TmpDir"
|
||||
|
||||
local cores
|
||||
|
||||
cores=$(nproc)
|
||||
|
||||
@@ -36,13 +35,12 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "singleprocess baseline"
|
||||
|
||||
local log1="$TmpDir/trinity_1proc.log"
|
||||
log1="$TmpDir/trinity_1proc.log"
|
||||
|
||||
timeout 30 sudo -u "$TRINITY_USER" trinity -q -C 1 -N 5000 > "$log1" 2>&1
|
||||
|
||||
local rc1=$?
|
||||
rc1=$?
|
||||
|
||||
local calls1
|
||||
|
||||
calls1=$(grep -c "succeeded\|completed" "$log1" 2>/dev/null || echo "N/A")
|
||||
|
||||
@@ -56,11 +54,11 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "multiprocessandlines ($cores cores)"
|
||||
|
||||
local log_multi="$TmpDir/trinity_multi.log"
|
||||
log_multi="$TmpDir/trinity_multi.log"
|
||||
|
||||
timeout 30 sudo -u "$TRINITY_USER" trinity -q -C "$cores" -N 10000 > "$log_multi" 2>&1
|
||||
|
||||
local rc_multi=$?
|
||||
rc_multi=$?
|
||||
|
||||
rlLogInfo "multiprocess ($cores): exit=$rc_multi"
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ rlJournalStart
|
||||
|
||||
chmod 777 "$TmpDir"
|
||||
|
||||
local cores
|
||||
|
||||
cores=$(nproc)
|
||||
|
||||
@@ -36,13 +35,13 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "mode -qq -l off"
|
||||
|
||||
local log="$TmpDir/trinity_stress.log"
|
||||
log="$TmpDir/trinity_stress.log"
|
||||
|
||||
# Documentation recommends: trinity -qq -l off -C$(nproc)
|
||||
|
||||
timeout 45 sudo -u "$TRINITY_USER" trinity -qq -l off -C "$cores" > "$log" 2>&1
|
||||
|
||||
local rc=$?
|
||||
rc=$?
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ rlJournalStart
|
||||
|
||||
# security syscall: onlyreadnowith
|
||||
|
||||
local safe_pattern="getpid|getuid|getgid|geteuid|getegid|getppid|gettimeofday|time|clock_gettime|getcpu|uname|sysinfo|getrandom|read|write|close|brk|arch_prctl"
|
||||
safe_pattern="getpid|getuid|getgid|geteuid|getegid|getppid|gettimeofday|time|clock_gettime|getcpu|uname|sysinfo|getrandom|read|write|close|brk|arch_prctl"
|
||||
|
||||
local safe_count
|
||||
|
||||
safe_count=$(grep -ciE "$safe_pattern" /tmp/trinity_syscalls.txt || echo 0)
|
||||
|
||||
@@ -42,9 +41,8 @@ rlJournalStart
|
||||
|
||||
# syscall: possiblesystem
|
||||
|
||||
local dangerous_pattern="reboot|shutdown|kill|init_module|delete_module|mount|umount|mkmod|swapon|swapoff|ioperm|iopl"
|
||||
dangerous_pattern="reboot|shutdown|kill|init_module|delete_module|mount|umount|mkmod|swapon|swapoff|ioperm|iopl"
|
||||
|
||||
local dangerous_count
|
||||
|
||||
dangerous_count=$(grep -ciE "$dangerous_pattern" /tmp/trinity_syscalls.txt || echo 0)
|
||||
|
||||
@@ -54,7 +52,6 @@ rlJournalStart
|
||||
|
||||
# network syscall
|
||||
|
||||
local net_count
|
||||
|
||||
net_count=$(grep -ciE "socket|bind|connect|listen|accept|send|recv" /tmp/trinity_syscalls.txt || echo 0)
|
||||
|
||||
@@ -64,7 +61,6 @@ rlJournalStart
|
||||
|
||||
# file syscall
|
||||
|
||||
local file_count
|
||||
|
||||
file_count=$(grep -ciE "open|creat|read|write|close|stat|fstat|lseek|mkdir|rmdir|unlink|rename|link|symlink|chmod|chown" /tmp/trinity_syscalls.txt || echo 0)
|
||||
|
||||
@@ -74,7 +70,6 @@ rlJournalStart
|
||||
|
||||
# process syscall
|
||||
|
||||
local proc_count
|
||||
|
||||
proc_count=$(grep -ciE "fork|vfork|clone|execve|exit|wait4|kill|ptrace|capget|capset|prctl|seccomp" /tmp/trinity_syscalls.txt || echo 0)
|
||||
|
||||
@@ -84,7 +79,6 @@ rlJournalStart
|
||||
|
||||
# memory syscall
|
||||
|
||||
local mem_count
|
||||
|
||||
mem_count=$(grep -ciE "mmap|munmap|mprotect|mremap|brk|mlock|mlockall|msync|madvise|mincore" /tmp/trinity_syscalls.txt || echo 0)
|
||||
|
||||
@@ -100,7 +94,6 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest " syscall"
|
||||
|
||||
local arch
|
||||
|
||||
arch=$(uname -m)
|
||||
|
||||
@@ -112,7 +105,6 @@ rlJournalStart
|
||||
|
||||
trinity -L 2>&1 | grep -i "riscv" | head -10
|
||||
|
||||
local riscv_count
|
||||
|
||||
riscv_count=$(trinity -L 2>&1 | grep -ci "riscv" || echo 0)
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ rlJournalStart
|
||||
|
||||
rlPhaseStartTest "vssecurity syscall"
|
||||
|
||||
local safe_calls="getpid getuid getgid geteuid getppid gettimeofday clock_gettime nanosleep getcpu getrandom uname sysinfo"
|
||||
safe_calls="getpid getuid getgid geteuid getppid gettimeofday clock_gettime nanosleep getcpu getrandom uname sysinfo"
|
||||
|
||||
local tested=0
|
||||
tested=0
|
||||
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ rlJournalStart
|
||||
|
||||
rlLogInfo "test syscall: $call"
|
||||
|
||||
local log="$TmpDir/trinity_${call}.log"
|
||||
log="$TmpDir/trinity_${call}.log"
|
||||
|
||||
timeout 15 sudo -u "$TRINITY_USER" trinity -q -c "$call" -N 1000 > "$log" 2>&1
|
||||
|
||||
local rc=$?
|
||||
rc=$?
|
||||
|
||||
tested=$((tested + 1))
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ rlJournalStart
|
||||
if [ ! -f "$CIS_DS" ]; then
|
||||
rlFail "Data stream not found"
|
||||
else
|
||||
local out=/tmp/cis_profile_$$
|
||||
out=/tmp/cis_profile_$$
|
||||
oscap info "$CIS_DS" 2>&1 | tee $out
|
||||
if grep -q "$CIS_PROFILE" "$out"; then
|
||||
local count=$(grep -c 'Id: xccdf_org.ssgproject.content_profile_' "$out")
|
||||
count=$(grep -c 'Id: xccdf_org.ssgproject.content_profile_' "$out")
|
||||
rlPass "CIS profile $CIS_PROFILE found ($count profiles)"
|
||||
else
|
||||
rlFail "CIS profile not found"
|
||||
|
||||
Reference in New Issue
Block a user