Skip to content

Commit 15d7aac

Browse files
committed
test/others: add test for check() with libcriu
Signed-off-by: Radostin Stoyanov <[email protected]>
1 parent 4ea4e73 commit 15d7aac

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

test/others/libcriu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ TESTS += test_iters
88
TESTS += test_errno
99
TESTS += test_join_ns
1010
TESTS += test_pre_dump
11+
TESTS += test_check
1112
TESTS += test_feature_check
1213

1314
all: $(TESTS)

test/others/libcriu/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ if [ "$(uname -m)" = "x86_64" ]; then
6363
fi
6464
run_test test_errno
6565
run_test test_join_ns
66+
run_test test_check
6667
if criu check --feature mem_dirty_track > /dev/null; then
6768
export CRIU_FEATURE_MEM_TRACK=1
6869
fi

test/others/libcriu/test_check.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <stdio.h>
2+
#include "criu.h"
3+
#include "lib.h"
4+
5+
int main(int argc, char **argv)
6+
{
7+
int ret;
8+
9+
printf("--- Start check ---\n");
10+
criu_init_opts();
11+
criu_set_service_binary(argv[1]);
12+
13+
if (criu_check())
14+
return -1;
15+
16+
return 0;
17+
}

0 commit comments

Comments
 (0)