Skip to content

Commit

Permalink
all: fix the "Old style watch rules are slower" warning
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
pcmoore committed Sep 5, 2024
1 parent 8e13f9c commit 6f8c12d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/fanotify/test
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ system("auditctl -D >& /dev/null");
# Create test rule.
my $key = key_gen();
my $testfile = "/tmp/$key";
system("auditctl -w $testfile -k $key");
system("auditctl -a always,exit -F path=$testfile -k $key");

# Start fanotify watcher in the background.
my $fanotify_pid = open3( undef, undef, undef, "$basedir/fanotify /tmp" );
Expand Down
2 changes: 1 addition & 1 deletion tests/file_create/test
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ my $dir = tempdir( TEMPLATE => '/tmp/audit-testsuite-XXXX', CLEANUP => 1 );

# set the directory watch
my $key = key_gen();
system("auditctl -w $dir -k $key");
system("auditctl -a always,exit -F path=$dir -k $key");

# create a new file in the watched directory
( my $fh, my $filename ) =
Expand Down
2 changes: 1 addition & 1 deletion tests/file_delete/test
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ my $gid_fmt = getgrgid($uid);

# set the directory watch
my $key = key_gen();
system("auditctl -w $dir -k $key");
system("auditctl -a always,exit -F path=$dir -k $key");

# delete file
unlink($filename);
Expand Down
2 changes: 1 addition & 1 deletion tests/file_rename/test
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ my $gid_fmt = getgrgid($uid);

# set the directory watch
my $key = key_gen();
system("auditctl -w $dir -k $key");
system("auditctl -a always,exit -F path=$dir -k $key");

# move/rename the file
rename( $filename, $filename . "-new" );
Expand Down

0 comments on commit 6f8c12d

Please sign in to comment.