[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ftw_L test7 and ftw test4



On Thu, Dec 13, Andrew Josey wrote:

> Thorsten, All
> We've investigated this some. The conclusion we have reached
> is that T.ftw_L test 7 is in error and should be removed from
> the next version of the test suite, for the moment we
> should waive this test as a test suite problem.
> 

I think I found the bug in T.ftw_L test 7:

You create a directory with the name "file7". Normally, all test
cases uses a name with "dir" for directories and "file" for files.
Could it be that you only need to change the mkdir with a creat in
test 7 to create a file?
If "file7" would really be a file, the test 7 would be correct and
would make sense (error if file is not readable).

Could this be the case?

  Thorsten

> regards
> Andrew
> 
> On Dec 11, 12:20pm in "ftw_L test7 and ftw ", Thorsten Kukuk wrote:
> >
> > Hi,
> >
> > I try to fix ftw() in the moment. But I think it is impossible.
> >
> > T.ftw_L Test 7 does:
> >
> > mkdir tftw-t.7
> > chmod 777 tftw-t.7
> > mkdir tftw-t.7/tftw-t.7
> > chmod 333 tftw-t.7/tftw-t.7
> >
> > ftw(tftw-t.7/tftw-t.7, ...) and expects Return: -1, errno EACCES.
> >
> > Error message:
> > A call to ftw() with read permission denied did not fail
> > Expected Return: -1, errno EACCES
> > Actual Return: 0, errno 13(EACCES)
> >
> >
> > No problem to fix, but then the following will fail:
> >
> > T.ftw 4
> >
> > mkdir ./ftw_d.1
> > chmod 333 ./tfw_d.1
> >
> > ftw(./tfw_d.1, ...) and expects fn to be called with FTW_DNR.
> >
> > The exact error message here:
> >         ftw(./ftw_d.1, ..., 2) returned -1 instead of 0
> >         ftw did not call function with argument FTW_DNR
> >         although the root of the file tree given was
> >         read-only
> >
> >
> > What is the difference between both? What will the hint with
> > teh read-only file tree say me? As far as I can see in the moment,
> > it is impossible to fix both test cases, one of them will ever fail.
> >
> >   Thanks,
> >    Thorsten
> >
> > --
> > Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
> > SuSE GmbH            Deutschherrenstr. 15-19       D-90429 Nuernberg
> > --------------------------------------------------------------------
> > Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B
> >-- End of excerpt from Thorsten Kukuk
> 

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE GmbH            Deutschherrenstr. 15-19       D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B



Reply to: