test: adapt RPC test for restricted socket permissions

The service socket now defaults to 0600 (owner-only). Since the
test runs the setuid criu binary as a non-root user (uid 1000),
the socket ends up owned by root. Chown the socket to the test
user after service startup so it can connect, mirroring what an
administrator would do in production.

Assisted-by: Claude Code (claude-opus-4-6):claude-opus-4-6@default

Generated with Claude Code (https://claude.ai/code)

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2026-05-21 12:35:22 +00:00 committed by Andrei Vagin
parent 339db9fd46
commit a951237e25

View file

@ -32,6 +32,8 @@ run: all
-d --pidfile pidfile -o service.log --status-fd 200; \
$(PYTHON) read.py build/status"
rm -f build/status
@# Socket defaults to 0600; transfer ownership to the test user.
chown 1000:1000 build/criu_service.socket
chmod a+rw build/pidfile
sudo -g '#1000' -u '#1000' ./run.sh
sudo -g '#1000' -u '#1000' ./version.py