[LTP] [PATCH v2 3/4] syscalls: lchown02: Convert to new API
Andrea Cervesato
andrea.cervesato@suse.com
Thu Aug 7 13:25:44 CEST 2025
On 8/7/25 1:18 PM, Andrea Cervesato wrote:
>
> Hi!
>
> On 8/6/25 11:07 PM, Ricardo B. Marlière via ltp wrote:
>> -
>> -static struct test_case_t test_cases[] = {
>> - {SFILE1, "Process is not owner/root", EPERM, setup_eperm},
>> - {SFILE2, "Search permission denied", EACCES, setup_eacces},
>> - {NULL, "Unaccessible address space", EFAULT, setup_efault},
>> - {path, "Pathname too long", ENAMETOOLONG, setup_longpath},
>
> This is weird, we supposed to pass a path that is too long (I guess
> bigger than PATH_MAX), but we are passing NULL and obtaining the same
> error. It should fail with EINVAL/ENOENT I guess...
>
> @Cyril WDYT ? It sounds like a kernel error to me.
>
> - Andrea
Sorry for pinging you Cyril, I didn't notice the setup() statement. You
can ignore the statement above.
We don't need to do that in setup(). We can define more tst_buffers,
each one with a specific size and already initialized. At that point,
*pathname would be **pathname and we pass the pointer to the string
containing bad data.
- Andrea
More information about the ltp
mailing list