diff options
-rw-r--r-- | tools/regression/capsicum/libcapsicum/Makefile | 10 | ||||
-rw-r--r-- | tools/regression/capsicum/libcapsicum/dns.c | 3 | ||||
-rw-r--r-- | tools/regression/capsicum/libcapsicum/grp.c | 3 | ||||
-rw-r--r-- | tools/regression/capsicum/libcapsicum/pwd.c | 11 | ||||
-rw-r--r-- | tools/regression/capsicum/libcapsicum/sysctl.c | 3 |
5 files changed, 18 insertions, 12 deletions
diff --git a/tools/regression/capsicum/libcapsicum/Makefile b/tools/regression/capsicum/libcapsicum/Makefile index 6fc98ba..468fa33 100644 --- a/tools/regression/capsicum/libcapsicum/Makefile +++ b/tools/regression/capsicum/libcapsicum/Makefile @@ -15,12 +15,14 @@ CFLAGS+= -Wold-style-definition -Wno-pointer-sign CFLAGS+= -I${.CURDIR}/../../../../lib/libcapsicum CFLAGS+= -ggdb -all: ${SERVICES} +SERVTEST= ${SERVICES:=.t} + +all: ${SERVTEST} .for SERVICE in ${SERVICES} -${SERVICE}: ${SERVICE}.c - ${CC} ${CFLAGS} ${@}.c -o $@ -lcapsicum -lnv +${SERVICE}.t: ${SERVICE}.c + ${CC} ${CFLAGS} ${@:.t=.c} -o $@ -lcapsicum -lnv .endfor @@ -28,4 +30,4 @@ test: all @prove -r ${.CURDIR} clean: - rm -f ${SERVICES} + rm -f ${SERVTEST} diff --git a/tools/regression/capsicum/libcapsicum/dns.c b/tools/regression/capsicum/libcapsicum/dns.c index bb7f613..239c647 100644 --- a/tools/regression/capsicum/libcapsicum/dns.c +++ b/tools/regression/capsicum/libcapsicum/dns.c @@ -64,6 +64,7 @@ static int ntest = 1; printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ exit(1); \ } \ + ntest++; \ } while (0) #define GETHOSTBYNAME 0x01 @@ -223,7 +224,7 @@ main(void) const char *types[2]; int families[2]; - printf("1..89\n"); + printf("1..91\n"); capcas = cap_init(); CHECKX(capcas != NULL); diff --git a/tools/regression/capsicum/libcapsicum/grp.c b/tools/regression/capsicum/libcapsicum/grp.c index 1d3adfb..5e33b8a 100644 --- a/tools/regression/capsicum/libcapsicum/grp.c +++ b/tools/regression/capsicum/libcapsicum/grp.c @@ -61,6 +61,7 @@ static int ntest = 1; printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ exit(1); \ } \ + ntest++; \ } while (0) #define GID_WHEEL 0 @@ -1522,7 +1523,7 @@ main(void) { cap_channel_t *capcas, *capgrp; - printf("1..197\n"); + printf("1..199\n"); capcas = cap_init(); CHECKX(capcas != NULL); diff --git a/tools/regression/capsicum/libcapsicum/pwd.c b/tools/regression/capsicum/libcapsicum/pwd.c index 161885d..82ea8c0 100644 --- a/tools/regression/capsicum/libcapsicum/pwd.c +++ b/tools/regression/capsicum/libcapsicum/pwd.c @@ -49,18 +49,19 @@ static int ntest = 1; #define CHECK(expr) do { \ if ((expr)) \ - printf("ok # %d %s:%u\n", ntest, __FILE__, __LINE__); \ + printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ else \ - printf("not ok # %d %s:%u\n", ntest, __FILE__, __LINE__);\ + printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__);\ ntest++; \ } while (0) #define CHECKX(expr) do { \ if ((expr)) { \ - printf("ok # %d %s:%u\n", ntest, __FILE__, __LINE__); \ + printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ } else { \ - printf("not ok # %d %s:%u\n", ntest, __FILE__, __LINE__);\ + printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__);\ exit(1); \ } \ + ntest++; \ } while (0) #define UID_ROOT 0 @@ -1508,7 +1509,7 @@ main(void) { cap_channel_t *capcas, *cappwd; - printf("1..186\n"); + printf("1..188\n"); capcas = cap_init(); CHECKX(capcas != NULL); diff --git a/tools/regression/capsicum/libcapsicum/sysctl.c b/tools/regression/capsicum/libcapsicum/sysctl.c index 14c735f..38c686d 100644 --- a/tools/regression/capsicum/libcapsicum/sysctl.c +++ b/tools/regression/capsicum/libcapsicum/sysctl.c @@ -73,6 +73,7 @@ static int ntest = 1; printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ exit(1); \ } \ + ntest++; \ } while (0) #define SYSCTL0_READ0 0x0001 @@ -1470,7 +1471,7 @@ main(void) int scvalue0, scvalue1; size_t scsize; - printf("1..250\n"); + printf("1..256\n"); scsize = sizeof(scvalue0); CHECKX(sysctlbyname(SYSCTL0_NAME, &scvalue0, &scsize, NULL, 0) == 0); |