[CRIU] [PATCH] test: a few fixes for other tests

Andrew Vagin avagin at openvz.org
Fri Apr 24 08:59:29 PDT 2015


Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 test/pipes/Makefile    | 2 +-
 test/pipes/pipe.c      | 9 +++++++--
 test/security/Makefile | 2 ++
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/test/pipes/Makefile b/test/pipes/Makefile
index bd4c563..dbfae4e 100644
--- a/test/pipes/Makefile
+++ b/test/pipes/Makefile
@@ -2,7 +2,7 @@ CFLAGS += -Wall
 pipe: pipe.c
 clean:
 	rm -f pipe
-run:
+run: pipe
 	./pipe - &&		\
 	./pipe -c &&		\
 	./pipe -cl &&		\
diff --git a/test/pipes/pipe.c b/test/pipes/pipe.c
index 4a0331c..0b9a5dd 100644
--- a/test/pipes/pipe.c
+++ b/test/pipes/pipe.c
@@ -456,8 +456,13 @@ void restore_child(int *new_pipefd, char *old_pipe_name)
 					"%s", INHERIT_FD_OPTION);
 				snprintf(inh_file_arg, sizeof inh_file_arg,
 					"fd[%d]:%s", filefd, OLD_LOG_FILE + 1);
-			}
-		}
+
+				restore_argv[13] = inh_file_opt;
+			} else
+				restore_argv[13] = NULL;
+			restore_argv[11] = inh_pipe_opt;
+		} else
+			restore_argv[11] = NULL;
 
 		snprintf(buf, sizeof buf, "%s/%s", IMG_DIR, RESTORE_PID_FILE);
 		unlink_safe(buf);
diff --git a/test/security/Makefile b/test/security/Makefile
index a1e3efc..6d5110b 100644
--- a/test/security/Makefile
+++ b/test/security/Makefile
@@ -22,6 +22,8 @@ testdir: ../../criu
 	chmod 777 $(DIR)
 
 users:
+	-userdel -f $(USR1)
+	-userdel -f $(USR2)
 	useradd -M -U $(USR1)
 	useradd -M -U $(USR2)
 	usermod -a -G $(USR2) $(USR1)
-- 
2.1.0



More information about the CRIU mailing list