mirror of
https://github.com/uselessd/alcove.git
synced 2026-04-15 17:25:33 +00:00
setns: use the test directory
In a freshly checked out repo, priv doesn't exist yet.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user