File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ def test_setxattr_multiple(
150150 )
151151
152152
153- def test_setxattr_ignored (
153+ def test_xattr_ignored (
154154 test_file : str ,
155155 ignored_dir : str ,
156156 server : FileActivityService ,
@@ -176,7 +176,13 @@ def test_setxattr_ignored(
176176 # Set xattr on monitored file - should generate an event
177177 os .setxattr (test_file , 'user.monitored' , b'value' )
178178
179- # Only the monitored file's xattr event should arrive
179+ # Remove xattr on ignored file - should NOT generate an event
180+ os .removexattr (ignored_file , 'user.ignored' )
181+
182+ # Remove xattr on monitored file - should generate an event
183+ os .removexattr (test_file , 'user.monitored' )
184+
185+ # Only the monitored file's xattr events should arrive
180186 server .wait_events (
181187 skip_xattr = False ,
182188 events = [
@@ -187,6 +193,13 @@ def test_setxattr_ignored(
187193 host_path = test_file ,
188194 xattr_name = 'user.monitored' ,
189195 ),
196+ Event (
197+ process = process ,
198+ event_type = EventType .XATTR_REMOVE ,
199+ file = '' ,
200+ host_path = test_file ,
201+ xattr_name = 'user.monitored' ,
202+ ),
190203 ],
191204 )
192205
You can’t perform that action at this time.
0 commit comments