mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 16:25:31 +00:00
check: Add kcmp test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
7570fbbf6a
commit
0cf8d1e158
13
cr-check.c
13
cr-check.c
@@ -4,6 +4,7 @@
|
|||||||
#include "crtools.h"
|
#include "crtools.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "util-net.h"
|
#include "util-net.h"
|
||||||
|
#include "syscall.h"
|
||||||
|
|
||||||
static int check_map_files(void)
|
static int check_map_files(void)
|
||||||
{
|
{
|
||||||
@@ -63,6 +64,17 @@ static int check_sock_peek_off(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int check_kcmp(void)
|
||||||
|
{
|
||||||
|
int ret = sys_kcmp(getpid(), -1, -1, -1, -1);
|
||||||
|
|
||||||
|
if (ret != -ENOSYS)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
pr_msg("System call kcmp is not supported\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
int cr_check(void)
|
int cr_check(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@@ -71,6 +83,7 @@ int cr_check(void)
|
|||||||
ret |= check_sock_diag();
|
ret |= check_sock_diag();
|
||||||
ret |= check_ns_last_pid();
|
ret |= check_ns_last_pid();
|
||||||
ret |= check_sock_peek_off();
|
ret |= check_sock_peek_off();
|
||||||
|
ret |= check_kcmp();
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
pr_msg("Looks good.\n");
|
pr_msg("Looks good.\n");
|
||||||
|
Reference in New Issue
Block a user