mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +00:00
zdtm.sh: use tmpfs for dump files
It's optional. It's going to be used in jenkins. time bash -x test//zdtm.sh static/maps04 real 0m40.220s user 0m0.096s sys 0m12.822s time bash -x test//zdtm.sh -t static/maps04 real 0m9.904s user 0m0.074s sys 0m1.630s 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
c9c9fe479e
commit
97ee174a99
21
test/zdtm.sh
21
test/zdtm.sh
@@ -193,13 +193,16 @@ EOF
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
umount_zdtm_root()
|
exit_callback()
|
||||||
{
|
{
|
||||||
[ -z "$ZDTM_ROOT" ] && return;
|
[ -n "$ZDTM_ROOT" ] && {
|
||||||
umount -l "$ZDTM_ROOT"
|
umount -l "$ZDTM_ROOT"
|
||||||
rmdir "$ZDTM_ROOT"
|
rmdir "$ZDTM_ROOT"
|
||||||
|
}
|
||||||
|
[ -n "$TMPFS_DUMP" ] &&
|
||||||
|
umount -l "$TMPFS_DUMP"
|
||||||
}
|
}
|
||||||
trap umount_zdtm_root EXIT
|
trap exit_callback EXIT
|
||||||
|
|
||||||
construct_root()
|
construct_root()
|
||||||
{
|
{
|
||||||
@@ -497,6 +500,13 @@ while :; do
|
|||||||
shift
|
shift
|
||||||
continue;
|
continue;
|
||||||
fi
|
fi
|
||||||
|
if [ "$1" = "-t" ]; then
|
||||||
|
shift
|
||||||
|
TMPFS_DUMP=dump
|
||||||
|
[ -d dump ] || mkdir $TMPFS_DUMP
|
||||||
|
mount -t tmpfs none $TMPFS_DUMP || exit 1
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
break;
|
break;
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -532,6 +542,7 @@ Options:
|
|||||||
-C : Delete dump files if a test completed successfully
|
-C : Delete dump files if a test completed successfully
|
||||||
-b <commit> : Check backward compatibility
|
-b <commit> : Check backward compatibility
|
||||||
-x <PATTERN>: Exclude pattern
|
-x <PATTERN>: Exclude pattern
|
||||||
|
-t : mount tmpfs for dump files
|
||||||
EOF
|
EOF
|
||||||
elif [ "${1:0:1}" = '-' ]; then
|
elif [ "${1:0:1}" = '-' ]; then
|
||||||
echo "unrecognized option $1"
|
echo "unrecognized option $1"
|
||||||
|
Reference in New Issue
Block a user