Skip to content

Commit

Permalink
tests/syscalls_file: restrict rules to test subdir to avoid oom failure
Browse files Browse the repository at this point in the history
Due to the overly broad logging of open{,at,at2} syscalls, some test
systems have been overwhelmed by systemd-journald activity triggering
oom, causing the test to fail.

Restrict the test rules to the expected test directory.

Signed-off-by: Richard Guy Briggs <[email protected]>
[PM: wrap long lines in the commit description, subj tweak]
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
rgbriggs authored and pcmoore committed Aug 28, 2024
1 parent 1c58880 commit 22feeba
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/syscalls_file/test
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ my $nr_openat2 = 437;
my $key = key_gen();
my $result;
my $result_open = system(
"auditctl -a always,exit -F arch=b$abi_bits -S open -k $key 2> $stderr");
"auditctl -a always,exit -F arch=b$abi_bits -F dir=$dir -S open -k $key 2> $stderr"
);
my $result_openat =
system("auditctl -a always,exit -F arch=b$abi_bits -S openat -k $key");
system(
"auditctl -a always,exit -F arch=b$abi_bits -F dir=$dir -S openat -k $key");
my $result_openat2 =
system("auditctl -a always,exit -F arch=b$abi_bits -S $nr_openat2 -k $key");
system(
"auditctl -a always,exit -F arch=b$abi_bits -F dir=$dir -S $nr_openat2 -k $key"
);
ok( $result_open == 0 or $result_openat == 0 or $result_openat2 == 0 );

# create a new file
Expand Down

0 comments on commit 22feeba

Please sign in to comment.