at least one test did:
mount: only root can use "--options" option
subprocess.CalledProcessError: Command '['flock', 'zdtm_mount_cgroups.lock', './zdtm_mount_cgroups']' returned non-zero exit st atus 1
+#
+# Conditional build:
+%bcond_with tests # build and run tests (requires root)
+
Summary: Checkpoint/restore functionality for Linux in userspace
Summary(pl.UTF-8): Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa
Name: criu
Source0: http://download.openvz.org/criu/%{name}-%{version}.tar.bz2
# Source0-md5: 5d5115454d110adb744e885d82d2c1f6
Patch0: %{name}-python.patch
+Patch1: tests.patch
URL: http://criu.org/
BuildRequires: asciidoc
BuildRequires: libcap-devel
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile
V=1
%{__make}
+%if %{with tests}
+%{__make} test
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
--- /dev/null
+--- criu-2.5/test/zdtm/static/Makefile~ 2016-08-21 11:41:39.000000000 +0300
++++ criu-2.5/test/zdtm/static/Makefile 2016-08-21 11:41:42.142986535 +0300
+@@ -402,6 +402,10 @@
+ stopped02: override CFLAGS += -DZDTM_STOPPED_TKILL
+ stopped12: override CFLAGS += -DZDTM_STOPPED_KILL -DZDTM_STOPPED_TKILL
+
++# grantpt, etc troubles
++tty%: override CFLAGS += -Wno-error=implicit-function-declaration -Wno-error=int-conversion
++pty%: override CFLAGS += -Wno-error=implicit-function-declaration -Wno-error=int-conversion
++
+ $(LIB): force
+ $(Q) $(MAKE) -C $(LIBDIR)
+