2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-26 11:57:52 +00:00

1777 Commits

Author SHA1 Message Date
Pavel Emelyanov
153c033d7e zdtm: Add sleep() to zombie00
When creating zombies we must wait for them to appear to test that we do
support zombies, but not some transient state. But the thing is that we
cannot use wait() or any other synchronous call here, thus we have to
suck and use sleep(1) :(

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-02-02 01:34:31 +04:00
Pavel Emelyanov
7050ea2ca8 zdtm: Static pstree test
I'm waiting for Andrey's

* pthread join fix
* infrastructure for fokring in zdtm

to extend it with threads.

Besides, we/me need to fix the seizing of dynamically forking tasks
to write a transition pstree test.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-02-01 17:29:23 +04:00
Andrey Vagin
dd73699b37 zdtm: set SA_RESTART everywhere 2012-02-01 16:53:37 +04:00
Andrey Vagin
0981f36179 zdtm.sh: clean up 2012-02-01 16:53:37 +04:00
Stanislav Kinsbursky
795d64574d zdtm: print test dir, dump and restore path (if any) in case of error
v7: cosmetic chages due to public pressure

v6: silly "/" miss fixed

v5: it finally workks as expected

v4: fixed wrong error print after successfull  run on all zdtm tests

v3: spaces removed

v2: print test output file path  (if present)

Print dump and restore file in case of running all tests suit.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
2012-02-01 16:53:37 +04:00
Stanislav Kinsbursky
bb6d57e856 IPC: namespace tunables migration test
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-31 22:32:22 +04:00
Stanislav Kinsbursky
0213d3ec64 namespaces: parametrized namespace option introduced
v2: strlen() check removed from parse_ns_string()

Now '-n' option must be followed by namespaces tags, separated by commas.
Currently, only "uts" namespace is supported.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-31 22:32:22 +04:00
Cyrill Gorcunov
1e694235b4 zdtm: Drop pthread00 test for a while
It requires properly syncs in test case
itself so I need to rewrite the test code
(which I'm going to do pretty soon).

Meanwhile drop this test-case.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrey Vagin <avagin@openvz.org>
2012-01-31 19:48:34 +04:00
Kir Kolyshkin
789a2c7f7a Trivial whitespace cleanup
Cleaning a few space-at-EOL occurences, plus one spaces-instead-of-tab.

Found using:

	git grep -n '[[:space:]]$'
	git grep -n '        '

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-30 21:29:42 +04:00
Cyrill Gorcunov
162bcdeacf Merge branch 'pre'
* pre:
  zdtm: Tests for xids and caps

Conflicts:
	test/zdtm.sh

The sockets00 test was added earlier.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-30 13:04:57 +04:00
Pavel Emelyanov
d40e50d7c9 zdtm: Tests for xids and caps
Rather simple and straightforward and atomic tests should be.
The only problem is that after changing any from the subj the
subsequent opens for .out/.pid files fail so test actually
forks in the beginning. That said -- we need some API in the
lib/ for such forkers.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-30 13:03:29 +04:00
Cyrill Gorcunov
25aa9e062c zdtm: Add utsname.c source code
I occasionally droppped this file but it's
a part of commit

dcd64e9d103ccf6b4c16a9c613fa371c99d0f5d2

So add it back.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-30 12:52:44 +04:00
Andrey Vagin
00a337473e zdtm: cleanout netlink00
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2012-01-30 09:37:13 +03:00
Cyrill Gorcunov
3a1de34132 zdtm: Disable strict aliasing optimization
Just disable it for a while, otherwise we get
in test/zdtm/live/streaming/netlink00.c

cc1: warnings being treated as errors
netlink00.c: In function ‘form_request_del’:
netlink00.c:311: error: dereferencing pointer ‘rtap’ does break strict-aliasing rules
netlink00.c:312: error: dereferencing pointer ‘rtap’ does break strict-aliasing rules
netlink00.c:310: note: initialized from here
netlink00.c: In function ‘form_request_add’:
netlink00.c:271: error: dereferencing pointer ‘rtap’ does break strict-aliasing rules
netlink00.c:272: error: dereferencing pointer ‘rtap’ does break strict-aliasing rules
netlink00.c:270: note: initialized from here

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-30 10:36:36 +04:00
Cyrill Gorcunov
875cbfe705 zdtm: Add sockets00 test
This covers UNIX stream sockets including
in-flight connections.

No dgram sockets yet implemented.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-27 23:21:06 +04:00
Andrey Vagin
61f50a9cf9 zdtm: remove warnings 2012-01-27 13:10:12 +04:00
Andrey Vagin
003b6e906b zdtm: move tast_daemon after preparation actions 2012-01-27 13:08:19 +04:00
Andrey Vagin
8818ee72e6 zdtm: fix warnings in mmx00.c
mmx00.c:22:34: warning: array subscript is above array bounds
[-Warray-bounds]
mmx00.c:22:34: warning: array subscript is above array bounds
[-Warray-bounds]

PSUBW handles 64 bits.
2012-01-27 12:56:22 +04:00
Andrey Vagin
af7a89778c zdtm: say no to EINTR
Everyone have known that EINTR is returned due to cpt/rst.
But it's error, we forgot to set SA_RESTART;).
2012-01-27 12:32:02 +04:00
Andrey Vagin
6a7124895a zdtm: fix warning in Makefile
Makefile💯 warning: overriding commands for target cmdlinenv00.pid'
Makefile:91: warning: ignoring old commands for target cmdlinenv00.pid'
2012-01-27 11:30:31 +04:00
Andrey Vagin
fc2de17444 zdtm: fix warning in transition/ptrace.c 2012-01-27 11:24:05 +04:00
Andrey Vagin
88bd35a47a zdtm: initilize a variable in cmdlinenv00.c 2012-01-27 11:16:09 +04:00
Andrey Vagin
c05517b131 zdtm: fix test "fork"
* handle EINTR
* add more details in an error message

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-26 19:47:58 +04:00
Pavel Emelyanov
dcd64e9d10 zdtm: Test for UTS namespace
Plus a small infrastructure change to fork a test task
in a desired namespace.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-26 19:04:09 +04:00
Stanislav Kinsbursky
993f07ba71 zdtm: print full dump or restore path on error
Usefull for debugging.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
2012-01-26 14:55:27 +04:00
Stanislav Kinsbursky
01d13d9643 zdtm: patch for socket_listen test
Cleanup and simplifyng (as requested).

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrey Vagin <avagin@gmail.com>
2012-01-26 14:55:27 +04:00
Cyrill Gorcunov
d2f664b877 make: Eliminate deps build on no-deps targets in zdtm
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Pavel Emelyanov <xemul@parallels.com>
2012-01-25 19:14:39 +04:00
Cyrill Gorcunov
a3d2b8d2d0 make: Include Makefile.inc into legacy tests
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Pavel Emelyanov <xemul@parallels.com>
2012-01-25 19:14:39 +04:00
Cyrill Gorcunov
a88cd36e7b make: Move legacy tests to test/legacy and use "make test" to run zdtm tests
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
2012-01-24 19:59:53 +04:00
Pavel Emelyanov
71fca5d2da zdtm: Include itimers test in suite
And increase the timeout value, since the timers test checks for counters
for more than 5 seconds...

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-24 18:42:32 +04:00
Cyrill Gorcunov
ed3405cf09 zdtm: Add cmdlinenv00 test case
To test restore of commandline, envirion
and auxv vector.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
2012-01-24 18:01:08 +04:00
Pavel Emelyanov
2e070f114c zdtm: Test for zombie tasks
Test that 2 different exit()-ed zombies and 2 killed with different
signals are handled properly.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-23 01:44:09 +04:00
Pavel Emelyanov
cf74b78bdc zdtm: Add simple forking test (it fails now)
I haven't found anything similar in there.

It currently just fails most of the launches because seize doesn't work
with zombies, but I'm working on it...

However, when it manages to miss the zombie it triggers the problem with
freezer (fixed by previous patch).

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-19 22:42:10 +04:00
Andrey Vagin
f00efadd2c This patches improves execution of zdtm tests.
It's really like in VZ.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-18 23:31:22 +04:00
Andrey Vagin
b601765782 devide commands and options
./crtools CMD [options]
CMD may be show, restore, dump

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-18 23:31:12 +04:00
Cyrill Gorcunov
5c083e128a Revert "zdtm: clean up socket_listen"
This reverts commit 46dc368f3112ff3c41c0e6558f1f4d10646b9bd0.

There will be another one. Instead of hard rebase I decide to
do a revert instead.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-18 16:19:31 +04:00
Andrey Vagin
46dc368f31 zdtm: clean up socket_listen
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-18 15:58:09 +04:00
Stanislav Kinsbursky
3b33e12dad tests: added listening socket migration test
This test is based on socket_aio. It's actually the same, except that socket
binding and listening is done before checkpointing and connection to socket is
done after migration.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-18 12:39:15 +04:00
Cyrill Gorcunov
5eda66dd6d zdtm: Add vDSO test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-17 02:45:53 +04:00
Pavel Emelyanov
368c4a508b restore: Close ns_last_pid file fd
Otherwise it pops up after restore in target task's fdtable.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-16 13:43:49 +04:00
Cyrill Gorcunov
4baff50c90 zdtm: Add pthread00 test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-16 13:43:13 +04:00
Pavel Emelyanov
b2cfd095fb zdtm: Make cmdline a little bit more user-friendly
Add the -l option to show the list of tests
Make the default zdtm/live/ prefix when running individual test

Now you can do it like

# sh ./zdtm.sh           for running all tests
# sh ./zdtm.sh -l        to list available tests
# sh ./zdtm.sh <test>    to run test <test>, e.g. "static/pipe00"

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-15 22:54:37 +04:00
Andrey Vagin
3b7c1a1c79 zdtm: correct e-mail
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-13 14:09:25 +04:00
Andrey Vagin
d6a1d20690 zdtm: add test cases for shared sturct file-s
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-10 18:37:13 +04:00
Cyrill Gorcunov
37782e6e00 test: Update unix sockets
To include dgram bound && connected sockets, for example

CR_FD_UNIXSK: /home/cyrill/crtools/unixsk-2813.img
----------------------------------------
fd    3 type  1 state  1 namelen    0 backlog    0 id  19505 peer  19506
fd    4 type  1 state  1 namelen    0 backlog    0 id  19506 peer  19505
fd    5 type  2 state  7 namelen    0 backlog    0 id  19507 peer      0
fd    6 type  2 state  7 namelen   18 backlog   18 id  19508 peer      0 --> test-socket-bound
fd    7 type  2 state  7 namelen    0 backlog    0 id  19509 peer  19510
fd    8 type  2 state  7 namelen   17 backlog   17 id  19510 peer      0 --> test-socket-conn
fd    9 type  2 state  7 namelen   23 backlog   23 id  19511 peer  19511 --> test-socket-bound-conn
----------------------------------------

The last one is bound and connected.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-10 17:38:59 +04:00
Cyrill Gorcunov
cc15c01832 test: Rewrite sockets test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-10 17:26:50 +04:00
Cyrill Gorcunov
25d048c02a test: Add usnix-socket test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-27 20:01:47 +04:00
Cyrill Gorcunov
4f797015e6 test: Enhance pthreads test to include fork calls
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-26 02:24:56 +04:00
Andrey Vagin
c84d194343 zdtm: update list of passed tests (v2)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-16 15:24:38 +04:00
Andrey Vagin
afe52e4254 zdtm: add script to execute test cases
If you execute this script without arguments, it will execute
all test cases, which should pass.

Or the first argument may be a path to the test case.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-09 11:38:38 +04:00