[PATCH] tests: chdir.test

Jay Joshi jay.r.joshi100 at gmail.com
Sat Mar 12 08:07:20 UTC 2016


Hi,
On Sat, Mar 12, 2016 at 7:53 AM, Dmitry V. Levin <ldv at altlinux.org> wrote:
>
> Hi,
>
> On Fri, Mar 11, 2016 at 11:22:23PM +0530, Jay Joshi wrote:
> > Hello,
> >
> > This is my first attempt to add test for syscall (here, chdir). Any
> > suggestion, comment, criticism is welcomed.
>
> chdir is already well covered, see
> $ git grep chdir tests
>
> You must have missed my recommendation to check current coverage report
> at https://codecov.io/github/strace/strace before adding new tests.
>
> I think you'd rather take something that's not tested at all.
>

Thanks. I couldn't understand coverage structure properly. Is coverage
calculated manually, semi-automatically or automatically?

> > +#if defined __NR_chdir
>
> Why do you think that libc wrapper for chdir syscall is not suitable?
>

Syscall should only be used when glibc wrapper function for that
syscall is not available. Please correct me if I'm wrong. If so, what
is the advantage of using syscall function for, say "chmod"? Please
help me understand where to use what.

> > +  if (errno == ENOSYS) {
> > +    printf("chdir(\"%s\") = -1 ENOSYS (%m)\n", sample_dir);
>
> chdir failing with ENOSYS?  Really?
>
>

Not sure. Where can I find whether system would have surely
implemented a particular system call? In other words, would never
throw ENOSYS.

>
> --
> ldv
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel
>




More information about the Strace-devel mailing list