Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automated: linux: rcutorture: drop config checking #455

Merged
merged 3 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions automated/linux/rcutorture/rcutorture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ OUTPUT="${TEST_DIR}/output"
RESULT_FILE="${OUTPUT}/result.txt"
export RESULT_FILE
LOGFILE="${OUTPUT}/dmesg-rcutorture.txt"
SKIP_INSTALL="false"
TORTURE_TIME="600"

usage() {
echo "Usage: $0 [-s <skip_install>] [-t <rcutorture_time>]" 1>&2
echo "Usage: $0 [-t <rcutorture_time>]" 1>&2
exit 1
}

while getopts ':s:t:' opt; do
while getopts ':t:' opt; do
case "${opt}" in
s) SKIP_INSTALL="${OPTARG}" ;;
t) TORTURE_TIME="${OPTARG}" ;;
*) usage ;;
esac
Expand All @@ -25,29 +23,16 @@ done
. "${TEST_DIR}/../../lib/sh-test-lib"

! check_root && error_msg "Please run this script as root."
install_deps "gzip" "${SKIP_INSTALL}"
create_out_dir "${OUTPUT}"

# Check kernel config.
if [ -f "/proc/config.gz" ]; then
test_cmd="gunzip -c /proc/config.gz | grep CONFIG_RCU_TORTURE_TEST=m"
elif [ -f "/boot/config-$(uname -r)" ]; then
test_cmd="grep CONFIG_RCU_TORTURE_TEST=m /boot/config-$(uname -r)"
fi
if [ -n "${test_cmd}" ]; then
tc_id="check-kernel-config"
skip_list="modprobe-rcutorture rctorture-start rmmod-rcutorture rcutorture-end"
run_test_case "${test_cmd}" "${tc_id}" "${skip_list}"
fi

# Insert rcutoruture kernel module.
dmesg -c > /dev/null
if lsmod | grep rcutorture; then
rmmod rcutorture || true
fi
test_cmd="modprobe rcutorture"
tc_id="modprobe-rcutorture"
skip_list="rctorture-start rmmod-rcutorture rcutorture-end"
skip_list="rcutorture-start rmmod-rcutorture rcutorture-end"
run_test_case "${test_cmd}" "${tc_id}" "${skip_list}"

# Check if rcutoruture started.
Expand Down
3 changes: 1 addition & 2 deletions automated/linux/rcutorture/rcutorture.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ metadata:
- functional

params:
SKIP_INSTALL: "false"
TORTURE_TIME: 600

run:
steps:
- cd automated/linux/rcutorture
- ./rcutorture.sh -s "${SKIP_INSTALL}" -t "${TORTURE_TIME}"
- ./rcutorture.sh -t "${TORTURE_TIME}"
- ../../utils/send-to-lava.sh ./output/result.txt
Loading