1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Skip test if feature security_capabilities is not available

PR:		236863
Approved by:	asomers
MFC after:	1 month
Sponsored by:	Netflix
This commit is contained in:
Olivier Cochard 2019-03-29 08:43:21 +00:00
parent 45916554cc
commit 08e5c473f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345681
2 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ TESTSDIR= ${TESTSBASE}/sys/capsicum
ATF_TESTS_C+= bindat_connectat
ATF_TESTS_C+= ioctls_test
CFLAGS.bindat_connectat.c+= -I${SRCTOP}/tests
CFLAGS+= -I${SRCTOP}/tests
WARNS?= 6

View File

@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
#include <atf-c.h>
#include "freebsd_test_suite/macros.h"
/*
* A variant of ATF_REQUIRE that is suitable for use in child
* processes. This only works if the parent process is tripped up by
@ -73,6 +75,8 @@ ATF_TC_BODY(cap_ioctls__listen_copy, tc)
char dummy;
int s[2], status;
ATF_REQUIRE_FEATURE("security_capabilities");
s[0] = socket(AF_INET, SOCK_STREAM, 0);
ATF_REQUIRE(s[0] > 0);