Commit 7a2afe33 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm: allow to execute shm and msgque in userns

Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent fe44213e
......@@ -195,8 +195,8 @@ generate_test_list()
ns/static/bind-mount
ns/static/utsname
ns/static/ipc_namespace
static/shm
static/msgque
ns/static/shm
ns/static/msgque
ns/static/sem
transition/ipc
static/netns-nf
......
......@@ -28,13 +28,15 @@ struct msg1 {
#define ANOTHER_TEST_STRING "Yet another test sysv5 msg"
#define ANOTHER_MSG_TYPE 26538
static int test_fn(int argc, char **argv)
int main(int argc, char **argv)
{
key_t key;
int msg, pid;
struct msg1 msgbuf;
int chret;
test_init(argc, argv);
key = ftok(argv[0], 822155650);
if (key == -1) {
pr_perror("Can't make key");
......@@ -134,14 +136,3 @@ err:
chret = -errno;
goto out;
}
int main(int argc, char **argv)
{
#ifdef NEW_IPC_NS
test_init_ns(argc, argv, CLONE_NEWIPC, test_fn);
#else
test_init(argc, argv);
test_fn(argc, argv);
#endif
return 0;
}
......@@ -100,7 +100,7 @@ static int check_shm_key(int key, size_t size)
return check_shm_id(id, size);
}
static int test_fn(int argc, char **argv)
int main(int argc, char **argv)
{
key_t key;
int shm;
......@@ -110,6 +110,8 @@ static int test_fn(int argc, char **argv)
void *mem;
uint32_t crc = INIT_CRC;
test_init(argc, argv);
key = ftok(argv[0], 822155666);
if (key == -1) {
pr_perror("Can't make key");
......@@ -190,15 +192,3 @@ out_shm:
out:
return ret;
}
int main(int argc, char **argv)
{
#ifdef NEW_IPC_NS
test_init_ns(argc, argv, CLONE_NEWIPC, test_fn);
#else
test_init(argc, argv);
test_fn(argc, argv);
#endif
return 0;
}
{'flavor': 'h'}
{'flavor': 'ns uns'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment