]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Allow criu >= 1.3 in c/r test
authorTycho Andersen <tycho.andersen@canonical.com>
Fri, 5 Sep 2014 13:43:15 +0000 (08:43 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 19 Sep 2014 21:00:07 +0000 (17:00 -0400)
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>
src/tests/lxc-test-checkpoint-restore

index 43068ef44ab88aadbe7f6311ea0a32fbe40cbfca..c25d941e27e68003be9c0dc9ec88600fe1e46a61 100755 (executable)
@@ -15,7 +15,13 @@ if [ "$(id -u)" != "0" ]; then
        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