|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0193 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 0193.
Report 0193 Actions
Problem Report Number 0193 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0193 Raised 1994-10-17 08:00 Updated 2003-03-13 08:00 Published 1994-10-27 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.4 Test Identification XOPEN.os/string/memccpy 13 Problem Summary TSD4.193 A dependency on the ASCII character set is causing testcases to fail. The testcases assume the test of lowercase characters are all contiguous, that is, 'b' = 'a' + 1, ... 'n' = 'm' + 1, ... ... Problem Text
A dependency on the ASCII character set is causing testcases to fail.
The testcases assume the test of lowercase characters are all
contiguous, that is, 'b' = 'a' + 1, ... 'n' = 'm' + 1, ...
'z' = 'y' + 1. This is true for the ASCII character set but not for
implementations such as ours that are EBCDIC-based. This causes the
following failures:
XOPEN.os/string/memccpy/T.memccpy 1 Failed
XPG4.os/streamio/fsetpos/T.fsetpos 1 Unresolved
ANSI.os/string/Mmemcmp_X/T.memcmp_X 1 Failed
ANSI.os/string/Mmemcmp_X/T.memcmp_X 3 Failed
ANSI.os/string/memcmp_X/T.memcmp_X 1 Failed
ANSI.os/string/memcmp_X/T.memcmp_X 3 Failed
ANSI.os/streamio/fseek/T.fseek 2 Failed
ANSI.os/streamio/fseek/T.fseek 3 Failed
In XOPEN.os/string/memccpy, the "copy from" string is created with ten
characters: 'a'+0, 'a'+1, ... 'a'+10. This depends on the alphabet
being contiguous as is true in the ASCII character set but our
implementation is EBCDIC and the first letters are only contiguous
through 'i'. 'a'+10 is not 'j' but since memccpy() is being asked to
stop at the first 'j' or null character, memccpy() correctly copied the
entire string on our implementation. The test should be redesigned so
it does not rely on the letters 'a' through 'j' being contiguous.
In XPG4.os/streamio/fsetpos, the testcase does a getc() to see if the
character at the current location in the stream is 'a' + 12. This is
'm' in ASCII but an unprintable character (0x8d) in EBCDIC. Thus, the
testcase does not think it is correctly positioned. One way this could
be corrected would be to compare the byte returned by getc() with
t_string[11].
In test #1 of ANSI.os/string/Mmemcmp_X and ANSI.os/string/memcmp_X, the
first 17 bytes of the character string "s1" is made up of the characters
'a' through 'a'+16 with the sixth byte being replaced with the null
character and the thirteenth byte being replaced by 'l'. "s2" is the
same as "s1" except the thirteenth byte is not disturbed. On an ASCII
platform, the original thirtheenth byte of "s1" was 'm' so replacing it
with 'l' would make the memcmp() function call say that "s1" is less
than "s2". On an EBCDIC platform, the thirteenth byte in "s1" is an
unprintable character whose hex value is actually smaller than 'l' so
replacing the byte with 'l' makes "s1" 'greater than' "s2".
Test #3 of ANSI.os/string/Mmemcmp_X and ANSI.os/string/memcmp_X are
almost identical to their respective test #1 and a similiar argument
holds true for these tests.
In test #2 of ANSI.os/streamio/fseek, fseek() is used to move to
position 10 (byte 11) of the file. The 11th character of the alphabet
is 'k' which is what 'a'+10 is in ASCII but 'a'+10 in EBCDIC is an
unprintable character. Similarly, test #3 fseek() is used to move to
position 12 of the file (byte 13). In ASCII, this would be 'n' but it's
another unprintable character in EBCDIC.Test Output
/tset/XOPEN.os/string/memccpy/T.memccpy 1 Failed
Test Description:
All bytes up to and including the first occurrence of the byte
specified by c are copied from the object pointed to by s2 to the
object pointed to by s1 and a pointer to the byte after the copy of c
in s1 is returned, if the first occurrence of the byte c is found
before n bytes have been copied.
Test Strategy:
INITIALISE test arrays
CALL memccpy()
VERIFY that the return value of memccpy() is as expected
VERIFY that the contents of the arrays are as expected
Test Information:
memccpy did not return expected value
pointer & value of first argument : 111784.| |
pointer & value of second argument : 60021792.|abcdefghi|
value of third argument : j
value of fourth argument : 15
expected return value : 111794
actual return value : 0
memccpy did did not copy data correctly
expected result from memccpy() : |abcdefghij |
actual result from memccpy() : |abcdefghi|
************************************************************************
/tset/XPG4.os/streamio/fsetpos/T.fsetpos 1 Unresolved
Test Description:
A call to fsetpos(stream,pos) sets the file position indicator for
stream according to the value of the object pointed to by pos, which
is a value obtained from an earlier call to fgetpos on the same
stream, and returns a value of zero.
Test Information:
file pointer position in file is incorrect
************************************************************************
/tset/ANSI.os/string/Mmemcmp_X/T.memcmp_X 1 Failed
Test Description:
memcmp() returns an integer less than zero if s1 is less than s2 in
the first n bytes.
Test Strategy:
VERIFY negative return when first memory area has byte value > second
memory area.
Test Information:
memcmp did not return expected value
value of first argument : abcde\000ghi\212\213\214l\216\217
value of second argument : abcde\000ghi\212\213\214\215\216\217
value of third argument : 15
expected return value : < 0
actual return value : 1
************************************************************************
/tset/ANSI.os/string/Mmemcmp_X/T.memcmp_X 3 Failed
Test Description:
memcmp() returns an integer greater than zero if s1 is greater than s2
in the first n bytes.
Test Strategy:
VERIFY positive return when first memory area has byte value < second
memory area.
Test Information:
memcmp did not return expected value
value of first argument : abcde\000ghi\212\213\214\215\216\217
value of second argument : abcde\000ghi\212\213\214l\216\217
value of third argument : 15
expected return value : > 0
actual return value : -1
************************************************************************
/tset/ANSI.os/streamio/fseek/T.fseek 2 Failed
Test Description:
ptrname = "SEEK_SET" causes the file pointer of the stream specified
by stream to be moved to offset bytes from the start of the file.
Test Strategy:
CREATE data file, WRITE test data, and CLOSE file
OPEN stream using fopen()
OBTAIN the first 3 characters in the stream using getc() 3 times
SEEK to the required position within the file using fseek()
VERIFY that the correct character can be read at this position within
the stream using fseek()
CLOSE stream using fclose()
Test Information:
fseek(stream, offset, SEEK_SET) did not set position correctly
************************************************************************
/tset/ANSI.os/streamio/fseek/T.fseek 3 Failed
Test Description:
ptrname = "SEEK_CUR" causes the file pointer of the stream specified
by stream to be moved to offset bytes from its current location in the
file.
Test Strategy:
CREATE data file, WRITE test data, and CLOSE file
OPEN stream using fopen()
OBTAIN the first 3 characters in the stream using getc() 3 times
SEEK to the required position within the stream using fseek()
VERIFY that the correct character can be read at this position within
the file
CLOSE stream using fclose()
Test Information:
fseek(stream, offset, SEEK_CUR) did not set position correctlyReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
It is accepted that this is a test suite deficiency and it is recommended that
a waiver be granted.
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 0193
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority