|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0087 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 0087.
Report 0087 Actions
Problem Report Number 0087 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0087 Raised 1993-08-25 08:00 Updated 2003-03-13 08:00 Published 1993-09-03 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.2.4 Test Identification ANSI.os/string/strxfrm_X 1 3 4 Problem Summary TSD4.087 These tests assume that the transformed strings can be stored in 25 bytes or constant number of bytes. However, the standard says: "The fact that when n is zero, s1 is permitted to be a null pointer, ... Problem Text
These tests assume that the transformed strings can be stored in 25 bytes or
constant number of bytes.
However, the standard says:
"The fact that when n is zero, s1 is permitted to be a null pointer, is useful
to determine the size of the s1 array prior to making the transformation"
So, the right way before applying the function is to call it with n=0 to
determine the bytes needed for the transformation and then applying
the transformation.
For example, the following code sequence is in error:
(void) strcpy(buf2, "bern");
(void) asc_to_psl(buf2, VALINFO1LANG);
(void) strxfrm(buf1, buf2, (size_t)25);
expect = strlen(buf1);
retval = (int) strxfrm(buf3, buf2, (size_t)(expect-1));
The correct way to write this test is:
(void) strcpy(buf2, "bern");
(void) asc_to_psl(buf2, VALINFO1LANG);
expect = strxfrm(NULL, buf2, 0);
retval = (int) strxfrm(buf3, buf2, (size_t)(expect-1));
Same problem exists in test 1 and 3 of strxfrm().Test Output
/tset/ANSI.os/string/strxfrm_X/T.strxfrm_X 4 Failed
Test Description:
The return value gives the length of string that is required to hold
the transformation of the string s2 (This value may exceed the value
of n).
Test Strategy:
CREATE child process
VERIFY that the maximum size of the string is returned when size
argument < required size.
Test Information:
If the returned string exceeds the length set in the 3rd argument, the
required length is returned
Current language setting is VSX4L1
strxfrm did not return expected value
value of string to be transformed (4245534e)
expected return value : 20
actual return value : 40Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The alternative strategy provided in the accompanying text suufers from the
weakness that it assumes that the return from strxfrm(NULL, buf2, 0) will
be correct. Since the test is verifying the accuracy of strxfrm(), this
cannot be considered to be a good strategy.
I assume that the DEC system allows for 10 collating levels and uses
one byte for each collating level when generating the string. If this
is correct, a string length of 40 would be required for the transformation
of the four byte string. In this case the implementation is working
correctly and it is accepted that this is a test suite deficiency.
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 0087
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority