|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2338 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 2338.
Report 2338 Actions
Problem Report Number 2338 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.1206 Raised 2004-02-20 02:05 Updated 2004-03-02 16:49 Published 2004-03-02 16:49 Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSU version 5.2.4 Test Identification CAPI.os/files/fstat 5 Problem Summary fstat 5 assumes all inodes for a filesystem are allocated at creation Problem Text
Assertion #5 of CAPI.os/files/fstat will fail on filesystems which
do not allocate all of their inodes when they are created.
** void test5A() - tests the assertion:
** A call to int fstat(int fildes, struct stat *buf) shall place the
** number of blocks allocated for the object referenced by fildes into
** the st_blocks member of the stat structure pointed to by buf.
the code that generates the error is here:
if(fstat(fildes, &st_buf) == -1) {
fwerrno("fstat");
return;
}
if(st_buf.st_blocks != 0) {
tet_infoline("ERROR: File block count incorrect:");
sprintf(ebuf," Expected 0, received %ld",
st_buf.st_blocks);
tet_infoline(ebuf);
tet_result(TET_FAIL);
return;
}
When tested on a filesystem that allocates inodes as needed, this
code fails.Test Output 200|1082 5 06:48:57|TP Start
520|1082 5 00002835 1 1|PREP: Create a regular file
520|1082 5 00002835 1 2|TEST: fstat places blocks allocated in st_blocks
520|1082 5 00002835 1 3|ERROR: File block count incorrect:
520|1082 5 00002835 1 4| Expected 0, received 1
220|1082 5 1 06:48:57|FAILReview Information
Review Type TSMA Review Start Date 2004-02-20 02:05 Last Updated 2004-02-20 18:31 Completed 2004-02-20 18:31 Status Complete Review Recommendation Test Suite Deficiency (TSD) Review Response I agree that the test is making a false assumption, although it is more
general than just about inode allocation at file system creation. The
test assumes that an empty file has an st_blocks value of 0. This is
true for traditional file systems, but is not guaranteed by the
specification. The test should be changed to use a different strategy
for testing st_blocks.
Review Type SA Review Start Date 2004-02-20 18:31 Last Updated 2004-02-21 00:40 Completed 2004-02-21 00:40 Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion The TSMA agrees that the test is making a false assumption, although
it is more general than just about inode allocation at file system
creation. The test assumes that an empty file has an st_blocks value
of 0. This is true for traditional file systems, but is not guaranteed
by the specification. The test will be changed to use a different
strategy for testing st_blocks.
Problem Reporting System Options:
- View Report 2338
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority