|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1230 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 1230.
Report 1230 Actions
Problem Report Number 1230 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0432 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Internationalised System Calls and Libraries Extended (UNIX 95) Certification Program The Open Brand certification program Test Suite VSU version 4.0.2 Test Identification CAPIbase/ftwnftw 1 24 Problem Summary PG4U.00033 The test does not properly test the number of fds used by ftw(). Problem Text
Both of these tests that the allocation of file descripters are sequential
numbers. The lowest file descriptor is allocated but since a number may have
been skipped the method used by the test suite to determine the number of
file descriptors used is inaccurate. The specification does not require that
these interfaces compensate for file descripters that may have been used by
the operating system on the behalf of the process.Test Output
TEST CASE: ftw
TEST PURPOSE #1
A call to int ftw(const char *path, int (*fn)(const
char *, const struct stat *ptr, int flag), int ndirs)
shall use at most one file descriptor for each level
in the file tree.
PREP: Determine which file descriptors should be used
TEST: No more than 1 file descriptor used per directory
ERROR: Too many file descriptors used
1 FAIL
also
TEST CASE: nftw
TEST PURPOSE #24
A call to int nftw(const char *path, int (*fn)(const
char *, const struct stat *, int, struct FTW *), int
depth, int flags) shall use at most one file
descriptor for each directory level.
PREP: Create path
TEST: No more than 1 file descriptor is used in traversal
INFO: Call to fn() at ../tmp/data/dirh
INFO: Call to fn() at ../tmp/data/dirh/dir_left.1
INFO: Call to fn() at ../tmp/data/dirh/dir_left.1/dir_left.2
ERROR: expected no more than 3 fds to be used, 4 usedReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We recommend this request be refused.
We believe the tests are correct.
Using the ftw test as an example...
The test determines how many initial file descriptors are open
then calls ftw() to walk a heirarchy.
The per object function provided (which is called for each object
in the hierarchy) does an open and close to get the next available
fd. Since the XSH open() spec states
The open() function will return a file descriptor for the named
file that is the lowest file descriptor not currently open for
that process. ...
this fd is guaranteed represent the number of fds used.
Since the net number of fds used by the function is 0 and the
function is called by ftw() the difference between the number of
fds used at that point and the initial number of fds in use
before the ftw() call must be attributed to the ftw() call.
The ftw() spec states
The ftw() function uses at most one file descriptor for each
level in the tree.
The test compares the number of fds used to the maximum depth
of the hierarchy being searched. If this number is exceeded the
test fails.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 1230
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority