|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0102 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 0102.
Report 0102 Actions
Problem Report Number 0102 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0102 Raised 1993-11-01 08:00 Updated 2003-03-13 08:00 Published 1993-11-05 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 XPG4.os/wstring/wcsncpy 1 Problem Summary TSD4.102 We think that the following source taken from test1() of wcsncpy has an error: 1 for (i = 0, wcp1 = wsto, wcp2 = expws; i < wslen; i++) 2 { 3 if (i == 0) 4 PATH_TRACE; 5 *wcp2++ = *wcp1++; 6 } 7 8 *wc... Problem Text
We think that the following source taken from test1() of wcsncpy
has an error:
1 for (i = 0, wcp1 = wsto, wcp2 = expws; i < wslen; i++)
2 {
3 if (i == 0)
4 PATH_TRACE;
5 *wcp2++ = *wcp1++;
6 }
7
8 *wcp2 = (wchar_t) '\0';
9
10 num = (2 * wslen) / 3;
11 for (i = 0, wcp1 = wsfrom, wcp2 = expws; i < num; i++)
12 {
13 if (i == 0)
14 PATH_TRACE;
15 *wcp2++ = *wcp1++;
16 }
17
18 *wcp2 = (wchar_t) '\0';
19
20 wcsave = *(wsfrom + num);/* Shorten string for this test... */
21 *(wsfrom + num) = (wchar_t) '\0';
22
23 rval = wcsncpy(wsto, wsfrom, (size_t) num);
24 globok = 0;
25 checkval(wsto, wsfrom, num, rval, expws, (wslen + 1));
26 PATH_FUNC_TRACE;
In line 18, expws[num] is set to 0 whereas location wsto[num] is undefined.
When checkval() is called, it compares wsto[num] to be equal to expws[num]
which do not compare because wsto[num] is undefined.
Similarly, In line 8 above, expws[wslen] location is set to 0 whereas location
wsto[wslen] is undefined. When checkval() is called, it compares
wsto[wslen] to be equal to expws[wslen] which do not compare because
wsto[wslen] is undefined.
One way to fix the above test is to initialize wsto to 0.
As a result of this comparison the test fails. We believe the test is at
fault and request that a waiver be granted.Test Output
XPG4.os/wstring/wcsncpy/T.wcsncpy 1 Failed
Test Description:
When s2 has greater than n wide characters in length, then a call to
wcsncpy() copies n wide characters from string s2 to s1, leaves s1
without a terminating null wide character and returns s1.
Test Strategy:
OBTAIN a sample string of wide characters by calling the routine
wcharstr().
SET the locale for LC_ALL to LOCALE1.
VERIFY that only the number of wide-characters requested are copied
when the string being copied is longer than the number of wide-
characters requested.
Test Information:
wcsncpy did not copy data correctly
Current language is WCL1
Current category is LC_ALL
expected result : 0x 2ae3 59c1 15e 303c 15f 303d 2ae3 59c1 29e 317c 3de
32bc 15f 303d 1de 30bc 15e 303c 1de 30bc 3de 32bc
actual result : 0x 2ae3 59c1 15e 303c 15f 303d 2ae3 59c1 29e 317c 3de
32bc 15f 303d 1de 30bc 15e 303c 1de 30bc 3de 32bc fffffff9
ffffffffReview 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 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 0102
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority