mirror of
https://github.com/troglobit/finit.git
synced 2026-10-27 12:20:54 +00:00
test: HUP Finit from inside container instead ...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
5002c74876
commit
ef1bfb869f
2 files changed
+3
-1
No files matched your search
@@ -19,6 +19,8 @@ test_teardown()
|
|||||||
|
|
||||||
say "Hi, this is /run et al"
|
say "Hi, this is /run et al"
|
||||||
texec sh -c "echo 'ROOT:/bin'; ls -l /bin/; echo 'ROOT:/sbin'; ls -l /sbin/; echo 'ROOT:/run'; ls -l /run/; echo 'ROOT:/run/finit/'; ls -l /run/finit/; echo 'ROOT:/dev'; ls -l /dev/; ps; ls -l /proc/1/fd/"
|
texec sh -c "echo 'ROOT:/bin'; ls -l /bin/; echo 'ROOT:/sbin'; ls -l /sbin/; echo 'ROOT:/run'; ls -l /run/; echo 'ROOT:/run/finit/'; ls -l /run/finit/; echo 'ROOT:/dev'; ls -l /dev/; ps; ls -l /proc/1/fd/"
|
||||||
|
say "HUPing PID 1 ..."
|
||||||
|
texec sh -c "kill -HUP 1"
|
||||||
|
|
||||||
say "Test start $(date)"
|
say "Test start $(date)"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -158,6 +158,7 @@ fi
|
|||||||
finit_ppid=$!
|
finit_ppid=$!
|
||||||
echo "$finit_ppid" > "$TENV_ROOT"/running_test.pid
|
echo "$finit_ppid" > "$TENV_ROOT"/running_test.pid
|
||||||
|
|
||||||
|
>&2 echo "Finit runs as PID $finit_ppid outside of container."
|
||||||
>&2 echo "Hint: Execute 'TENV_ROOT=$TENV_ROOT $TEST_DIR/tenv/enter.sh' to enter the test namespace"
|
>&2 echo "Hint: Execute 'TENV_ROOT=$TENV_ROOT $TEST_DIR/tenv/enter.sh' to enter the test namespace"
|
||||||
log "$color_reset" 'Setup of test environment done' ''
|
log "$color_reset" 'Setup of test environment done' ''
|
||||||
|
|
||||||
@@ -170,5 +171,4 @@ fi
|
|||||||
#tty=/dev/$(texec cat /sys/class/tty/console/active)
|
#tty=/dev/$(texec cat /sys/class/tty/console/active)
|
||||||
#texec cat "$tty" &
|
#texec cat "$tty" &
|
||||||
sleep 5
|
sleep 5
|
||||||
kill -HUP "$finit_pid"
|
|
||||||
|
|
||||||
Reference in new issue
Block a user