The kernel was compiled without the tun driver.
This reverts commit 889a21292f.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
setuid and setgid drops the dumpable flag, so it should be set back.
Otherwise proccesses will not able to read a few files in proc (e.g.
/proc/pid/pagemap).
This patch affects cow01:
11:50:04.429: 4: ERR: cow01.c:99: Unable to read data (errno = 13 (No such file or directory))
v2: typo fix
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This reverts commit 21d94e0086.
This patch was created for investigating
https://bugzilla.openvz.org/show_bug.cgi?id=2676
The bug is fixed and this patch does nothing useful, because tcpdump
starts too late.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
There's some strange setup on Jenkins boxes, so that /dev/net/tun
is inaccessible. Need to check this after holidays :(
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The option can run test with specified name directly without check
or match.
It can be used to run experimental test that is not in TEST_LIST.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Currently, env.sh only contains the location of criu executable.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
In batch-test mode, the script skips failed individual tests
instead of exiting. This ensures that all zdtm tests can be run
in one pass, which provides better overview of test result.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Adjust the format of information printed.
Print out more necessary debug information.
Display error message in STDERR and make it more readable.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Use TEST_PATTERN instead of TEST_NAME as argument.
All previous zdtm commands can be used still.
It is useful to run certain part of tests.
Example of running in-namespace tests only:
./test/zdtm.sh ^ns/.*
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Add -g option in zdtm.sh.
Using -g option can just generate binaries of all
tests to run in zdtm. Moreover, appending test name after
-g option can just generate the binary for the test.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Here are two case:
* check that a vma grows after restoring
* check that a vma can be restored if its guard page was overlapped by
another vma.
Currently criu isn't able to dump/restore this test case. Who wants to
fix this issue?
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The checking helps debug unexpected failures.
The patch is useful to debug test failure. Chdir() may meet failure
if the process does not have enough permissioin. Then, it cannot
rename in-progress output file to output file. Finally, test script
cannot catch 'PASS' flag from the output file and record it as
failure. As the result, the test fails without any error message.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Label 'out' and chdir() below it are just redundant. Remove them
to make test simple.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
struct sockaddr_un
Struct sockaddr_un is used in program for bind() to listen on a local file.
Path is one of its attributes and only has 108-byte size. It may happen
that the path is too small to contain the whole real path, which contains
current working directory now. This may lead to two sockets listening on
the same file.
So, we change the path to be "/tmp". It ensures that filename cannot
exceed the limit.
Additionally, to run it well with namespace, make new directory named
'tmp' under constructed root.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Path generated in the test is copied into sun_path attribute in
struct sockaddr_un. Additional check on whether sun_path can
contain the whole path is added. It is useful because if sun_path
can only contain the first part of the path, all sockadd_un
will point to the same location, which leads to error.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This test uses systemtap to replace random parasite command on
invalide command. The parasite code received this command and should
rollback itself. CRIU didn't recived ack, should understand that
something wrong and exits. The systemtap inverts exit code of criu.
"zdtm.sh -d" is used for executing tests and testing that the state of
processes don't corrupted.
criu should be compiled without optimizations (make DEBUG=1)
v2: randomize a command, which will be replaced
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
/dev/null
Clear the umask when creating /dev/null and restore the umask
after the creation.
Mountpoints test unlinks and makes new /dev/null inside by mknod.
But in some linux, there is default umask, e.g., as 022. It means that
/dev/null created directly cannot be wrote by group and other users.
It is not reasonable because /dev/null should be accessable to all
users.
Signed-off-by: Yicheng Qin <yichengq@google.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
All scripts are executed for all actions, so if one of them failed for
any actions, crtools returns with non-zero code.
E.g: ./zdtm.sh -d ns/static/env00
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
page-server is forked and the child is running in background, so a bash
variable $! contains PID of the last command, which is executed in
background.
Currently it's tcpdump and zdtm.sh is waiting it and never returns back.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
v2:
- Use special opcode 32 to distinguish error cases
- Use --scripts for snapshot testings
v3:
- test for both 32 and 0 for error code
v4: (by avagin@)
- restore from the last snapshot
v5:
- update comment
https://bugzilla.openvz.org/show_bug.cgi?id=2583
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Sometimes these tests don't pass successfully and we need more
information to investigate the problem.
https://bugzilla.openvz.org/show_bug.cgi?id=2676
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The number of bytes, which were sent and received, should be
exchanged in the message
Thanked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Each signals should be sent to a proper thread..
Probably it was a reason of a error, which was caught yesterday
+ cat zdtm/live/static/sigaltstack.out
20:57:10.933: 4380: thread in sas: at 0x6083e0 (size 0x2000 flags 0x1)
20:57:10.934: 4380: Waiting in thread SAS
20:57:11.219: 4380: Thread may leave SAS
20:57:11.219: 4380: Leaving thread SAS
20:57:11.219: 4380: leader in sas: at 0x6083e0 (size 0x2000 flags 0x1)
20:57:11.219: 4380: main old: at 0x6063e0 (size 0x2000 flags 0x1)
20:57:11.220: 4380: main new: at 0x6083e0 (size 0x2000 flags 0x1)
20:57:11.220: 4380: thrd old: at 0x6083e0 (size 0x2000 flags 0x1)
20:57:11.220: 4380: thrd new: at 0x6083e0 (size 0x2000 flags 0x1)
20:57:11.220: 4380: FAIL: sigaltstack.c:163: sas not restored (errno = 11 (Resource temporarily unavailable))
https://bugzilla.openvz.org/show_bug.cgi?id=2668
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ldd pipe00:
linux-vdso.so.1 => (0x00007fffbb0cb000)
Currently the first part of line is dropts, if the line contains "=>",
so we need to exclude vdso, before modifing lines.
This patch fixes bug:
$ zdtm.sh ns/static/pipe00
Failed at (0x00007fffa49fe000)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Remove the first part from linues like this:
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d83000)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This patches fixes compilation on Raspberry Pi and
removes a few defines from tests.
msg.c: In function ‘test_msg’:
msg.c:41:11: error: ‘PAGE_SIZE’ undeclared (first use in this function)
CC: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm.sh reports error immediatly, if a test process exited or crashed.
We should be fear, that pid can be reused. There are many place, which
will fail in this case. And a chance to get this situation is really small.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Before doing something with mounts they should be marked as private,
otherwise our actions can affects someone else.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We've slightly updated -v option argument parsing,
thus update cmdline used in a few app-emu tests.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Add cpt/rst timeout to inaccuracy.
All timers are stopped during cpt/rst. We don't know in which moment
they are stopped and run, so this timeout is added to acceptable
inaccuracy.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>