mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 13:22:02 +02:00
Merge branch 'selftests-rds-add-config-file-and-config-sh-c-option'
Allison Henderson says: ==================== selftests: rds: add config file and config.sh -c option This series adds an RDS-specific config file for ksft CI and extends config.sh with a -c flag to specify an alternate config file path. Users can now specify the path of the config they want to update, or default to .config if none is specified. ==================== Link: https://patch.msgid.link/20260320041834.2761069-1-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
ef94e96eae
|
|
@ -31,8 +31,11 @@ EXAMPLE:
|
|||
# Alternatly create a gcov disabled .config
|
||||
tools/testing/selftests/net/rds/config.sh
|
||||
|
||||
# Config paths may also be specified with the -c flag
|
||||
tools/testing/selftests/net/rds/config.sh -c .config.local
|
||||
|
||||
# build the kernel
|
||||
vng --build --config tools/testing/selftests/net/config
|
||||
vng --build --config .config
|
||||
|
||||
# launch the tests in a VM
|
||||
vng -v --rwdir ./ --run . --user root --cpus 4 -- \
|
||||
|
|
|
|||
5
tools/testing/selftests/net/rds/config
Normal file
5
tools/testing/selftests/net/rds/config
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
CONFIG_NET_NS=y
|
||||
CONFIG_NET_SCH_NETEM=y
|
||||
CONFIG_RDS=y
|
||||
CONFIG_RDS_TCP=y
|
||||
CONFIG_VETH=y
|
||||
|
|
@ -6,15 +6,20 @@ set -u
|
|||
set -x
|
||||
|
||||
unset KBUILD_OUTPUT
|
||||
CONF_FILE=""
|
||||
FLAGS=()
|
||||
|
||||
GENERATE_GCOV_REPORT=0
|
||||
while getopts "g" opt; do
|
||||
while getopts "gc:" opt; do
|
||||
case ${opt} in
|
||||
g)
|
||||
GENERATE_GCOV_REPORT=1
|
||||
;;
|
||||
c)
|
||||
CONF_FILE=$OPTARG
|
||||
;;
|
||||
:)
|
||||
echo "USAGE: config.sh [-g]"
|
||||
echo "USAGE: config.sh [-g] [-c config]"
|
||||
exit 1
|
||||
;;
|
||||
?)
|
||||
|
|
@ -24,30 +29,32 @@ while getopts "g" opt; do
|
|||
esac
|
||||
done
|
||||
|
||||
CONF_FILE="tools/testing/selftests/net/config"
|
||||
if [[ "$CONF_FILE" != "" ]]; then
|
||||
FLAGS=(--file "$CONF_FILE")
|
||||
fi
|
||||
|
||||
# no modules
|
||||
scripts/config --file "$CONF_FILE" --disable CONFIG_MODULES
|
||||
scripts/config "${FLAGS[@]}" --disable CONFIG_MODULES
|
||||
|
||||
# enable RDS
|
||||
scripts/config --file "$CONF_FILE" --enable CONFIG_RDS
|
||||
scripts/config --file "$CONF_FILE" --enable CONFIG_RDS_TCP
|
||||
scripts/config "${FLAGS[@]}" --enable CONFIG_RDS
|
||||
scripts/config "${FLAGS[@]}" --enable CONFIG_RDS_TCP
|
||||
|
||||
if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then
|
||||
# instrument RDS and only RDS
|
||||
scripts/config --file "$CONF_FILE" --enable CONFIG_GCOV_KERNEL
|
||||
scripts/config --file "$CONF_FILE" --disable GCOV_PROFILE_ALL
|
||||
scripts/config --file "$CONF_FILE" --enable GCOV_PROFILE_RDS
|
||||
scripts/config "${FLAGS[@]}" --enable CONFIG_GCOV_KERNEL
|
||||
scripts/config "${FLAGS[@]}" --disable GCOV_PROFILE_ALL
|
||||
scripts/config "${FLAGS[@]}" --enable GCOV_PROFILE_RDS
|
||||
else
|
||||
scripts/config --file "$CONF_FILE" --disable CONFIG_GCOV_KERNEL
|
||||
scripts/config --file "$CONF_FILE" --disable GCOV_PROFILE_ALL
|
||||
scripts/config --file "$CONF_FILE" --disable GCOV_PROFILE_RDS
|
||||
scripts/config "${FLAGS[@]}" --disable CONFIG_GCOV_KERNEL
|
||||
scripts/config "${FLAGS[@]}" --disable GCOV_PROFILE_ALL
|
||||
scripts/config "${FLAGS[@]}" --disable GCOV_PROFILE_RDS
|
||||
fi
|
||||
|
||||
# need network namespaces to run tests with veth network interfaces
|
||||
scripts/config --file "$CONF_FILE" --enable CONFIG_NET_NS
|
||||
scripts/config --file "$CONF_FILE" --enable CONFIG_VETH
|
||||
scripts/config "${FLAGS[@]}" --enable CONFIG_NET_NS
|
||||
scripts/config "${FLAGS[@]}" --enable CONFIG_VETH
|
||||
|
||||
# simulate packet loss
|
||||
scripts/config --file "$CONF_FILE" --enable CONFIG_NET_SCH_NETEM
|
||||
scripts/config "${FLAGS[@]}" --enable CONFIG_NET_SCH_NETEM
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user