aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2014-01-04 09:25:27 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2014-01-04 09:25:27 +0000
commitb298769db369b50e55a5b2c483041078acf85334 (patch)
tree21cb402a11197196c36b07813b7f1792585e3207 /tools
parent146ff0f40f5f07d72d8804d567af9d967d74099a (diff)
Notes
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/capsicum/libcapsicum/Makefile10
-rw-r--r--tools/regression/capsicum/libcapsicum/dns.c3
-rw-r--r--tools/regression/capsicum/libcapsicum/grp.c3
-rw-r--r--tools/regression/capsicum/libcapsicum/pwd.c11
-rw-r--r--tools/regression/capsicum/libcapsicum/sysctl.c3
5 files changed, 18 insertions, 12 deletions
diff --git a/tools/regression/capsicum/libcapsicum/Makefile b/tools/regression/capsicum/libcapsicum/Makefile
index 6fc98ba7d946..468fa334d3fa 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 bb7f613dd3ff..239c6475983b 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 1d3adfb845aa..5e33b8acbe8e 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 161885dd4214..82ea8c04d9e7 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 14c735f0e767..38c686dfcd8f 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);