From fab874bf2fab1865050f0ed59b8eede2bc70d919 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Tue, 21 Aug 2012 15:32:45 +0400 Subject: [PATCH] zdtm: check external sockets Signed-off-by: Andrey Vagin Signed-off-by: Pavel Emelyanov --- test/zdtm.sh | 5 +- test/zdtm/live/static/Makefile | 1 + test/zdtm/live/static/socket-ext.c | 100 +++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 test/zdtm/live/static/socket-ext.c diff --git a/test/zdtm.sh b/test/zdtm.sh index b9645f433..fff4ba7e9 100644 --- a/test/zdtm.sh +++ b/test/zdtm.sh @@ -59,6 +59,7 @@ TEST_LIST="$TEST_LIST static/zombie00 transition/fork static/file_fown +static/socket-ext " MNT_TEST_LIST=" @@ -222,7 +223,7 @@ EOF echo Dump $PID mkdir -p $ddump save_fds $PID $ddump/dump.fd - setsid $CRTOOLS dump --evasive-devices -D $ddump -o dump.log -v 4 -t $PID $args $ARGS || { + setsid $CRTOOLS dump -x --evasive-devices -D $ddump -o dump.log -v 4 -t $PID $args $ARGS || { echo WARNING: process $tname is left running for your debugging needs return 1 } @@ -246,7 +247,7 @@ EOF done echo Restore $PID - setsid $CRTOOLS restore --log-pid -D $ddump -o restore.log -v 4 -d -t $PID $args || return 2 + setsid $CRTOOLS restore --log-pid -x -D $ddump -o restore.log -v 4 -d -t $PID $args || return 2 save_fds $PID $ddump/restore.fd diff_fds $ddump/dump.fd $ddump/restore.fd || return 2 diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile index 3c8d375f2..bffab9e8d 100644 --- a/test/zdtm/live/static/Makefile +++ b/test/zdtm/live/static/Makefile @@ -56,6 +56,7 @@ TST_NOFILE = \ mountpoints \ netns \ session01 \ + socket-ext \ # jobctl00 \ TST_FILE = \ diff --git a/test/zdtm/live/static/socket-ext.c b/test/zdtm/live/static/socket-ext.c new file mode 100644 index 000000000..6153ebd39 --- /dev/null +++ b/test/zdtm/live/static/socket-ext.c @@ -0,0 +1,100 @@ + +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "zdtmtst.h" + +const char *test_doc = "Test external sockets\n"; +const char *test_author = "Andrey Vagin