mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
test/others: add test for check() with libcriu
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
parent
a1dc885027
commit
567f70ce19
3 changed files with 19 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ TESTS += test_iters
|
|||
TESTS += test_errno
|
||||
TESTS += test_join_ns
|
||||
TESTS += test_pre_dump
|
||||
TESTS += test_check
|
||||
TESTS += test_feature_check
|
||||
|
||||
all: $(TESTS)
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ if [ "$(uname -m)" = "x86_64" ]; then
|
|||
fi
|
||||
run_test test_errno
|
||||
run_test test_join_ns
|
||||
run_test test_check
|
||||
if criu check --feature mem_dirty_track > /dev/null; then
|
||||
export CRIU_FEATURE_MEM_TRACK=1
|
||||
fi
|
||||
|
|
|
|||
17
test/others/libcriu/test_check.c
Normal file
17
test/others/libcriu/test_check.c
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include <stdio.h>
|
||||
#include "criu.h"
|
||||
#include "lib.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
printf("--- Start check ---\n");
|
||||
criu_init_opts();
|
||||
criu_set_service_binary(argv[1]);
|
||||
|
||||
if (criu_check())
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue