[CRIU] [PATCH] Tests sysv5 msg queues.

Pavel Ganyushin pganyushin at odin.com
Wed Nov 25 05:45:36 PST 2015


This is old missed test.

Signed-off-by: Pavel Ganyushin <pganyushin at odin.com>
---
 test/zdtm/live/static/msgq00.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 test/zdtm/live/static/msgq00.c

diff --git a/test/zdtm/live/static/msgq00.c b/test/zdtm/live/static/msgq00.c
new file mode 100644
index 0000000..23630dd
--- /dev/null
+++ b/test/zdtm/live/static/msgq00.c
@@ -0,0 +1,28 @@
+#include <stdlib.h>
+#include <sys/msg.h>
+
+#include "zdtmtst.h"
+
+const char *test_doc	= "Block migration by holding a message queue";
+const char *test_author	= "Pavel Emelianov <xemul at sw.ru>";
+
+int main(int argc, char ** argv)
+{
+	int msg;
+
+	test_init(argc, argv);
+
+	msg = msgget(IPC_PRIVATE, IPC_CREAT | 0644);
+	if (msg < 0) {
+		err("msgget failed: %m");
+		exit(1);
+	}
+
+	test_daemon();
+	test_waitsig();
+
+	msgctl(msg, IPC_RMID, 0);
+
+	pass();
+	return 0;
+}
-- 
1.9.3



More information about the CRIU mailing list