mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
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 <areber@redhat.com>
This commit is contained in:
parent
1f326df401
commit
26068cfee9
@ -67,6 +67,7 @@ class test:
|
|||||||
req = self.get_base_req()
|
req = self.get_base_req()
|
||||||
req.type = rpc.DUMP
|
req.type = rpc.DUMP
|
||||||
req.opts.pid = pid
|
req.opts.pid = pid
|
||||||
|
req.opts.network_lock = rpc.SKIP
|
||||||
|
|
||||||
self.send_req(req)
|
self.send_req(req)
|
||||||
resp = self.recv_resp()
|
resp = self.recv_resp()
|
||||||
@ -84,6 +85,7 @@ class test:
|
|||||||
req = self.get_base_req()
|
req = self.get_base_req()
|
||||||
req.type = rpc.DUMP
|
req.type = rpc.DUMP
|
||||||
req.opts.leave_running = True
|
req.opts.leave_running = True
|
||||||
|
req.opts.network_lock = rpc.SKIP
|
||||||
|
|
||||||
self.send_req(req)
|
self.send_req(req)
|
||||||
resp = self.recv_resp()
|
resp = self.recv_resp()
|
||||||
|
@ -23,6 +23,7 @@ req.type = rpc.PAGE_SERVER
|
|||||||
req.opts.log_file = 'page-server.log'
|
req.opts.log_file = 'page-server.log'
|
||||||
req.opts.log_level = 4
|
req.opts.log_level = 4
|
||||||
req.opts.images_dir_fd = os.open(args['dir'], os.O_DIRECTORY)
|
req.opts.images_dir_fd = os.open(args['dir'], os.O_DIRECTORY)
|
||||||
|
req.opts.network_lock = rpc.SKIP
|
||||||
|
|
||||||
s.send(req.SerializeToString())
|
s.send(req.SerializeToString())
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ function test_restore_loop {
|
|||||||
title_print "Dump loop process"
|
title_print "Dump loop process"
|
||||||
# So theoretically '-j' (--shell-job) should not be necessary, but on alpine
|
# So theoretically '-j' (--shell-job) should not be necessary, but on alpine
|
||||||
# this test fails without it.
|
# 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"
|
title_print "Run restore-loop"
|
||||||
./restore-loop.py build/criu_service.socket build/imgs_loop
|
./restore-loop.py build/criu_service.socket build/imgs_loop
|
||||||
|
@ -99,6 +99,8 @@ int main(int argc, char *argv[])
|
|||||||
req.opts->images_dir_fd = dir_fd;
|
req.opts->images_dir_fd = dir_fd;
|
||||||
req.opts->has_log_level = true;
|
req.opts->has_log_level = true;
|
||||||
req.opts->log_level = 4;
|
req.opts->log_level = 4;
|
||||||
|
req.opts->has_network_lock = true;
|
||||||
|
req.opts->network_lock = CRIU_NETWORK_LOCK_METHOD__SKIP;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Connect to service socket
|
* Connect to service socket
|
||||||
|
@ -24,6 +24,7 @@ req.type = rpc.DUMP
|
|||||||
req.opts.leave_running = True
|
req.opts.leave_running = True
|
||||||
req.opts.log_level = 4
|
req.opts.log_level = 4
|
||||||
req.opts.images_dir_fd = os.open(args['dir'], os.O_DIRECTORY)
|
req.opts.images_dir_fd = os.open(args['dir'], os.O_DIRECTORY)
|
||||||
|
req.opts.network_lock = rpc.SKIP
|
||||||
|
|
||||||
# Send request
|
# Send request
|
||||||
s.send(req.SerializeToString())
|
s.send(req.SerializeToString())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user