[CRIU] [RFC PATCHv2 24/32] zdtm: tests: sweep noauto tests and remove noauto status from those which run correctly
Ivan Shapovalov
intelfx at intelfx.name
Sat Mar 12 00:42:23 PST 2016
..and fix some others to make them run correctly.
Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
test/zdtm/static/cow00.desc | 1 -
test/zdtm/static/fd.desc | 1 -
test/zdtm/static/inotify02.desc | 1 -
test/zdtm/static/maps03.desc | 1 -
test/zdtm/static/mem-touch.desc | 1 -
test/zdtm/static/session02.c | 2 +-
test/zdtm/static/tty00.desc | 1 -
test/zdtm/static/unhashed_proc.c | 12 +++++++++++-
test/zdtm/static/uptime_grow.desc | 1 -
test/zdtm/static/vfork00.desc | 2 +-
test/zdtm/transition/epoll.desc | 1 -
test/zdtm/transition/fifo_dyn.desc | 1 -
test/zdtm/transition/fifo_loop.desc | 1 -
test/zdtm/transition/file_aio.desc | 1 -
test/zdtm/transition/ptrace.desc | 1 -
test/zdtm/transition/socket_loop00.desc | 1 -
test/zdtm/transition/unix_sock.desc | 1 -
17 files changed, 13 insertions(+), 17 deletions(-)
delete mode 100644 test/zdtm/static/cow00.desc
delete mode 100644 test/zdtm/static/fd.desc
delete mode 100644 test/zdtm/static/inotify02.desc
delete mode 100644 test/zdtm/static/maps03.desc
delete mode 100644 test/zdtm/static/mem-touch.desc
delete mode 100644 test/zdtm/static/tty00.desc
delete mode 100644 test/zdtm/static/uptime_grow.desc
delete mode 100644 test/zdtm/transition/epoll.desc
delete mode 100644 test/zdtm/transition/fifo_dyn.desc
delete mode 100644 test/zdtm/transition/fifo_loop.desc
delete mode 100644 test/zdtm/transition/file_aio.desc
delete mode 100644 test/zdtm/transition/ptrace.desc
delete mode 100644 test/zdtm/transition/socket_loop00.desc
delete mode 100644 test/zdtm/transition/unix_sock.desc
diff --git a/test/zdtm/static/cow00.desc b/test/zdtm/static/cow00.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/static/cow00.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/static/fd.desc b/test/zdtm/static/fd.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/static/fd.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/static/inotify02.desc b/test/zdtm/static/inotify02.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/static/inotify02.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/static/maps03.desc b/test/zdtm/static/maps03.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/static/maps03.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/static/mem-touch.desc b/test/zdtm/static/mem-touch.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/static/mem-touch.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/static/session02.c b/test/zdtm/static/session02.c
index 6c5e771..0c295e2 100644
--- a/test/zdtm/static/session02.c
+++ b/test/zdtm/static/session02.c
@@ -320,7 +320,7 @@ int main(int argc, char ** argv)
goto err;
pass();
-
+ cleanup();
return 0;
err:
cleanup();
diff --git a/test/zdtm/static/tty00.desc b/test/zdtm/static/tty00.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/static/tty00.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/static/unhashed_proc.c b/test/zdtm/static/unhashed_proc.c
index 1fdc38f..f3ad13c 100644
--- a/test/zdtm/static/unhashed_proc.c
+++ b/test/zdtm/static/unhashed_proc.c
@@ -15,10 +15,15 @@ const char *test_author = "Konstantin Khlebnikov <khlebnikov at openvz.org>";
int main(int argc, char ** argv)
{
int pid, len;
- char cwd1[PATH_MAX], cwd2[PATH_MAX];
+ char cwd_initial[PATH_MAX], cwd1[PATH_MAX], cwd2[PATH_MAX];
test_init(argc, argv);
+ if (getcwd(cwd_initial, sizeof(cwd_initial)) == NULL) {
+ pr_perror("Failed to getcwd() initial working directory");
+ exit(1);
+ }
+
pid = fork();
if (pid < 0) {
pr_perror("fork failed");
@@ -75,6 +80,11 @@ int main(int argc, char ** argv)
if (strcmp(cwd1, cwd2))
test_msg("cwd differs: %s != %s\n", cwd1, cwd2);
+ if (chdir(cwd_initial) < 0) {
+ pr_perror("Failed to chdir() into initial working directory after verification");
+ exit(1);
+ }
+
pass();
return 0;
diff --git a/test/zdtm/static/uptime_grow.desc b/test/zdtm/static/uptime_grow.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/static/uptime_grow.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/static/vfork00.desc b/test/zdtm/static/vfork00.desc
index 802caed..ded8987 100644
--- a/test/zdtm/static/vfork00.desc
+++ b/test/zdtm/static/vfork00.desc
@@ -1 +1 @@
-{'flags': 'noauto crfail'}
+{'flags': 'crfail'}
diff --git a/test/zdtm/transition/epoll.desc b/test/zdtm/transition/epoll.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/transition/epoll.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/transition/fifo_dyn.desc b/test/zdtm/transition/fifo_dyn.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/transition/fifo_dyn.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/transition/fifo_loop.desc b/test/zdtm/transition/fifo_loop.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/transition/fifo_loop.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/transition/file_aio.desc b/test/zdtm/transition/file_aio.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/transition/file_aio.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/transition/ptrace.desc b/test/zdtm/transition/ptrace.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/transition/ptrace.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/transition/socket_loop00.desc b/test/zdtm/transition/socket_loop00.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/transition/socket_loop00.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
diff --git a/test/zdtm/transition/unix_sock.desc b/test/zdtm/transition/unix_sock.desc
deleted file mode 100644
index 95c58b4..0000000
--- a/test/zdtm/transition/unix_sock.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'noauto'}
--
2.7.2
More information about the CRIU
mailing list