From 30c4e3d743e110afc604e42af3a2ce50709f05e8 Mon Sep 17 00:00:00 2001 From: Douglas Landgraf Date: Thu, 12 Sep 2024 23:14:31 -0400 Subject: [PATCH] check_run_systemd_journal_socket: add fail case for socket If host do not have the socket, let's fail right away Signed-off-by: Douglas Landgraf --- .../sockets/check_run_systemd_journal_socket.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ffi/attempts_to_access_forbidden_file_system_resource/sockets/check_run_systemd_journal_socket.sh b/tests/ffi/attempts_to_access_forbidden_file_system_resource/sockets/check_run_systemd_journal_socket.sh index a71a82b5..9247a87c 100644 --- a/tests/ffi/attempts_to_access_forbidden_file_system_resource/sockets/check_run_systemd_journal_socket.sh +++ b/tests/ffi/attempts_to_access_forbidden_file_system_resource/sockets/check_run_systemd_journal_socket.sh @@ -4,6 +4,12 @@ . ../../../e2e/lib/utils check_run_systemd_journal_socket_inode_number(){ + + if [ ! -e /run/systemd/journal/socket ]; then + info_message "FAIL: Path /run/systemd/journal/socket does not exist. Exiting." + exit 1 + fi + # Get inode number of /run/systemd/journal/socket inside and outside of the QM partition. inode_number_in_host=$(stat --printf='%i' /run/systemd/journal/socket) inode_number_in_qm=$(podman exec qm stat --printf='%i' /run/systemd/journal/socket)