[LTP] [PATCH] pathconf01: Allow EINVAL where POSIX leaves support unspecified

Andrea Cervesato andrea.cervesato@suse.com
Tue Oct 13 16:37:56 CEST 2026


Hi Wake,

> pathconf01 is a positive test, and the einval_ok names actually succeed
> on glibc, musl and Bionic since Android 15: they return >= 0, or -1
> without changing errno.
> 
> TST_EXP_FAIL_ARR() and TST_EXP_FAIL2_ARR() expect the call to fail, so
> they report TFAIL wherever these names are supported for directories.
> I tried TST_EXP_FAIL2_ARR() and all 10 einval_ok names fail on glibc
> ("succeeded" or "expected EINVAL: SUCCESS (0)").
> 
> Here we still expect pathconf() to succeed, and only want to treat
> EINVAL as TCONF for the names where POSIX leaves directory support
> unspecified (POSIX only defines EINVAL for this case).
> 
> Does keeping the einval_ok check make sense to you, or would you still
> prefer storing an exp_errs array in struct tcase and checking it with
> tst_errno_in_set(), the helper behind TST_EXP_FAIL_ARR()?

Indeed, my review was biased by unrelated usage of TST_EXP_FAIL_ARR().
The patch is correct as is and we don't have any macro hich could substitute
the manual check we are applying in this patch.

Thanks for pointing it out.

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list