mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
zdtm.sh: don't generate a test list if a test is specified
Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
e636a226c8
commit
cb3984844b
21
test/zdtm.sh
21
test/zdtm.sh
@@ -18,6 +18,11 @@ ZP="zdtm/live"
|
||||
|
||||
source $(readlink -f `dirname $0`/env.sh) || exit 1
|
||||
|
||||
generate_test_list()
|
||||
{
|
||||
|
||||
check_mainstream || exit 1
|
||||
|
||||
TEST_LIST="
|
||||
static/pipe00
|
||||
static/pipe01
|
||||
@@ -294,16 +299,19 @@ ns/static/mntns_root_bind
|
||||
$CRIU check --feature "userns"
|
||||
if [ $? -eq 0 ]; then
|
||||
blist=`mktemp /tmp/zdtm.black.XXXXXX`
|
||||
echo "$BLACKLIST_FOR_USERNS" | sort > $blist
|
||||
echo "$BLACKLIST_FOR_USERNS" | tr -d "[:blank:]" | sort > $blist
|
||||
|
||||
|
||||
TEST_LIST="$TEST_LIST
|
||||
`echo "$TEST_LIST" | grep "^ns/" | sort | \
|
||||
`echo "$TEST_LIST" | tr -d "[:blank:]" | grep "^ns/" | sort | \
|
||||
diff --changed-group-format="%<" --unchanged-group-format="" - $blist | \
|
||||
sed s#ns/#ns/user/#`"
|
||||
unlink $blist
|
||||
fi
|
||||
|
||||
TEST_LIST=$(echo $TEST_LIST | tr " " "\n")
|
||||
}
|
||||
|
||||
TEST_SUID_LIST="
|
||||
pid00
|
||||
caps00
|
||||
@@ -1037,7 +1045,8 @@ while :; do
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
echo $TEST_LIST | tr ' ' '\n' >&3
|
||||
generate_test_list
|
||||
echo "$TEST_LIST" >&3
|
||||
exit 0
|
||||
;;
|
||||
-v)
|
||||
@@ -1055,7 +1064,6 @@ while :; do
|
||||
# pidns is used to avoid conflicts
|
||||
# mntns is used to mount /proc
|
||||
# net is used to avoid conflicts of parasite sockets
|
||||
make zdtm_ct &&
|
||||
./zdtm_ct ./zdtm.sh "$@"
|
||||
exit
|
||||
}
|
||||
@@ -1088,16 +1096,13 @@ if [ $SPECIFIED_NAME_USED -eq 1 ]; then
|
||||
fi
|
||||
run_test $1 || case_error $1
|
||||
else
|
||||
if [ $COMPILE_ONLY -eq 0 ]; then
|
||||
check_mainstream || exit 1
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
pattern='.*'
|
||||
else
|
||||
pattern=$1
|
||||
fi
|
||||
|
||||
generate_test_list
|
||||
for t in $(echo "$TEST_LIST" | grep -x "$pattern"); do
|
||||
run_test $t || case_error $t
|
||||
done
|
||||
|
Reference in New Issue
Block a user