2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-25 11:27:40 +00:00

1777 Commits

Author SHA1 Message Date
Adrian Reber
eba1fba8b3 tests: fix builds on alpine and centos
Install sudo, create test user with ID 1000, install bash,
fix pidfile creation and pidfile chmod.

v2:
 * use sleep to give the criu daemon some time to start up

v3:
 * Andrei is of course right and sleep is not good solution.
   After adding --status-fd support to criu service, this
   is how we now detect that criu is ready.

v4:
 * This was much more complicated than expected which is related
   to the different versions of the tools on the different travis
   test targets. There seems to be a bug in bash on Ubuntu
    https://lists.gnu.org/archive/html/bug-bash/2017-07/msg00039.html
   which prevents using 'read -n1' on Ubuntu. As a workaround
   the result from CRIU's status FD is now read via python.

   Another problem was discovered on alpine with the loop restore test.
   CRIU says to use setsid even if the process is already using setsid.
   As a workaround, still with setsid, this process is now using
   shell-job true for checkpoint and restore.

Parts of v2 have been committed before. So the changes from this commit
are partially already in another commit.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-29 01:06:06 +03:00
Cyrill Gorcunov
df68bcc64d unix: test, sk-unix01 -- Fix data sending for be machines
Reported-by: Andrey Vagin <avagin@virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-23 08:25:42 +03:00
Adrian Reber
396c37dd62 tests: fix builds on alpine and centos
Install sudo, create test user with ID 1000, install bash,
fix pidfile creation and pidfile chmod.

v2:
 * use sleep to give the criu daemon some time to start up

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-23 08:25:07 +03:00
Cyrill Gorcunov
1e35bd8213 tests: others,rpc -- Tune up header
- string.h is missed for memX helpers
 - fcntl.h should be included instead of sys

With this patch the test-c is compiled on alpine tests,
but there is a problem related to the container itself

 | protoc-c --proto_path=. --c_out=. rpc.proto
 | gcc -g -Werror -Wall -I.   -c -o test-c.o test-c.c
 | gcc -g -Werror -Wall -I.   -c -o rpc.pb-c.o rpc.pb-c.c
 | gcc   test-c.o rpc.pb-c.o  -lprotobuf-c -o test-c
 | protoc --proto_path=. --python_out=. rpc.proto
 | cp ../../../criu/criu criu
 | chmod u+s criu
 | mkdir -p build
 | chmod a+rwx build
 | sudo -g '#1000' -u '#1000' ./criu service -v4 -W build -o service.log --address criu_service.socket -d --pidfile pidfile
 | make: sudo: Command not found

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-22 00:15:35 +03:00
Pavel Tikhomirov
06c6867bfd zdtm.py: ignore unicode encode errors
We have a problem after commit 212e4c771a1b ("test: make zdtm.py
python2/python3 compatible") when running tests on python2:

https://ci.openvz.org/job/CRIU/job/CRIU-virtuozzo/job/criu-dev/3804/console

Traceback (most recent call last):
  File "./test/zdtm.py", line 2249, in <module>
    opts['action'](opts)
  File "./test/zdtm.py", line 2001, in run_tests
    launcher.run_test(t, tdesc, run_flavs)
  File "./test/zdtm.py", line 1680, in run_test
    self.wait()
  File "./test/zdtm.py", line 1737, in wait
    self.__wait_one(0)
  File "./test/zdtm.py", line 1725, in __wait_one
    print(open(sub['log']).read())
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in
position 258: ordinal not in range(128)

print does not like "‘" symbol in zdtm_static_cgroup04.log:
...
rmdir: failed to remove ‘cgclean.sKFHLm/zdtmtst/special_prop_check’: No
such file or directory

Small reproducer:

[snorch@snorch ~]$ cat test_ascii.py
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import (str, open, range, zip, int, input)

f = open('./zdtm_static_cgroup04.log')
s = f.read()
print(s)

[snorch@snorch ~]$ python test_ascii.py | grep ""
Traceback (most recent call last):
  File "test_ascii.py", line 6, in <module>
    print(s)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in
position 258: ordinal not in range(128)

So just ignore these quote symbol when printing logs.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-20 21:20:22 +03:00
Cyrill Gorcunov
27c3c21a8c unix: test -- Add sk-unix01 test
To test the case where sockets are removed
together with directory they are living in.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-19 22:51:01 +03:00
Adrian Reber
50fd9df6c5 test/others/rpc: also run RPC version command via service
This extends the test.py to also run the RPC command VERSION via 'criu
service'. It was already running using 'criu swrk'.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-19 19:59:13 +03:00
Adrian Reber
df9ffa10bc test/other/rpc: resurrect the RPC test cases
In this directory there are various test cases using CRIU in RPC mode
(or SWRK mode).

This fixes the broken tests by moving the start of 'criu service' from
run.sh to the Makefile as the test cases is running using "sudo -g
'#1000' -u '#1000'" and the PID file created by CRIU can only be read by
the root user. If starting the 'criu service' before run.sh the PID file
still can be changed to 0666 and fixing the test script.

This also adds version.py to the test cases that are executed.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-19 19:59:13 +03:00
Adrian Reber
23ff69a4b6 zdtm/static/maps06: removed hardcoded page-size
zdtm/static/maps06 failed on systems with different page-size than 4096.
This changes maps06 to use sysconf(_SC_PAGESIZE) instead.

Signed-off-by: Adrian Reber <areber@redhat.com>
Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-18 21:02:09 +03:00
Andrei Vagin
e1799382e0 zdtm.py: exclude a vsyscall vma for x32 tests
We alwasy exclude vsyscall vma-s for x32 tests, but
this part was broken by python3 patches.

1: Old maps lost: set([])
1: New maps appeared: set([u"ffffffffff600000-ffffffffff601000 [u'r-xp']"])

Reported-by: Mr Jenkins
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-18 02:25:12 +03:00
Mike Rapoport
a72719d365 zdtm/lib: don't close bad criu_status_in file descriptor in signal handler
The criu_status_in is not always used and it may be -1 when the signal
handler closes it. With lazy-pages we hit a corner case which clobbers the
errno value. This happens when we resume the process inside glibc syscall
wrapper and get the signal before the page containing errno is copied. In
this case, signal handler is invoked before the syscall return value is
written to errno and the actual value of errno seen by the process becomes
-EBADF because of close(-1) in the signal handler.

Let's ensure that close() in signal handler does not fail to make Jenkins
happier while the proper solution for the lazy-pages issue is found.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-15 02:17:42 +03:00
Andrei Vagin
9715eb2de5 zdtm: fix a lint warning about undefined 'raw_input'
test/zdtm.py:1238:3: F821 undefined name 'raw_input'

v2: ask to press enter, not just any key
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-14 20:29:20 +03:00
Adrian Reber
39b6fec0a9 test/zdtm.py: add option to specify external criu for test suite
I am regularly running zdtm.py after updating the CRIU rpm to test if
the new rpm still works. Until know I usually did:

-criu_bin = "../criu/criu"
-crit_bin = "../crit/crit"
+criu_bin = "/usr/sbin/criu"
+crit_bin = "/usr/bin/crit"

This commit adds two arguments to zdtm.py:

  --criu-bin CRIU_BIN   Path to criu binary
  --crit-bin CRIT_BIN   Path to crit binary

It still defaults to the old values from above, but can now easily be
changed to the CRIU binary provided by the packaging system.

This change was more complicated than expected which is probably related
to the fact that zdtm restarts itself in namespaces.

v2:
 - rebase
v3:
 - fix errors reported by 'make lint'

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-14 20:26:25 +03:00
Adrian Reber
5260fdc925 zdtm: fix atomic_{sub, add}_return assembler for aarch64
Running the test suite on aarch64 showed two tests failing (static/fd
and transition/maps0007). Debugging showed that the
atomic_{sub,add}_return() functions did not return the value but the
lower 32bit of the address of that value.

Simply dereferencing the input solves the two mentioned test cases.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-14 20:22:34 +03:00
Dmitry Safonov
d967ecf7c5 zdtm/lib: Check EWOULDBLOCK in errno instead of -EWOULDBLOCK
Syscalls do return negative value in case of an error.
But errno contains the error code itself.

Add uint32_t to sys_futex() definition.
sizeof(unsigned int) might be not 4 bytes.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-14 20:22:34 +03:00
Andrei Vagin
9fd4436063 zdtm: open notify file descriptors in a binary mode
Send pre-dump notify to 36
  Traceback (most recent call last):
    File "zdtm.py", line 2161, in <module>
      do_run_test(tinfo[0], tinfo[1], tinfo[2], tinfo[3])
    File "zdtm.py", line 1549, in do_run_test
      cr(cr_api, t, opts)
    File "zdtm.py", line 1264, in cr
      test.pre_dump_notify()
    File "zdtm.py", line 490, in pre_dump_notify
      fdin.write(struct.pack("i", 0))
  TypeError: write() argument 1 must be unicode, not str

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-10 02:07:44 +03:00
Radostin Stoyanov
8a5c46b163 test: Don't leak file descriptor
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 10:00:34 +03:00
Andrei Vagin
de66a47cd6 test/netns-nf: add one more path for libxt_standard.so
On Alpine Linux, libxt_standard.so is installed in /usr/lib/xtables/

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
af4dbcd1ee zdtm: fix collecting libraries on Alpine Linux
Here is an example of ldd output:

/musl # ldd /usr/lib/libxtables.so.12
	ldd (0x7fae8e06c000)
	libc.musl-x86_64.so.1 => ldd (0x7fae8e06c000)

We need to skip the "ldd (0x7fae8e06c000)" line.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
04a843c2f2 test: don't save content of /sys/kernel/debug/tracing/trace
We don't tune tracers, so we don't expect to get anything.
In docker containers, debugfs isn't mounted and this command failed.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
69b07b1676 alpine: sigaltstack returns EINVAL if SS_ONSTACK is set
Actually this flag is ignored by kernel.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
1920475941 alpine: call write instead of fprintf
fprintf in Alpine Linux calls writev, which is prohibited in the
SECCOMP_MODE_STRICT mode.

===================== Run zdtm/static/seccomp_strict in h ======================
Start test
Test is SUID
./seccomp_strict --pidfile=seccomp_strict.pid --outfile=seccomp_strict.out
make: *** [Makefile:385: seccomp_strict.pid] Error 1
 Test zdtm/static/seccomp_strict FAIL at start: [Errno 2] No such file or directory: 'zdtm/static/seccomp_strict.pid'
Test output: ================================
22:45:24.661:    38: ERR: seccomp_strict.c:97: read (errno = 2 (No such file or directory))
22:45:24.662:    37: ERR: test.c:315: Test exited unexpectedly with code 1

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
e2bb525d62 test: make crit-recode.py python2/python3 compatible
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
cd79f7b6e5 test: import pycriu by its right name
Otherwise one library will be imported twice by two different names: py
and pycriu, because pycriu is used in the library.

https://github.com/checkpoint-restore/criu/issues/495
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
1509147abe travis: set python3 as default for fedora containers
We need a few jobs to check a compatibility with python3

v2: fix inhfd and rpc tests
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
212e4c771a test: make zdtm.py python2/python3 compatible
Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Adrian Reber
a91da7d449 Adapt zdtm for python3 compatibility
As python3 imports are working a bit differently the structure of the
imported files needs to change. Instead of having symlinks to criu.py
and rpc_pb2.py which does not match the import structure just create
symlink to ../lib/py (like crit) to make zdtm usable again with the
python3 compatibility.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-25 00:23:00 +03:00
Dmitry Safonov
0af80816de zdtm/make: Include Makefile.inc after defining $(DEP)
Otherwise, tests dependencies are not considered for build.
Add an error in Makefile.inc so this won't happen again.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-18 01:23:17 +03:00
Dmitry Safonov
c4848ffeed Revert "test/make: Include .d files"
This reverts commit dcafa78b96084216e32b757be62b7fa8aebbdd87.

I've found that we already include deps in Makefile.inc,
was to fast on the first attempt and overlooked this.
(the include just doesn't work like it should yet..)

The origin patch may be just dropped before preparing master's merge.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-18 01:23:17 +03:00
Andrey Vagin
7c74f41ab7 zdtm: don't print one line twice
(00.566486)pie: 1: seccomp: mode 0 on tid 1
(00.566601)pie: 1: Error (criu/pie/restorer.c:460): seccomp: Unexpected tid ->
(00.566601)pie: 1: 1 != 1
(00.566601)pie: 1: 1 != 1
(00.566639)pie: 1: Error (criu/pie/restorer.c:1817): Restorer fail 1

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-16 08:27:17 +03:00
Cyrill Gorcunov
b44d39ba5d zdtm: Don't fail in __construct_root if entries exist
Otherwise we might get

 | OSError: [Errno 17] File exists: '/tmp/criu-root-f8klhI/bin'
 |     os.symlink(".." + ldir, self.root + "/usr" + ldir)
 | OSError: [Errno 17] File exists
 |  File "zdtm.py", line 209, in __mknod
 |     os.mknod(name, stat.S_IFCHR, rdev)
 | OSError: [Errno 17] File exists

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-16 08:23:06 +03:00
Cyrill Gorcunov
cf74c9fed3 seccomp: test, seccomp_filter_threads -- Use multiple threads
Andrew proposed the test which actually triggered the issue
in current seccomp series, put it into a regular basis.

Suggested-by: Andrey Vagin <avagin@virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-15 03:51:16 +03:00
Cyrill Gorcunov
e91c3a8335 seccomp: test -- Add seccomp_filter_threads
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-15 03:51:16 +03:00
Andrei Vagin
cc88159f8d zdtm: mount tmpfs into /run in a test root
iptables creates /run/xtables.lock file and
we want to have it per-test.

(00.332159)      1: 	Running iptables-restore -w for iptables-restore -w
Fatal: can't open lock file /run/xtables.lock: Permission denied

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-15 02:20:48 +03:00
Andrei Vagin
839875a442 zdtm/socket-ext: clean up test files
Reported-by: Dmitry Safonov <dima@arista.com>
Cc: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-15 02:16:27 +03:00
Andrei Vagin
938c966ad3 zdtm: create /run in a test root
iptables 1.6.2 fails without /run, because it tries to create
the /run/xtables.lock file

Test output: ================================
Fatal: can't open lock file /run/xtables.lock: No such file or directory
23:29:06.098:     4: ERR: netns-nf.c:21: Can't set input rule (errno = 2 (No such file or directory))
23:29:06.098:     3: ERR: test.c:315: Test exited unexpectedly with code 255

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-12 06:35:19 +03:00
Adrian Reber
4386b324b3 Fix building unlink_fstat00 unlink test case
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-09 23:59:58 +03:00
Andrei Vagin
43c3772334 zdtm: include lock.h after zdtmtst.h
In file included from s390x_gs_threads.c:10:0:
../lib/lock.h: In function 'mutex_lock':
../lib/lock.h:148:4: error: implicit declaration of function 'pr_perror' [-Werror=implicit-function-declaration]
    pr_perror("futex");

Reported-by: Mr Jenkins

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-30 02:10:59 +03:00
Dmitry Safonov
c574c2883f test/make: Drop implicit make variables
Let's drop usage of COMPILE.c, OUTPUT_OPTION.
It will allow run submake with -R.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-30 00:35:49 +03:00
Andrei Vagin
0771942c73 zdtm: always run criu dump with --track-mem if --snaps is set
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-30 00:30:21 +03:00
Pavel Tikhomirov
c32c7371b9 zdtm: check that pid-reuse does not break iterative memory dump
The idea of the test is:

1) mmap separate page and put variable there, so that other usage does
not dirty these region. Initialize the variable with VALUE_A.

2) fork a child with special pid == CHILD_NS_PID. Only if it is a first
child overwrite the variable with VALUE_B.

3) wait for the end of the next predump or end of restore with
test_wait_pre_dump_ack/test_wait_pre_dump pair and kill our child.

Note: The memory region is "clean" in parent.

4) goto (2) unles end of cr is reported by test_waitpre

So on first iteration child with pid CHILD_NS_PID was dumped with
VALUE_B, on all other iterations and on final dump other child with the
same pid exists but with VALUE_A. But on all iterations after the first
one we have these memory region "clean". So criu before the fix would
have restored the VALUE_B taking it from first child's image, but should
restore VALUE_A.

Note: Child in its turn waits termination and performs a check that variable
value doesn't change after c/r.

We should run the test with at least one predump to trigger the problem:

[root@snorch criu]# ./test/zdtm.py run --pre 1 -k always -t zdtm/transition/pid_reuse
Checking feature ns_pid
Checking feature ns_get_userns
Checking feature ns_get_parent

=== Run 1/1 ================ zdtm/transition/pid_reuse

===================== Run zdtm/transition/pid_reuse in ns ======================
DEP       pid_reuse.d
CC        pid_reuse.o
LINK      pid_reuse
Start test
Test is SUID
./pid_reuse --pidfile=pid_reuse.pid --outfile=pid_reuse.out
Run criu pre-dump
Send the 10 signal to  52
Run criu dump
Run criu restore
Send the 15 signal to  73
Wait for zdtm/transition/pid_reuse(73) to die for 0.100000
Test output: ================================
14:47:57.717: 11235: ERR: pid_reuse.c:76: Wrong value in a variable after restore
14:47:57.717:     4: FAIL: pid_reuse.c:110: Task 11235 exited with wrong code 1 (errno = 11 (Resource temporarily unavailable))

<<< ================================

https://jira.sw.ru/browse/PSBM-67502

v3: simplify waitpid's status check
v9: switch to test_wait_pre_dump(_ack)

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-27 01:04:15 +03:00
Pavel Tikhomirov
348c39bf14 zdtm/lib: add pre-dump-notify test flag
If pre-dump-notify flag is set, zdtm sends a notify to the test after
pre-dump was finished and waits for the test to send back a reply that
test did all it's work and now is ready for a next pre-dump/dump.

How it can be used:

while (!test_wait_pre_dump()) {
	/* Do something after predump */
	test_wait_pre_dump_ack();
}
/* Do something after restore */

Internally we open two pipes for the test one for receiving notify (with
two open ends) and one for replying to it (only write end open). Fds of
pipes are dupped to predefined numbers and zdtm opens these fds through
/proc/<test-pid>/fd/{100,101} and communicates with the test.

v9: switch to two way interface to remove race then operation we try to
run after predump may be yet unfinished at the time of next dump.

Suggested-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-27 01:04:15 +03:00
Dmitry Safonov
dcafa78b96 test/make: Include .d files
Include deps files to recompile tests when dependency has changed.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-26 22:03:35 +03:00
Andrey Vagin
7a0b698b59 zdtm: calling futex via syscall saves error codes in errno
man 2 futex:
  In  the  event  of  an error (and assuming that futex() was invoked via
  syscall(2)), all operations return -1 and set  errno  to  indicate  the
  cause of the error.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-26 22:03:35 +03:00
Radostin Stoyanov
1c22d7ba86 Remove redundant semicolons
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-25 21:09:41 +03:00
Andrei Vagin
9b2ecd4948 zdtm: add a test to check O_TMPFILE
man 2 open:
...
O_TMPFILE (since Linux 3.11)

Create  an unnamed temporary file.  The pathname argument speci‐ fies a
directory; an unnamed  inode  will  be  created  in  that directory's
filesystem.  Anything written to the resulting file will be lost when
the last file descriptor is closed, unless the file is given a name.
...

Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-21 02:40:30 +03:00
Andrei Vagin
c9c4baa3eb jenkins: add a pipeline file for criu-lazy-migration
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-21 02:25:20 +03:00
Mike Rapoport
85fd6abea4 test: lazy-pages: exclude maps007
With userfaultfd we cannot reliably service process_vm_readv calls. The
maps007 test that uses these calls passed previously by sheer luck.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-19 23:26:34 +03:00
Vitaly Ostrosablin
ca179dd26a zdtm: Fix unlink_multiple_largefiles compilation on ppc64
Compiler wants arguments, explicitly casted to (long long) for %llx
specifier.

Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-06 21:18:14 +03:00
Andrei Vagin
a83620dc0b zdtm: handle --tcp-established in the rpc mode
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-06 21:08:50 +03:00