From patchwork Wed Jul 4 15:51:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v5,13/19] epoll: Add kcmp_epoll check From: Cyrill Gorcunov X-Patchwork-Id: 8819 Message-Id: <20180704155147.29114-14-gorcunov@gmail.com> To: crml Cc: Andrey Vagin Date: Wed, 4 Jul 2018 18:51:41 +0300 To run epoll tests only where it is supported. Signed-off-by: Cyrill Gorcunov --- criu/cr-check.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/criu/cr-check.c b/criu/cr-check.c index ff4d9a4bb84b..f534a110515b 100644 --- a/criu/cr-check.c +++ b/criu/cr-check.c @@ -1110,6 +1110,14 @@ static int check_pid_for_children_ns(void) return 0; } +static int check_kcmp_epoll(void) +{ + if (!kdat.has_kcmp_epoll_tfd) + return -1; + + return 0; +} + static int (*chk_feature)(void); /* @@ -1221,6 +1229,7 @@ int cr_check(void) ret |= check_ns_get_userns(); ret |= check_ns_get_parent(); ret |= check_pid_for_children_ns(); + ret |= check_kcmp_epoll(); } /* @@ -1309,6 +1318,7 @@ static struct feature_list feature_list[] = { { "ns_get_userns", check_ns_get_userns }, { "ns_get_parent", check_ns_get_parent }, { "pid_for_children_ns", check_pid_for_children_ns}, + { "kcmp_epoll", check_kcmp_epoll}, { NULL, NULL }, };