[LTP] [PATCH v2 09/10] Add setxattrat01 test
    Andrea Cervesato 
    andrea.cervesato@suse.com
       
    Mon Oct 13 09:54:37 CEST 2025
    
    
  
Hi!
On Wed Oct 8, 2025 at 11:44 AM CEST, Cyril Hrubis wrote:
> Hi!
>> +/*\
>> + * [Description]
>> + *
>> + * Test if setxattrat() syscall is correctly following symlink, setting a
>> + * xattr on a file.
>> + *
>> + * [Algorithm]
>> + *
>> + * - create a file and the symlink pointing to it
>> + * - run setxattrat() on the symlink following the pointing file
>> + * - verify that file xattr has been set
>> + * - verify that symlink xattr has not been set
>
> Shouldn't this be a variant of a setxattr() test?
>
>> + * - run setxattrat() on the symlink with AT_SYMLINK_NOFOLLOW
>> + * - verify that file xattr has not been set
>> + * - verify that symlink xattr has been set
>> + */
>
> And this a variant of lsetxattr() test?
This is the exact reason why I'm not yet 100% sure about coverage for
setxattrat, since most of the tests can be just variants of other
existing tests and most of the time we have code duplication.
After thinking carefully about this patch-set, I'm not sure to proceed
anymore, since the kernel itself is using setxattrat() to implement
setxattr() and lsetxattr().
-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
    
    
More information about the ltp
mailing list