|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0168 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 0168.
Report 0168 Actions
Problem Report Number 0168 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0168 Raised 1994-06-14 08:00 Updated 2003-03-13 08:00 Published 1994-06-23 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.4 Test Identification POSIX.os/files/rmdir 9 Linked Problem Reports req.4.2.387, (in, old, system) Problem Summary TSD4.168 In the test program: ~/SRC/common/tsetlib/setupnospc.c: /* * Delete all files that (may or may not) have been created */ for (i = nfile; i > 0; i--) { (void) strcat(strcpy(name, base), "/fill.tmp"); (... Problem Text
In the test program: ~/SRC/common/tsetlib/setupnospc.c:
/*
* Delete all files that (may or may not) have been created
*/
for (i = nfile; i > 0; i--)
{
(void) strcat(strcpy(name, base), "/fill.tmp");
(void) strcat(name, itoa(i));
> (void) unlink(name);
(void) strcat(strcpy(name, base), "/fill.dir/fill.tmp");
(void) strcat(name, itoa(i));
> (void) unlink(name);
}
When MKDIR_TEST case is executing fill.tmp is a directory. Then the
following problem arises:
If unlink() is used on a directory that is empty (contains only the
files . and ..), the directory is unlinked, but the parent directory's
link count is left with an inaccurate value.
In the above case, the file system should be checked using fsck. To avoid
these types of problems, use rmdir() instead of unlink().
So, the code should take care of the case when fill.tmp will be a
directory. The suggested code change is listed below:
/*
* Delete all files that (may or may not) have been created
*/
int rval;
for (i = nfile; i > 0; i--)
{
(void) strcat(strcpy(name, base), "/fill.tmp");
(void) strcat(name, itoa(i));
if ((rval = rmdir(name)) == -1)
(void) unlink(name);
(void) strcat(strcpy(name, base), "/fill.dir/fill.tmp");
(void) strcat(name, itoa(i));
if ((rval = rmdir(name)) == -1)
(void) unlink(name);
}Test Output
/tset/POSIX.os/files/rmdir/T.rmdir 9 Unresolved
Test Description:
When the directory's link count becomes zero and no process has the
directory open, the space occupied by the directory shall be freed and
the directory shall no longer be accessible.
Posix Ref: Component RMDIR Assertion 5.5.2.2-26(B)
Test Information:
rmdir of rmdir-d.9/fill.dir failedReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is accepted as a test suite fault and it is recommended that a
waiver for a test suite deficiency be granted.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 0168
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority