PR0037.html

LSB Problem Report

Problem Report Number 0037 (INT.0010)
Submitter's Classification Test Suite Problem (TSD)
State Resolved
Resolution Interpretation (INT)
Raised 2003-10-02 21:28
Updated 2003-10-10 14:30
Published 2003-10-10 14:30
Certification Program Linux Standard Base Conformance Release 1.3
Test Suite lsb-runtime IA32 version 1.3.6-3
Test Identification LI18NUX2K.L1/utils/* (see Problem Text output for list)
Problem Summary The LI18NUX2K.L1/utils tests don't map to something in the spec
Problem Text It's not clear that the spec *requires* what the
LI18NUX2K.L1/utils tests are testing for. Please see the
thread on the lsb-wg mailing list. It starts at,

http://freestandards.org/pipermail/lsb-wg/2003-October/000011.html

Until someone can point to the line in the spec that shows
that this behavior is *required* then I consider this a test
suite problem and not a spec problem

SECTION: LI18NUX2K.L1/utils
TEST CASE: diff/diff
TEST PURPOSE #2
* When -b option is specified, verify this utility interprets whitespace
character according to the current locale.

Can't interprets white space characters according to the current locale.
2 FAIL
TEST CASE: fold/fold
TEST PURPOSE #1
* When this utility folds the lines without -b option, verify each line
is not folded in the middle of character.

Some characters are not wrapped on the assigned width.
1 FAIL
TEST PURPOSE #2
* When this utility folds the lines with -b option, verify each line is
not folded in the middle of character.

Some characters are not wrapped on the assigned width.
2 FAIL
TEST PURPOSE #3
* When this utility folds the lines with -s option, verify this utility
interprets blank characters according to the current locale.

Some blank character is not interpreted.
3 FAIL
TEST CASE: join/join
TEST PURPOSE #3
* When -t option is specified, verify this utility uses given character
as a separator even if the character is multibyte character.

This utility does not join the files.
3 FAIL
TEST PURPOSE #4
* When -t option is not specified, verify blank characters according to
the current locale are used as input field separators.

This utility does not join the files.
4 FAIL
TEST CASE: pr/pr
TEST PURPOSE #1
* When -w option is specified, verify this utility truncates the lines
to make the length of the lines be less than or equal to the assigned width.

Can't truncates the input lines correctly.
1 FAIL
TEST PURPOSE #3
* When -n option is specified, verify this utility uses the given
character as the separator between line number and first column.

Can't interpret character as the separator between line number and first
column.
3 FAIL
TEST PURPOSE #4
* When -s option is specified, verify this utility uses the given
character as the separator during the columns.

Can't interpret character as the separator during the columns.
4 FAIL
TEST PURPOSE #5
* When -i option is specified, verify this utility uses the given
character as the character which multiple space characters is replaced
with. The replaced space characters are to the next tab stop.

Can't replace the taget spaces with the character correctry.
5 FAIL
TEST PURPOSE #6
* When -e option is specified, verify this utility uses the given
character as the character which is replaced with multiple space
characters. The number of space characters is defined so that next
character stands at tab_stop.

Can't replace the character with the spaces correctry.
6 FAIL
TEST CASE: sort/sort
TEST PURPOSE #8
* When -t option is specified, verify this utility use a character as a
field separator even if the character is a multibyte character.

Can't handle field separator written in a multibyte chaaracter.
8 FAIL
TEST PURPOSE #9
* When -k keydef option is specified, verify this utility is able to
define start/end position even if the lines have multibyte characters
(Especially check about the character position. i.e. 'field.character').

Can't handle key definition when field contains mutibyte characters.
9 FAIL
TEST PURPOSE #10
* When -k keydef option is specified and keydef has a character b,
verify this utility interprets which character is a blank character in
the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
10 FAIL
TEST PURPOSE #11
* When -k keydef option is specified and keydef has a character d,
verify this utility interprets which character is a blank character or
an alphanumeric character in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
11 FAIL
TEST PURPOSE #12
* When -k keydef option is specified and keydef has a character f,
verify this utility treats a lower-case character as same as its
upper-case character in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
12 FAIL
TEST PURPOSE #13
* When -k keydef option is specified and keydef has a character i,
verify this utility interprets a printable character correctly in the
range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
13 FAIL
TEST PURPOSE #14
* When -k keydef option is specified and keydef has a character n,
verify this utility sorts numeric order in the range which defined by
keydef. (Especially check the radix character, thousands separator and
sign are interpreted correctly.)

Can't handle key definition when field contains mutibyte characters.
14 FAIL
TEST PURPOSE #15
* When +pos option is specified, verify this utility is able to define
start position even if the lines have multibyte characters (Especially
check about the character position. i.e. 'field.character').

Can't handle key definition when field contains mutibyte characters.
15 FAIL
TEST PURPOSE #16
* When -pos option is specified, verify this utility is able to define
end position even if the lines have multibyte characters (Especially
check about the character position. i.e. 'field.character').

Can't handle key definition when field contains mutibyte characters.
16 FAIL
TEST PURPOSE #24
* When -c and -t option are specified, verify this utility use a
character as a field separator even if the character is a multibyte
character.

Can't handle field separator written in a multibyte chaaracter.
24 FAIL
TEST PURPOSE #25
* When -c and -k keydef option are specified, verify this utility is
able to define start/end position even if the lines have multibyte
characters (Especially check about the character position. i.e.
'field.character').

Can't handle key definition when field contains mutibyte characters.
25 FAIL
TEST PURPOSE #26
* When -c and -k keydef option are specified and the keydef has a
character b, verify this utility interprets which character is a blank
character in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
26 FAIL
TEST PURPOSE #27
* When -c and -k keydef option are specified and keydef has a character
d, verify this utility interprets which character is a blank character
or an alphanumeric character in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
27 FAIL
TEST PURPOSE #28
* When -c and -k keydef option is specified and keydef has a character
f, verify this utility treats a lower-case character as same as its
upper-case character in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
28 FAIL
TEST PURPOSE #29
* When -c and -k keydef option are specified and keydef has a character
i, verify this utility interprets a printable character correctly in the
range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
29 FAIL
TEST PURPOSE #30
* When -c and -k keydef option are specified and keydef has a character
n, verify this utility check the file whose lines are sorted numeric
order in the range which defined by keydef. (Especially check the radix
character, thousands separator and sign are interpreted correctly.)

Can't handle key definition when field contains mutibyte characters.
30 FAIL
TEST PURPOSE #31
* When -c and +pos option are specified, verify this utility is able to
define start position even if the lines have multibyte characters
(Especially check about the character position. i.e. 'field.character').

Can't handle key definition when field contains mutibyte characters.
31 FAIL
TEST PURPOSE #32
* When -c and-pos option are specified, verify this utility is able to
define end position even if the lines have multibyte characters
(Especially check about the character position. i.e. 'field.character').

Can't handle key definition when field contains mutibyte characters.
32 FAIL
TEST PURPOSE #40
* When -m and -t option are specified, verify this utility use a
character as a field separator even if the character is a multibyte
character.

Can't handle field separator written in a multibyte chaaracter.
40 FAIL
TEST PURPOSE #41
* When -m and -k keydef option are specified, verify this utility is
able to define start/end position even if the lines have multibyte
characters (Especially check about the character position. i.e.
'field.character').

Can't handle key definition when field contains mutibyte characters.
41 FAIL
TEST PURPOSE #42
* When -m and -k keydef option are specified and keydef has a character
b, verify this utility interprets which character is a blank character
in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
42 FAIL
TEST PURPOSE #43
* When -m and -k keydef option are specified and keydef has a character
d, verify this utility interprets which character is a blank character
or an alphanumeric character in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
43 FAIL
TEST PURPOSE #44
* When -m and -k keydef option are specified and keydef has a character
f, verify this utility treats a lower-case character as same as its
upper-case character in the range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
44 FAIL
TEST PURPOSE #45
* When -m and -k keydef option are specified and keydef has a character
i, verify this utility interprets a printable character correctly in the
range which defined by keydef.

Can't handle key definition when field contains mutibyte characters.
45 FAIL
TEST PURPOSE #46
* When -m and -k keydef option are specified and keydef has a character
n, verify the outputs this utility makes is sorted numeric order in the
range which defined by keydef. (Especially check the radix character,
thousands separator and sign are interpreted correctly.)

Can't handle key definition when field contains mutibyte characters.
46 FAIL
TEST PURPOSE #47
* When -m and +pos option are specified, verify this utility is able to
define start position even if the lines have multibyte characters
(Especially check about the character position. i.e. 'field.character').

Can't handle key definition when field contains mutibyte characters.
47 FAIL
TEST PURPOSE #48
* When -m and -pos option are specified, verify this utility is able to
define end position even if the lines have multibyte characters
(Especially check about the character position. i.e. 'field.character').

Can't handle key definition when field contains mutibyte characters.
48 FAIL
TEST CASE: unexpand/unexpand
TEST PURPOSE #1
* When -a option is specified and this utility processes tab and space
characters, verify this utility determines the width in column positions
each character would occupy on a constant-width font output device.

Can't determine width in column positions.
1 FAIL
TEST CASE: uniq/uniq
TEST PURPOSE #2
* When -f option or -number is specified, this utility correctly
recognizes the boundaries of words. The boundaries are shown as blank
characters constituted in current locale.

This utility can not interpret blank characters
2 FAIL
TEST PURPOSE #3
* When -s option or +number is specified, this utility ignore the first
n characters when doing comparisons even if the characters are multibyte
characters.

This utility can not interpret multibyte characters
3 FAIL
TEST CASE: wc/wc
TEST PURPOSE #1
* When -m option is specified, verify this utility outputs the number of
characters in each input file even if the characters are multibyte
characters.

Can't count number of characters.
1 FAIL
TEST PURPOSE #2
* When this utility writes to the standard output the number of words,
this utility correctly recognizes the boundaries of words. The
boundaries are shown as white-space characters constituted in current
locale.

Can't count number of words.
2 FAIL
.

Review Information

Review Type TSMA Review
Start Date 2003-10-02 21:28
Last Updated 2003-10-05 08:38
Completed 2003-10-05 08:38
Status Complete
Review Recommendation Rejected (REJ)
Review Response We would recommend that this be rejected as a TSD
since the test suite is testing the specification.
There are issues however that the SA should consider
which may be grounds for another result such as
an Interpretation.

This appears to be an issue of

(1) Is a binary UTF-8 locale required to be supported
on all runtimes?

(2)Is an LSB runtime that has multibyte support for the
system interfaces and only partial or no multibyte support
for the utilities conforming?

Investigations have shown that the platform has multibyte
support for the system interfaces and that localedef
will support building the locale . MB_LEN_MAX on
the implementation returns 16.

It is true that a conforming implementation of the Single
UNIX Specification is not required to support multibyte
characters, however in that case the implementation limit,
MB_LEN_MAX from limits.h and obtainable through getconf,
should be set to 1.

An implementation that partially supports multibyte
characters would not be conforming to the Single UNIX
Specification -- its an all or nothing matter.


Its possible that this system could claim that the
locale used is not supported, however UTF-8 encodings
are supported by other LSB systems and appears to be
supported on the implementation.

If the implementation chose not to support the encoding
its possible that the localedef utility could return

"2
The locale specification exceeded implementation limits
or the coded
character set or sets used were not supported by the
implementation,
and no locale was created."

to show that the implementation does not. At the moment
the implementation does not.


A couple of observations based on looking at the test results:

It has been verified that the system under test supports
multibyte characters
since the utilities are able to correctly meet some of the
requirements, for example

For diff there are three assertions and tests

1. Verify this utility compares text files which include
multibyte characters.

2. When -b option is specified, verify this utility
interprets whitespace
character according to the current locale.

3. When -r option is specified, verify this utility handles
files and
directories whose names have multibyte characters.

two of which pass (tests 1 and 3).

One argument put forward is that the assertions/tests are
not in the spec.
The test that fails is derived from the requirement on the
diff man
page in the SUSv2

(this and other extracts from online SUSv2 diff page
copyright The Open Group)

"-b Cause any amount of white space at the end of a line to
be treated as
a single newline character (that is, the white-space
characters preceding
the newline character are ignored) and other strings of
white-space
characters, not including newline characters, to compare equal."

Environment variables affecting diff include LANG and LC_CTYPE,
LC_CTYPE states:

"LC_CTYPE
Determine the locale for the interpretation of sequences
of bytes of text data as characters (for example, single- as
opposed to
multi-byte characters in arguments and input files)."

The test itself sets the LANG environment variable which
overrides
the LC_CTYPE variable to LTP_1.UTF-8 which is a multibyte
locale.


Observations on the test assertions:

The test assertions map statements in the Single UNIX
Specification
utilities pretty much as for diff above. A statement will
say that the utility "counts the number of characters" [for wc]
and the utility is affected by the appropriate
internationalization
variable , so for example if in a multibyte locale wc should
return the number of multibyte characters.

I see nothing in the specification to say that multibyte
characters can be supported but that certain
aspects of the utility behavior, such as LC_CTYPE
behavioral requirements ignored if they are.

There is no basis for a TSD, and it should be rejected
on those grounds.

Review Type SA Review
Start Date 2003-10-05 07:38
Last Updated 2003-10-08 17:30
Completed 2003-10-08 17:30
Status Complete
Review Resolution Interpretation (INT)
Review Conclusion The SA agrees that for LSB 1.3 that the diff, fold, join, pr,sort,
unexpand, uniq and wc utilities neednot interpret sequences of multibyte
characters according to the LC_CTYPE category of the locale. An
interpretation is granted.

 

Copyright 2005, The Free Standards Group, All Rights Reserved