[RTEMS Project] #2317: fsfseeko01 invalid on some architectures

RTEMS trac trac at rtems.org
Sun Apr 5 14:54:48 UTC 2015


#2317: fsfseeko01 invalid on some architectures
---------------------------+-----------------------------
 Reporter:  joel.sherrill  |      Owner:  sebastian.huber
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:  4.11.1
Component:  General        |    Version:  4.11
 Severity:  normal         |   Keywords:
---------------------------+-----------------------------
 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

 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.
 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.

 *** 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)

--
Ticket URL: <http://devel.rtems.org/ticket/2317>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list