Commit 2085e078 authored by Pavel Emelyanov's avatar Pavel Emelyanov

test: Add test for ext-mount-map option

It mostly reuses the infrastructure for plugin testing.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ec5b0d84
......@@ -100,7 +100,26 @@ test_plugin()
chk_pass "$DDIR/plugin/ns.log"
}
test_ext_mount_map()
{
echo "=== Testing how --ext-mount-map works"
mkdir "$DDIR/ext_mount_map/"
start_ns
$criu dump -D "$DDIR/ext_mount_map/" -v4 -o "dump.log" \
-t $(cat pidf) --ext-mount-map "/$EMP_MOUNTPOINT:TM" || { stop_ns; return 1; }
$criu restore -D "$DDIR/ext_mount_map/" -v4 -o "rstr.log" \
-d --root="$(pwd)/$NSROOT" --pidfile=$PIDF --ext-mount-map "TM:$EMP_ROOT_P" || { stop_ns; return 1; }
echo "Restored, checking results"
mv "$DDIR/ext_mount_map/$PIDF" .
stop_ns "$DDIR/ext_mount_map/ns.log"
chk_pass "$DDIR/ext_mount_map/ns.log"
}
test_plugin || exit 1
test_ext_mount_map || exit 1
echo "All tests passed"
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment