2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-27 12:28:14 +00:00

1777 Commits

Author SHA1 Message Date
Mike Rapoport
ac6b3b0a1e zdtm: add 'nolazy' flag for tests not compatible with lazy pages
The kernel support for lazy pages (userfaultfd) lacks many important
features which effectively prevents success in certain tests.
Allow skipping such test with somewhat informative message

travis-ci: success for lazy-pages: improve testability (rev2)
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-09-16 11:47:01 +03:00
Pavel Emelyanov
0086dca47d uffdd: Implement --daemon mode
Right now the zdtm.py hacks around core code and waits for
a second for the socket to appear. Let's better make proper
--daemon mode for lazy-pages daemon and pidfile generation.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2017-09-16 09:16:33 +03:00
Mike Rapoport
a29f84a4ab jenkins: fix criu-lazy-pages.sh permissions
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-09-16 09:16:33 +03:00
Mike Rapoport
b711f89cf4 test: allow lazy-pages tests in namespaces
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-09-16 09:16:33 +03:00
Mike Rapoport
4bb1272ba5 test: add scripts to allow Mr. Jenkins check lazy-pages
Very minimalistic at the moment, no remote pages and namesapces.
Still better than nothing :)

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-09-16 09:16:32 +03:00
Andrew Vagin
f59b45fba2 zdtm: check lazy-pages
Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-09-16 09:16:32 +03:00
Andrei Vagin
835e252b09 test/ptrace_sig: wait children before calling test_daemon
A static test has to do nothing after test_daemon().

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-31 00:35:00 +03:00
Mike Rapoport
ae7a9a0758 test/zdtm: set maps04 timeout to 60 seconds
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-15 15:24:11 +03:00
Mike Rapoport
b34efd5591 test/zdtm.py: allow setting test timeout in the test description
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-15 15:24:11 +03:00
Vitaly Ostrosablin
9152dd2198 test: remap_dead_pid.c: Fix child PID not being printed
There's two issues with this code:

1. Child task is killed by parent faster, than it could print the line.
2. Even if it had time to print it - there would always be 0, because
it's called from child process.

Obviously, this print was meant to be in parent process. So, let's move
it there.

Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-15 15:24:11 +03:00
Mike Rapoport
5d6392358d test/zdtm.py: ignore UNIX sockets during report creation
When files are added to the report shutil.copytree is unhappy with
lazy-pages.socket. Tell shutil.copytree that it should ignore *.socket.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-15 15:24:10 +03:00
Michael Holzheu
43ad175780 s390/zdtm: Add s390x_reg_check test case
This test can be used to verify FP and VX registers on s390:

- Verify that "criu restore" sets the correct register sets
  from "criu dump":
  $ zdtmp.py run -t zdtm/static/s390x_regs_check

- Verify that dumpee continues running with correct registers after
  parasite injection:
  $ zdtm.py run --norst -t zdtm/static/s390x_regs_check
  $ zdtm.py run --norst --pre 2 -t zdtm/static/s390x_regs_check
  $ zdtm.py run --check-only -t zdtm/static/s390x_regs_check

Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-08-15 14:51:13 +03:00
Michael Holzheu
7083f15351 zdtm: Move include of Makefile.inc to right place
We have to include Makefile.inc earlier in order to use SRCARCH.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-08-15 14:51:13 +03:00
Michael Holzheu
9c94ed9669 s390/zdtm: Also support z900 (debian)
Debian is compiled for z900 - therefore we can't use the "laa"
instruction.

Fix this and replace "laa" by the older "cs" (compare and swap) loop.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-09 18:51:41 +03:00
Michael Holzheu
c2f30337a5 s390:criu: Add support for s390 consoles
On s390 we have special console drivers with minors 64 and 65.
Add support for them in criu code and in zdtm testsuite.

Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-09 18:51:41 +03:00
Michael Holzheu
27db1d9a04 s390:zdtm: Add test for tasks > 4TB
If the kernel contains patch ee71d16d22 ("s390/mm: make TASK_SIZE
independent from the number of page table levels") we are able
to checkpoint tasks > 4TB.

Add a testcase to verify this.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-09 18:51:41 +03:00
Michael Holzheu
01ee29702e s390:zdtm: Enable zdtm for s390
Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-09 18:51:41 +03:00
Alice Frosi
adc47efdd2 zdtm/static/sem: Use "union semun" instead of int
Use "union semun" for semctl() to make testcase also work on s390x.

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 20:01:28 +03:00
Michael Holzheu
a01d879b62 zdtm/static/fdt_shared: Fix buffer size
The TEST_STRING "Hello World!" has 13 bytes size. Therefore the 10 bytes
used for the buffer size are not sufficient.

Fix this and use sizeof() to be on the safe side.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 20:01:28 +03:00
Andrei Vagin
624aa178dc zdtm: don't call Popen() without wait()
We have to collect all zombies

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 20:01:28 +03:00
Adrian Reber
d77d8cc402 fix building with newer glibc
Newer glibc releases have removed SIGUNUSED from bits/signum.h which
breaks building criu on those systems:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8082d91e1c449e0cb137468b731004a5e605c8c6

SIGSYS returns the same value as SIGUNUSED and testing has shown
that criu still successfully completes zdtm with this patch.

Signed-off-by: Adrian Reber <areber@redhat.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 20:01:27 +03:00
Andrei Vagin
c0857d2517 zdtm: check /proc/sys/kernel/taint and fail if it is non-zero
We don't want to run tests, if a kernel has a problem. And we want
to know when the taint flag is changed.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Acked-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 09:34:46 +03:00
Pavel Begunkov
70c0b47d44 zdtm: skip 'tcp-close' tests if restore is skipped
'tcp-close' is a option that replaces connected tcp-sockets with
'closed' ones during restoring, therefore it have no sense without
restore stage. Thus let's skip related tests if the 'norst' flag was
specified.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 09:34:46 +03:00
Pavel Emelyanov
d8dd470367 zdtm: Tests for ghost files with holes
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 09:34:44 +03:00
Cyrill Gorcunov
1ddcd443ba test: shm-unaligned -- Use unique key
For convenient simultaneous run.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 09:34:43 +03:00
Pavel Begunkov
0f5e2217ef zdtm: Check that 'tcp-close' option closes sockets
There are 2 test cases:
1. Connected socket should be restored in the closed state
2. Listening socket state should not change after restore

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Eugene Batalov <eabatalov89@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 09:34:43 +03:00
Cyrill Gorcunov
b745fc058a test: grow_map -- Mark as noauto
"With the recent kernel changes criu should never look outside of start-end
region reported by /proc/maps; and restore doesn't even need to know if a
GROWSDOWN region will actually grow or not, because (iiuc) you do not need
to auto-grow the stack vma during restore, criu re-creates the whole vma
with the same length using MAP_FIXED and it should never write below the
addr returned by mmap(MAP_FIXED)" // Oleg

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-06-27 21:35:01 +03:00
Kang Yan
e03aa018c2 Update Makefile
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-06-14 09:45:44 +03:00
Andrei Vagin
98204deb34 test: don't use nsenter in tests
Ubuntu 14.04 (Travis) doesn't have it.

Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Looks-good-to: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-19 09:17:20 +03:00
Kir Kolyshkin
6329e660a4 test/zdtm/static: split ofd_file_locks.h to .c/.h
Having a "header library" is nice if it's small and clean, but
 - we compile its code a few times;
 - there is no distinction between internal and external functions.

Let's separate functions out of header and into a .c file.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:26:56 +03:00
Kir Kolyshkin
1e1a85f1b8 test/zdtm: rm get_smaps_bits proto from zdtmtst.h
The function is not included into the library, so having its prototype
there was a shortcut. Move it to a separate include file.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:26:56 +03:00
Kir Kolyshkin
14a0111546 test/zdtm: clean get_smaps_bits.d
This is an auxiliary source file. The corresponding object file was
cleaned, but .d was not. Add it to SRC/OBJ/DEP so the appropriate files
will be cleaned automatically.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:26:56 +03:00
Kir Kolyshkin
dd4925b500 test/zdtm/Makefiles: disable built-in rules
MAKEFLAGS += -r only works for sub-make, and it is not applicable to
the current instance. Since previous commit make is not re-running
itself (after re-reading deps files), so MAKEFLAGS no longer works.
Use one more way to disable built-in rules that stand in our way.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:26:56 +03:00
Kir Kolyshkin
44a2a65193 test/zdtm/Makefile.inc: don't regen all deps
As it was pointed out by our esteemed maintainer (let his light shine),
after my recent changes to test/zdtm Makefiles all dependencies are
regenerated even if we only need to build a single test (for example,
cd test/zdtm/static && make env00).

This was caused by "-include $(DEP)" statement. Make sees that these files
are need to be included, but are missing, and since it knows how to generate
them it goes on to do so.

The solution is to use $(wildcard) function which returns the list of
_existing_ files, and so include will only receive the files that exist.

Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:26:55 +03:00
Kir Kolyshkin
6331633725 inotify_system_nodel.c: make it a static symlink
inotify_system_nodel.c is supposed to be a symlink to inotify_system.c,
but somehow the file was committed. This, together with the statement
in Makefile to recreate the file, lead to replacing the file with a
symlink during make.

Remove the file, add the symlink, and remove the Makefile rule.

PS yes, I have checked the files are identical.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:26:55 +03:00
Andrei Vagin
a7281b11fd test: restore ns_last_pid before executing restore in a second time
It is required for cases when we inject a fault in criu restore.
In this case we execute "criu restore" and check that it fails,
then we execute "criu restore" without a fault and check that it passes.

If the first "criu restore" restores only a part of processes,
the second criu can get PID of one of restored processes.

https://github.com/xemul/criu/issues/282
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:20:37 +03:00
Dmitry Safonov
44e966e433 test/make: suppress "Nothing to be done for `default'."
Let's pretend that we're doing something ;-D

FWIW: cleaning two lines in the test output:
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>

========================== Run zdtm/static/tty03 in h ==========================
make[2]: Nothing to be done for `default'.
Start test
make[2]: Nothing to be done for `default'.
./tty03 --pidfile=tty03.pid --outfile=tty03.out
Run criu dump
Run criu restore
Send the 15 signal to  24
Wait for zdtm/static/tty03(24) to die for 0.100000
Removing dump/zdtm/static/tty03/24
========================= Test zdtm/static/tty03 PASS ==========================

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:19:25 +03:00
Adrian Reber
b2009641c4 zdtm/static/fpu01: check for OSXSAVE instead of XSAVE
When checking for XSAVE availability it makes more sense
to check for OSXSAVE than to check for XSAVE. This way the
check works on systems booted with the 'noxsave' kernel
command-line.

travis-ci: success for zdtm/static/fpu01: check for OSXSAVE instead of XSAVE
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-05-10 03:53:23 +03:00
Dmitry Safonov
164e048a8a zdtm/ia32: print st_size as (long long)
Fixes compile-time errors on Fedora like:
In file included from unlink_fstat01.c:9:0:
> unlink_fstat01.c: In function ‘main’:
> ../lib/zdtmtst.h:123:11: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘__off64_t {aka long long int}’ [-Werror=format=]
>   test_msg("FAIL: %s:%d: " format " (errno = %d (%s))\n", \

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-20 07:00:11 +03:00
Dmitry Safonov
057c3f2947 python: specify python2 as .py interpreter
On some distro the default python interpreter is Python 3,
which results in such errors:
>  Running zdtm/static/socket-tcp-closed.hook(--post-start)
>  make[1]: Nothing to be done for default.
>  ./socket-tcp-closed --pidfile=socket-tcp-closed.pid --outfile=socket-tcp-closed.out
>    File "zdtm/static/socket-tcp-closed.hook", line 16
>      except OSError, e:
>                    ^
>  SyntaxError: invalid syntax
>  ######### Test zdtm/static/socket-tcp-closed FAIL at hook --post-start #########
>  Running zdtm/static/socket-tcp-closed.hook(--clean)
>    File "zdtm/static/socket-tcp-closed.hook", line 16
>      except OSError, e:
>                    ^
>  SyntaxError: invalid syntax
>  Traceback (most recent call last):
>    File "zdtm.py", line 1921, in <module>
>      do_run_test(tinfo[0], tinfo[1], tinfo[2], tinfo[3])
>    File "zdtm.py", line 1388, in do_run_test
>      try_run_hook(t, ["--clean"])
>    File "zdtm.py", line 1053, in try_run_hook
>      raise test_fail_exc("hook " + " ".join(args))
>  __main__.test_fail_exc: <__main__.test_fail_exc instance at 0x76294468>

Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-17 18:35:58 +03:00
Dmitry Safonov
ab33ae2d95 test/maps01: document mmap() failures
Arm32 devices often have poor amount of RAM. E.g., RPI2 board
has only 1Gb memory. This lead to failures with maps01 test,
which tries to mmap() 1Gb of memory. The failures of test is
not very evident - let's document mmap() errors here to
blow some light on the situation.

Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-17 18:35:58 +03:00
Adrian Reber
bc169fefb1 RPC: add script to test the new RPC version interface
This script connects to 'criu swrk' and asks for the version. If running
from a git checkout the output would look like this:

 $ ./version.py
 Connecting to CRIU in swrk mode to check the version:
 RPC: Success
 CRIU major 2
 CRIU minor 12
 CRIU gitid v2.12-635-g6d3ae4d

If not running from git checkout it looks like this:

 $ ./version.py
 Connecting to CRIU in swrk mode to check the version:
 RPC: Success
 CRIU major 2
 CRIU minor 12

If running with a CRIU binary which does not support the VERSION
command:

 $ ./version.py
 Connecting to CRIU in swrk mode to check the version:
 Error (cr-service.c:116): RPC error: Invalid req: Success
 RPC: Unexpected msg type

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-11 09:01:10 +03:00
Dmitry Safonov
3bdaf5a9d8 zdtm: rely on -D_GNU_SOURCE passed from Makefiles
After the commit
  02c763939c10 ("test/zdtm: unify common code")

CFLAGS with -D_GNU_SOURCE defined in the top Makefile
are being passed to tests Makefiles.
As _GNU_SOURCE is also defined by tests, that resulted in
zdtm tests build failures:

  make[2]: Entering directory `/home/criu/test/zdtm/lib'
   CC        test.o
  test.c:1:0: error: "_GNU_SOURCE" redefined [-Werror]
   #define _GNU_SOURCE
   ^
  <command-line>:0:0: note: this is the location of the previous definition
  cc1: all warnings being treated as errors
  make[2]: *** [test.o] Error 1

However, we didn't catch this in time by Travis-CI, as zdtm.py doesn't
do `make zdtm`, rather it does `make -C test/zdtm/{lib,static,transition}`.
By calling middle makefile this way, it doesn't have _GNU_SOURCE in
CFLAGS from top-Makefile.

I think the right thing to do here - is following CRIU's way:
rely on definition of _GNU_SOURCE by Makefiles.

This patch is almost fully generated with
  find test/zdtm/ -name '*.c' -type f					\
     -exec sed -i '/define _GNU_SOURCE/{n;/^$/d;}' '{}' \;		\
     -exec sed -i '/define _GNU_SOURCE/d' '{}' \;

With an exception for adding -D_GNU_SOURCE in tests Makefile.inc for
keeping the same behaviour for zdtm.py.
Also changed utsname.c to use utsname::domainname, rather private
utsname::__domainname, as now it's uncovered (from sys/utsname.h):
> struct utsname
>  {
...
> # ifdef __USE_GNU
>     char domainname[_UTSNAME_DOMAIN_LENGTH];
> # else
>     char __domainname[_UTSNAME_DOMAIN_LENGTH];
> # endif

Reported-by: Adrian Reber <areber@redhat.com>
Cc: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-11 09:01:08 +03:00
Andrei Vagin
5a7b90b595 zdtm/unix: add zero characters into a socket address
An abstract name can contain zero characters.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-11 08:59:16 +03:00
Andrei Vagin
88e5db749c zdtm: print 5 lines before an error
It's very hard to understand an error without a context

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:12:11 +03:00
Andrei Vagin
feff2efa9a zdtm/dumpable02: don't print a non-null terminated string
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:12:11 +03:00
Kir Kolyshkin
afcbee3caa test/zdtm/static/socket-ext.c: don't use mktemp
This is just to prevent a compiler warning.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:12:11 +03:00
Kir Kolyshkin
a773d9c215 zdtm/static/maps03: don't run for 32-bit
When this test is compiled on ARMv7, we get this:

> maps03.c: In function 'main':
> maps03.c:15:31: error: result of '10l << 30' requires 35 bits
>   to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
>  mem = (void *)mmap(NULL, (10L << 30), PROT_READ | PROT_WRITE,
>                               ^~

Surely, the nature of the test looks like it needs 64-bit addressing.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:12:11 +03:00
Kir Kolyshkin
ef8bf49224 test/zdtm/static/skip-me.c: generalize
Make it possible to use a custom message telling why the test is
skipped.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:12:11 +03:00
Kir Kolyshkin
d9664e83cd test/zdtm/static/Makefile: drop .o for flags
Makefile knows that a binary depends on .o file,
and the .o file depends on .c file, and adds the
per-target variables even in the indirect case.
Therefore, .o suffix is not needed here.

Note that it not hurts to leave it as is, so this commit
is done only for the sake of keeping things simple.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:12:10 +03:00