fsfseeko01 problem in test - invalid on some targets

Joel Sherrill joel.sherrill at oarcorp.com
Sun Apr 5 14:55:12 UTC 2015


Hi

There is a target dependent issue with fsfseeko01. The value
it seeks to does not necessarily overflow. On some targets,
it remains a valid value. I haven't checked every target but
I recall seeing this test fail during my earlier test runs.
So far I can confirm this test is not valid on the lm32
and or1k.

Works: sparc, psim, jmr3904
Fails: lm32, or1k, simsh

The test attempts to pass in an invalid seek value based on
the size of some types and this logic must not be right on
all targets.

I am not sure how the logic fails but give instructions, we
can probe the gcc's and see what is reported and slipping
through.

*** BEGIN OF TEST FSFSEEKO 1 ***

Breakpoint 3, test ()
     at 
../../../../../../../rtems/c/src/../../testsuites/fstests/fsfseeko01/init.c:61
61      rv = fseeko(file, off, SEEK_SET);
(gdb) n
62      rtems_test_assert(rv == 0);
(gdb)
63      rtems_test_assert(errno == 0);
(gdb)
65      errno = 0;
(gdb)
66      actual_long_off = ftell(file);
(gdb) p off
$1 = 2147483647
(gdb) n
67      rtems_test_assert(actual_long_off == -1L);
(gdb) p actual_long_off
$2 = 2147483647
(gdb)


--joel


More information about the devel mailing list