criu version 1.3 has been tagged, which has the minimal set of patches to allow
checkpointing and restoring containers. lxc-test-checkpoint-restore is now
skipped on any version of criu lower than 1.3.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
exit 1
fi
-if [ "$(criu --version | head -n1 | cut -d' ' -f 2)" != "1.3-rc2" ]; then
+verlte() {
+ ! [ "$1" = "$(printf "$1\n$2" | sort -V | tail -n1)" ]
+}
+
+criu_version="$(criu --version | head -n1 | cut -d' ' -f 2)"
+
+if verlte "$criu_version" "1.3"; then
echo "SKIP: skipping test because no (or wrong) criu installed."
exit 0
fi