[CRIU] [PATCH 5/7] zdtm: update static/ipc_namespace test due to ns
isolation changes
Kinsbursky Stanislav
skinsbursky at openvz.org
Fri Feb 10 03:19:43 EST 2012
Signed-off-by: Stanislav Kinsbursky <skinsbursky at parallels.com>
---
test/zdtm/live/static/ipc_namespace.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/test/zdtm/live/static/ipc_namespace.c b/test/zdtm/live/static/ipc_namespace.c
index 71e612e..6183c47 100644
--- a/test/zdtm/live/static/ipc_namespace.c
+++ b/test/zdtm/live/static/ipc_namespace.c
@@ -327,33 +327,39 @@ static void show_ipc_entry(struct ipc_ns *old, struct ipc_ns *new)
old->mq_msgsize_max, new->mq_msgsize_max);
}
-static void test_fn(void)
+static int test_fn(int argc, char **argv)
{
- if (rand_ipc_ns()) {
+ int ret;
+
+ ret = rand_ipc_ns();
+ if (ret) {
err("Failed to randomize ipc ns before migration\n");
- return;
+ return -1;
}
- if (fill_ipc_ns(&ipc_before)) {
+ ret = fill_ipc_ns(&ipc_before);
+ if (ret) {
err("Failed to collect ipc ns before migration\n");
- return;
+ return ret;
}
test_daemon();
test_waitsig();
- if (fill_ipc_ns(&ipc_after)) {
+ ret = fill_ipc_ns(&ipc_after);
+ if (ret) {
err("Failed to collect ipc ns after migration\n");
- return;
+ return ret;
}
if (memcmp(&ipc_before, &ipc_after, sizeof(ipc_after))) {
err("IPC's differ\n");
show_ipc_entry(&ipc_before, &ipc_after);
- return;
+ return -EINVAL;
}
pass();
+ return 0;
}
int main(int argc, char **argv)
More information about the CRIU
mailing list