diff --git a/0006-test-others-rpc-do-not-use-nftables-locking-backend.patch b/0006-test-others-rpc-do-not-use-nftables-locking-backend.patch new file mode 100644 index 0000000000000000000000000000000000000000..8d199767eb45bac227eebc65ecc49c73cee3e4b2 --- /dev/null +++ b/0006-test-others-rpc-do-not-use-nftables-locking-backend.patch @@ -0,0 +1,90 @@ +From 29ccb5b625a5cf915f87d1d85952dde6b9b572ee Mon Sep 17 00:00:00 2001 +From: Adrian Reber +Date: Thu, 6 Feb 2025 07:34:26 +0000 +Subject: [PATCH] test: others/rpc do not use nftables locking backend + +The tests in others/rpc are running as non-root and +fail silently if the nftables network locking backend is used. + +This switches those tests to skip the network locking. + +Signed-off-by: Adrian Reber +--- + test/others/rpc/errno.py | 2 ++ + test/others/rpc/ps_test.py | 1 + + test/others/rpc/run.sh | 2 +- + test/others/rpc/test-c.c | 2 ++ + test/others/rpc/test.py | 1 + + 5 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/test/others/rpc/errno.py b/test/others/rpc/errno.py +index b600b6d1c4..4ea6c9d441 100755 +--- a/test/others/rpc/errno.py ++++ b/test/others/rpc/errno.py +@@ -67,6 +67,7 @@ def no_process(self): + req = self.get_base_req() + req.type = rpc.DUMP + req.opts.pid = pid ++ req.opts.network_lock = rpc.SKIP + + self.send_req(req) + resp = self.recv_resp() +@@ -84,6 +85,7 @@ def process_exists(self): + req = self.get_base_req() + req.type = rpc.DUMP + req.opts.leave_running = True ++ req.opts.network_lock = rpc.SKIP + + self.send_req(req) + resp = self.recv_resp() +diff --git a/test/others/rpc/ps_test.py b/test/others/rpc/ps_test.py +index daeda49bce..259f22e775 100755 +--- a/test/others/rpc/ps_test.py ++++ b/test/others/rpc/ps_test.py +@@ -23,6 +23,7 @@ + req.opts.log_file = 'page-server.log' + req.opts.log_level = 4 + req.opts.images_dir_fd = os.open(args['dir'], os.O_DIRECTORY) ++req.opts.network_lock = rpc.SKIP + + s.send(req.SerializeToString()) + +diff --git a/test/others/rpc/run.sh b/test/others/rpc/run.sh +index afd4fb5e33..3d5a53ae66 100755 +--- a/test/others/rpc/run.sh ++++ b/test/others/rpc/run.sh +@@ -51,7 +51,7 @@ function test_restore_loop { + title_print "Dump loop process" + # So theoretically '-j' (--shell-job) should not be necessary, but on alpine + # this test fails without it. +- ${CRIU} dump -j -v4 -o dump-loop.log -D build/imgs_loop -t ${P} ++ ${CRIU} dump -j -v4 -o dump-loop.log --network-lock skip -D build/imgs_loop -t ${P} + + title_print "Run restore-loop" + ./restore-loop.py build/criu_service.socket build/imgs_loop +diff --git a/test/others/rpc/test-c.c b/test/others/rpc/test-c.c +index 792dbbf9c9..b3507975f8 100644 +--- a/test/others/rpc/test-c.c ++++ b/test/others/rpc/test-c.c +@@ -99,6 +99,8 @@ int main(int argc, char *argv[]) + req.opts->images_dir_fd = dir_fd; + req.opts->has_log_level = true; + req.opts->log_level = 4; ++ req.opts->has_network_lock = true; ++ req.opts->network_lock = CRIU_NETWORK_LOCK_METHOD__SKIP; + + /* + * Connect to service socket +diff --git a/test/others/rpc/test.py b/test/others/rpc/test.py +index ce8411bc60..6f692f7557 100755 +--- a/test/others/rpc/test.py ++++ b/test/others/rpc/test.py +@@ -24,6 +24,7 @@ + req.opts.leave_running = True + req.opts.log_level = 4 + req.opts.images_dir_fd = os.open(args['dir'], os.O_DIRECTORY) ++req.opts.network_lock = rpc.SKIP + + # Send request + s.send(req.SerializeToString()) + diff --git a/criu.spec b/criu.spec index af61d98db227acdfa6f2784520d3bd5ef20847f7..e501ec627d9dd6b5a7d1332b14efbd5638241611 100644 --- a/criu.spec +++ b/criu.spec @@ -1,6 +1,6 @@ Name: criu Version: 3.19 -Release: 6 +Release: 7 Provides: crtools = %{version}-%{release} Obsoletes: crtools <= 1.0-2 Summary: A tool of Checkpoint/Restore in User-space @@ -21,6 +21,7 @@ Patch2: 0002-Add-sys_sched_setaffinity-define-for-loongarch64.patch Patch3: 0003-chore-support-building-without-network.patch Patch4: 0004-criu-fix-log_keep_err-signal-deadlock.patch Patch5: 0005-lsm-use-the-user-provided-lsm-label.patch +Patch6: 0006-test-others-rpc-do-not-use-nftables-locking-backend.patch %description Checkpoint/Restore in Userspace(CRIU),is a software tool for the linux operating system. @@ -106,6 +107,9 @@ chmod 0755 %{buildroot}/run/%{name}/ %doc %{_mandir}/man1/{compel.1*,crit.1*,criu-ns.1*,criu-amdgpu-plugin.1*} %changelog +* Mon Apr 21 2025 maxin - 3.19-7 +- test: others/rpc do not use nftables locking backend + * Mon Apr 21 2025 maxin - 3.19-6 - lsm: use the user provided lsm label