Create two of them, bind both and connect one end to the other.
Then check that send and sendto work and recv(from) receive proper
message from proper address.
Queues are expected to be dropped while test according to protocol
constraints, thus all sends happen after restore.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This test is based on original version by xemul@ - second message to queue
added.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
In case if time is modified in ls -l output we should
not treat it as error, interrupting zdtm work
-lrwx------ 1 root root 64 Feb 17 14:52 0 -> /dev/null
-lrwx------ 1 root root 64 Feb 17 14:52 1 -> /dev/null
-lrwx------ 1 root root 64 Feb 17 14:52 2 -> /dev/null
+lrwx------ 1 root root 64 Feb 17 14:53 0 -> /dev/null
+lrwx------ 1 root root 64 Feb 17 14:53 1 -> /dev/null
+lrwx------ 1 root root 64 Feb 17 14:53 2 -> /dev/null
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
* Remove redundant messages
* Show which test will be executed
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Added cloning to new IPC ns depends on built option.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
* 'zdtm' of https://github.com/avagin/crtools:
zdtm: remove white spaces
zdtm: transmit to crtools dump
zdtm: don't kill test processes in case an error
v2: New "MSG_STEAL" functionality is used
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Otherwise test will sleep in kernel in case of queue is emptry on read or
queue is full on write.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
This patch adds new option -d.
zdtm.sh -d ... does not do restore and instead of that it
wakes up test processes after dump and check results of the test.
Signed-off-by: Andrey Vagin <avagin@gmail.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
2 processes - 1 semaphore per each. Both processes checks it's sem migration
by id. Child also checks parent semaphore migration my key.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
v2: msgque test removed from zdtm.sh (feature is not supported yet)
1) Added namesapce isolation
2) Added non-empty queue state before migration
3) Added one more backward message send (child send message back
after receiving one from parent).
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
v2: fixed returning zero (errno) value in case of sys_write() didn't fail.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
1) pass cmd line args to function to clone to - required for parametrized
tests.
2) handle function result - required for multi-process tests.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
crtools doesn't restore sockopts, so if a test is executed in
a second time bind() may return EADDRINUSE
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
v2: cleanup issues fixed
What's new:
1) cloning to new IPC ns depends on built option.
2) Check for lookup shared segment by key added.
3) Check for creation new segnent after migration added.
4) Few check for syscalls results added.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
Put echo to a separate line to
- keep the text within 80 columns
- visually check that the positions of semicolons are the same
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
(1) We should use -w so we can't match a substring
(2) No need to use quotes
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
If we use shift and $* in run_test(), there is no need to quote arguments.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrey Vagin <avagin@gmail.com>