Commit 77f9b7bf authored by Pavel Emelyanov's avatar Pavel Emelyanov

jenkins: Add test for crit de/encode correctness

The crit tool should decode and encode all images and after
de- and en- sequence the result should be the same as before.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Acked-by: 's avatarRuslan Kuprieiev <rkuprieiev@cloudlinux.com>
parent 7a5cef1e
# Check how crit de/encodes images
set -e
source `dirname $0`/criu-lib.sh
prep
./test/zdtm.py run --all -f best -x maps04 -x cgroup02 --norst --keep always || fail
images_list=$(find "test/dump/" -name '*.img')
crit="./crit"
for x in $images_list
do
[[ "$(basename $x)" == pages* ]] && continue
echo "Check $x"
$crit decode -o "$x"".json" < $x || fail
$crit encode -i "$x"".json" > "$x"".json.img" || fail
cmp "$x" "${x}.json.img" || _exit $x
rm -f "${x}.json.img"
$crit decode -o "$x"".json" --pretty < $x || fail
$crit encode -i "$x"".json" > "$x"".json.img" || fail
cmp "$x" "${x}.json.img" || fail
rm -f "${x}.json.img"
done
echo "PASS"
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