


     ftw_L(LSB.os/genuts)Release 1.1 (UniSoft Ltd.ftw_L(LSB.os/genuts)



     NAME
	  LSB.os/genuts/ftw_L -	traverse (walk)	a file tree test case

     DESCRIPTION
	  This test case tests the ftw() system	call interface for
	  conformance to parts of The Open Group's CAE Specification:
	  System Interfaces and	Headers, page:ftw()

     TESTS
	  1    On a call to ftw(path, fn, ndirs) the pathname path is
	       resolved	in accordance with the requirements for
	       pathname	resolution.

	  2    On a call to ftw(path, fn, ndirs) the filename path
	       supports	portable filenames.

	  3    A call to ftw(path, fn, ndirs) uses at most one file
	       descriptor for each directory level traversed.

	  4    When a call to ftw(path,	fn, ndirs) encounters an
	       object that is a	symbolic link on which a call to
	       stat() is successful, then the implementation calls the
	       function	(*fn)(object, ptr, flag) with flag equal to
	       FTW_SL.

	  5    When a call to ftw(path,	fn, ndirs) encounters an
	       object that is a	symbolic link on which a call to
	       stat() is unsuccessful, then the	implementation calls
	       the function (*fn)(object, ptr, flag) with flag equal
	       to FTW_SL or FTW_NS.

	  6    When search permission is denied	for any	component of
	       path, then a call to ftw(path, fn, ndirs) returns -1
	       with errno set to EACCES.

	  7    When read permission is denied for path,	then a call to
	       ftw(path, fn, ndirs) returns -1 with errno set to
	       EACCES.

	  8    When too	many symbolic links are	encountered when
	       resolving path, then a call to ftw(path,	fn, ndirs)
	       returns -1 with errno set to ELOOP.

     Untestable	aspects
	  1    When path is a symbolic link and	the resolution of path
	       produces	an intermediate	result whose length exceeds
	       {PATH_MAX}, then	a call to ftw(path, fn,	ndirs) returns
	       -1 with errno set to ENAMETOOLONG.
	       Reason for omission: There is no	known portable test
	       method for this assertion.





     Page 1					    (printed 2/21/103)






     ftw_L(LSB.os/genuts)Release 1.1 (UniSoft Ltd.ftw_L(LSB.os/genuts)



     Grey areas
	  1    When ftw() encounters a symbolic	link, does the stat
	       structure passed	to the user-supplied function refer to
	       the symbolic link or to the object pointed to by	the
	       symbolic	link?  Should each of the references in	the
	       specification to	a call to stat() made by the
	       implementation have been	updated	to lstat() when	the
	       references to symbolic links were added?

	  2    When ftw() encounters a symbolic	link that points to a
	       directory, does it follow the symbolic link and descend
	       the pointed-to directory?  The mention of calling
	       stat() on each object encountered during	directory
	       traversal seems to contradict the reporting of FTW_SL
	       when a symbolic link is encountered.

	  3    The description of the ELOOP error condition is rather
	       unclear.	 Should	it say:	``[ELOOP] Too many symbolic
	       links were encountered while resolving path''?

     RELEASE
	  LSB-os 1.1 (00/11/23)

































     Page 2					    (printed 2/21/103)



