diff options
Diffstat (limited to 'src/tests')
l--------- | src/tests/deps-exe/test-nsssd-switch | 1 | ||||
l--------- | src/tests/test-nsssd-switch.baseline | 1 | ||||
l--------- | src/tests/test-nsssd-switch.c | 1 | ||||
-rwxr-xr-x | src/tests/test-nsssd-switch.wrapper | 21 |
4 files changed, 24 insertions, 0 deletions
diff --git a/src/tests/deps-exe/test-nsssd-switch b/src/tests/deps-exe/test-nsssd-switch new file mode 120000 index 0000000..9cb6054 --- /dev/null +++ b/src/tests/deps-exe/test-nsssd-switch @@ -0,0 +1 @@ +test-switch
\ No newline at end of file diff --git a/src/tests/test-nsssd-switch.baseline b/src/tests/test-nsssd-switch.baseline new file mode 120000 index 0000000..28f1c7a --- /dev/null +++ b/src/tests/test-nsssd-switch.baseline @@ -0,0 +1 @@ +test-switch.baseline
\ No newline at end of file diff --git a/src/tests/test-nsssd-switch.c b/src/tests/test-nsssd-switch.c new file mode 120000 index 0000000..08323c4 --- /dev/null +++ b/src/tests/test-nsssd-switch.c @@ -0,0 +1 @@ +test-switch.c
\ No newline at end of file diff --git a/src/tests/test-nsssd-switch.wrapper b/src/tests/test-nsssd-switch.wrapper new file mode 100755 index 0000000..8e05937 --- /dev/null +++ b/src/tests/test-nsssd-switch.wrapper @@ -0,0 +1,21 @@ +#!/bin/sh -e + +S=./.test-switch-socket +F=./.test-switch-fifo + +pid=0 + +cleanup () { + kill $pid + rm -f $S +} + +mkfifo $F +head -n 1 < $F >/dev/null & +pid=$! +s6-ipcserver -1 -- $S ./nsssd-switch 0 ' ./nsssd-unix' '' > $F & +wait $pid +pid=$! +rm -f $F +trap cleanup TERM INT EXIT +./test-nsssd-switch |