On Tue, 2014-05-06 at 13:00 +0200, [email protected] wrote:
> Hi!
> > > > +char *TCID = "readdir03";
> > > > +
> > > > +#if !defined __x86_64__
> > > 
> > > Why is the test disabled on x86_64? What about other 64 bit
> > > architectures?
> > > 
> > 
> > In syscall.h __NR_readdir only appears on NONE x86_64. It will fail when
> > I make on x86_64:
> > readdir03.c:122:15: error: ???__NR_readdir??? undeclared (first use in this
> > function)
> >   TEST(syscall(__NR_readdir, *test->fd, test->dirp, test->count));
> 
> We have testcases/kernel/include/linux_syscall_numbers.h and
> ltp_syscall() to solve this problem.
> 

Yeah, I got it. It looks good to me now. :)

> Once this header is included, the syscall number will always be defined
> and ltp_syscall() will return -1 and set errno to ENOSYS if syscall
> wasn't implemented on the particular arch.

> > > > +static void readdir_verify(const struct test_case_t *test)
> > > > +{
> > > > +       TEST(syscall(__NR_readdir, *test->fd, test->dirp, test->count));
> > > 
> > > So you are using raw readdir() syscall (man 2 readdir) instead of the
> > > glibc readdir() (man 3 readdir).
> > > 
> > > Are you aware that the rest of the readdir testcases use the glibc
> > > readdir()?
> > > 
> > 
> > Yes, I am aware that.
> > Could I create a new directory to do that or others?
> 
> Not necessarily. At least add a note about this in the comment at the
> start of the testcase, and maybe we should start the test numbers at 21.
> 

OK. I will add a note.
BTW, do you mean that we start the test at May 21.

> Moreover if you expect to create more than one testcase (which I expect
> because the current one does not cover much) you should put the
> old_linux_dirent structure definition into a header.
> 

OK. I will create more testcases for the raw readdir().

And thank you for your good help.
Best regards,
Zeng


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to