Report 0164 Actions
Problem Report Number |
0164 |
Submitter's Classification |
Test Suite problem |
State |
Resolved |
Resolution |
Test Suite Deficiency (TSD) |
Problem Resolution ID |
TSD.X.0164 |
Raised |
1994-05-17 08:00 |
Updated |
2003-03-13 08:00 |
Published |
1994-06-14 08:00 |
Product Standard |
Internationalised System Calls and Libraries (XPG4) |
Certification Program |
The Open Brand certification program |
Test Suite |
VSX4 version 4.3.2 |
Test Identification |
XOPEN.os/locale/localeconv 2 |
Problem Summary |
TSD4.164 The X/Open Systems Verification Suite VSX User and Installation Guide, Sept. 1993 p. 114 states: For pseudo-language 5 (VSX4L0), itesm with string values should be set to the empty string, and items w... |
Problem Text |
The X/Open Systems Verification Suite VSX User and Installation Guide, Sept. 1993 p. 114 states:
For pseudo-language 5 (VSX4L0), itesm with string values should be set to the empty string, and items with numeric values must be unavailable (i.e. localeconv() returns their values as CHAR_MAX).
Although grouping and mon_grouping are represented as char * in the lconv data structure, when these items are defined through localedef, they are specified as a list of numeric values. localeconv()'s versions of these items are actually an array of small integers, each one stored in type char, so these are not "items with string values".
A null string as the value of the grouping and mon_grouping items from localeconv()'s data structure corresponds to a localedef definition outside the XPG4 space, that is, one whose meaning is not specified by XPG4, such as "grouping 0".
The way to specify that grouping and mon_grouping are not available is to specify -1 in the localedef file. This corresponds to a lconv array containing the character CHAR_MAX, which our implementation does as revealed by the test suite output.
|
Test Output |
/tset/XPG4.os/locale/localeconv/T.localeconv 2 Failed
Test Description:
The following members of the lconv structure returned are pointers to character strings, any of which (except decimal_point can point to "", if the value is not available in the current locale or has zero length. decimal_point thousands_sep grouping int_curr_symbol currency_symbol mon_decimal_point mon_thousands_sep mon_grouping positive_sign negative_sign
Test Strategy: CREATE child SET the current locale to be the C locale using setlocale() FOR the languages CLANG and VSX4L0 SET the current locale using setlocale() OBTAIN the lconv structure associated with the current locale using localeconv()
VERIFY that all items in the lconv structure that can be set to "" have the value "" and that the decimal_point element is set to "."
Test Information:
Current language binding is VSX4L0 Different values for the member grouping found in lconv Expected value: "" Actual value: "\177" Current language binding is VSX4L0 Different values for the member mon_grouping found in lconv Expected value: "" Actual value: "\177"
|
Review Information
Review Type |
TSMA Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Recommendation |
No Resolution Given |
Review Response |
There seems to be a significant ambiguity in the definition of localeconv() relating to the format of the character array pointed to by the elements grouping and mon_grouping. In the early part of the description it states that the members of structures of type char * are pointers to strings any of which (except decimal_point) can point to "". In the individual descriptions of the grouping and mon_grouping it again states that these values are strings. However, later description on the following page specifies the manner in which in the elements of the string are to be interpreted. The description specifies that the terminating null byte (value 0) will be interpreted as a persistent repitition of the previous element. The case in which there is no previous element (i.e. the string is an empty string) is not clearly specified.
The waiver request suggests that this ambiguity is resolved by requiring that the element {CHAR_MAX} be included in the array so that no further grouping is performed (i.e. no grouping is performed at all) in the case that the value is not available in the current locale. This aligns with an earlier part of the definition which relates to elements of type char and which could plausibly be applied to the two character arrays for grouping and mon_grouping, though this is not explicitly stated.
This definition is derived from the ANSI C specification and it may be necessary to obtain an interpretation from the committee controlling that standard.
I recommend that a temporary interpretation be granted pending a formal interpretation of the issue from the ANSI C interpretations body. The K/RT group will probably wish to be involved in drafting the interpretation request.
|
Review Type |
Expert Group Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Resolution |
No Resolution Given |
Review Conclusion |
It was agreed that the test suite should be changed to allow either a null string or a string containing the single character CHAR_MAX to signify that no grouping or no monetary grouping is specified for a locale.
It was also noted that there were a number of inconsistencies in the XBD which needed to be resolved in a future issue.
|
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:
|