[LTP] [PATCH v2] getcwd01: Implement .test_variants

Wei Gao wegao@suse.com
Thu Jan 4 03:23:38 CET 2024


On Wed, Jan 03, 2024 at 04:32:59AM -0500, Wei Gao via ltp wrote:
> On Wed, Jan 03, 2024 at 09:44:25AM +0100, Petr Vorel wrote:
> > Hi Cyril, all,
> > 
> > > Hi!
> > > > @Li @Cyril: are you ok to test libc getcwd() wrapper implementations on NULL
> > > > buffer in getcwd01.c? Or we just skip NULL buffer test on all libc?
> > > > I would be ok to test it, because change in the implementation can influence
> > > > lots of user space software, although glibc or any other libc can obviously
> > > > change it's behavior.
> > 
> > > I guess that the easiest solution is to run the test in a child and pass
> > > the test both on EFAULT and child being killed by SIGSEGV. Any special
> > > cases and ifdefs are assuming something that is not promised and will
> > > have to be changed sooner or later.
> > 
> > Good point. I guess something like testcases/kernel/syscalls/mmap/mmap05.c
> > approach right? Wei, could you try that?
> Sure! Will check mmap05.c firstly.
I have checked mmap05.c, got idea how to check SIGSEGV, but in current case NULL buffer
will not trigger any SIGSEGV in musl(I have tested on musl env today). 
Correct me if i have misunderstanding.

BTW:I will continue update patch base Petr's former comments.
> > 
> > Kind regards,
> > Petr
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp


More information about the ltp mailing list