setns: use the test directory

In a freshly checked out repo, priv doesn't exist yet.
This commit is contained in:
Michael Santos
2014-05-03 08:26:36 -04:00
parent 53cb7a2ab8
commit 05f97980ef

View File

@@ -1,13 +1,14 @@
case os:type() of
{unix,linux} ->
Setns = "
#define _GNU_SOURCE
#include <sched.h>
int main(int argc, char *argv[]) {
(void)setns(0,0);
return 0;
}",
file:write_file("priv/test_setns.c", Setns),
Retval = os:cmd("gcc -o /dev/null priv/test_setns.c > /dev/null 2>&1; printf \"%d\" $?"),
file:write_file("test/test_setns.c", Setns),
Retval = os:cmd("gcc -o /dev/null test/test_setns.c > /dev/null 2>&1; printf \"%d\" $?"),
case Retval of
"0" ->
lists:map(fun