X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=test%2Fblackbox%2Fcommon%2Ftcpdump.c;h=7839a422955e5c817801bb082a447e1f5c769f29;hp=a0933f73092c3e9716c0319b3cbff78811c6f58f;hb=1c04402a6d2f3a85d0cb4a5b4a6db5b1f3a79511;hpb=6054182c9e208fd0b3f5c6c90f54cb5af75d3f5c diff --git a/test/blackbox/common/tcpdump.c b/test/blackbox/common/tcpdump.c index a0933f73..7839a422 100644 --- a/test/blackbox/common/tcpdump.c +++ b/test/blackbox/common/tcpdump.c @@ -25,6 +25,7 @@ #include #include #include "common_handlers.h" +#include "containers.h" #include "tcpdump.h" pid_t tcpdump_start(char *interface) { @@ -32,7 +33,7 @@ pid_t tcpdump_start(char *interface) { char *argv[] = { "tcpdump", "-i", interface, NULL }; // child process have a pipe to the parent process when parent process terminates SIGPIPE kills the tcpdump int pipes[2]; - pipe(pipes); + assert(pipe(pipes) != -1); PRINT_TEST_CASE_MSG("\x1b[32mLaunching TCP Dump ..\x1b[0m\n"); if((tcpdump_pid = fork()) == 0) {