mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 09:39:13 +00:00
zdtm: update static/ipc_namespace test due to ns isolation changes
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Andrey Vagin <avagin@gmail.com>
This commit is contained in:
parent
1094c358fe
commit
d131bdfcee
1 changed files with 14 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue