mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 15:25:21 +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
|
source $(readlink -f `dirname $0`/env.sh) || exit 1
|
||||||
|
|
||||||
|
generate_test_list()
|
||||||
|
{
|
||||||
|
|
||||||
|
check_mainstream || exit 1
|
||||||
|
|
||||||
TEST_LIST="
|
TEST_LIST="
|
||||||
static/pipe00
|
static/pipe00
|
||||||
static/pipe01
|
static/pipe01
|
||||||
@@ -294,16 +299,19 @@ ns/static/mntns_root_bind
|
|||||||
$CRIU check --feature "userns"
|
$CRIU check --feature "userns"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
blist=`mktemp /tmp/zdtm.black.XXXXXX`
|
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
|
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 | \
|
diff --changed-group-format="%<" --unchanged-group-format="" - $blist | \
|
||||||
sed s#ns/#ns/user/#`"
|
sed s#ns/#ns/user/#`"
|
||||||
unlink $blist
|
unlink $blist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
TEST_LIST=$(echo $TEST_LIST | tr " " "\n")
|
||||||
|
}
|
||||||
|
|
||||||
TEST_SUID_LIST="
|
TEST_SUID_LIST="
|
||||||
pid00
|
pid00
|
||||||
caps00
|
caps00
|
||||||
@@ -1037,7 +1045,8 @@ while :; do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-l)
|
-l)
|
||||||
echo $TEST_LIST | tr ' ' '\n' >&3
|
generate_test_list
|
||||||
|
echo "$TEST_LIST" >&3
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-v)
|
-v)
|
||||||
@@ -1055,7 +1064,6 @@ while :; do
|
|||||||
# pidns is used to avoid conflicts
|
# pidns is used to avoid conflicts
|
||||||
# mntns is used to mount /proc
|
# mntns is used to mount /proc
|
||||||
# net is used to avoid conflicts of parasite sockets
|
# net is used to avoid conflicts of parasite sockets
|
||||||
make zdtm_ct &&
|
|
||||||
./zdtm_ct ./zdtm.sh "$@"
|
./zdtm_ct ./zdtm.sh "$@"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
@@ -1088,16 +1096,13 @@ if [ $SPECIFIED_NAME_USED -eq 1 ]; then
|
|||||||
fi
|
fi
|
||||||
run_test $1 || case_error $1
|
run_test $1 || case_error $1
|
||||||
else
|
else
|
||||||
if [ $COMPILE_ONLY -eq 0 ]; then
|
|
||||||
check_mainstream || exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
pattern='.*'
|
pattern='.*'
|
||||||
else
|
else
|
||||||
pattern=$1
|
pattern=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
generate_test_list
|
||||||
for t in $(echo "$TEST_LIST" | grep -x "$pattern"); do
|
for t in $(echo "$TEST_LIST" | grep -x "$pattern"); do
|
||||||
run_test $t || case_error $t
|
run_test $t || case_error $t
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user