Re: [PATCH v2 10/10] syscalls/fanotify20: Test capture of multiple errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Amir Goldstein <amir73il@xxxxxxxxx> writes:

> On Tue, Oct 26, 2021 at 9:44 PM Gabriel Krisman Bertazi
>> --- a/testcases/kernel/syscalls/fanotify/fanotify20.c
>> +++ b/testcases/kernel/syscalls/fanotify/fanotify20.c
>> @@ -78,6 +78,18 @@ static void tcase2_trigger_lookup(void)
>>                         ret, BAD_DIR, errno, EUCLEAN);
>>  }
>>
>> +static void tcase3_trigger(void)
>> +{
>> +       trigger_fs_abort();
>> +       tcase2_trigger_lookup();
>
> So after remount,abort filesystem operations can still be executed?
> Then I guess my comment from the previous patch about running the test in a loop
> is not relevant?

Hi Amir,

As you mentioned here, -i works fine.  Abort will remount with
MS_RDONLY, and this doesn't affect the existing tests.  Future tests
that write to the file system inside .trigger_error() would require the
umount-mount cycle but, since the goal is testing fanotify and not
specific fs errors, I think we don't need the added complexity of such
tests.

Output of '-i #' always pass:

  root@test-box:~/ltp/testcases/kernel/syscalls/fanotify# ./fanotify20 -i 5
  tst_device.c:88: TINFO: Found free device 0 '/dev/loop0'
  tst_test.c:932: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
  mke2fs 1.46.4 (18-Aug-2021)
  tst_test.c:1363: TINFO: Timeout per run is 0h 05m 00s
  fanotify.h:252: TINFO: fid(test_mnt) = 469af9fc.8ced5767.2.0.0...
  fanotify.h:252: TINFO: fid(test_mnt/internal_dir/bad_dir) = 469af9fc.8ced5767.8002.acd05469.0...
  debugfs 1.46.4 (18-Aug-2021)
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2

  Summary:
  passed   20
  failed   0
  broken   0
  skipped  0
  warnings 0

Thanks,

-- 
Gabriel Krisman Bertazi



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux