Ticket #457 (new bug) — at Version 5

Opened 13 years ago

Last modified 11 years ago

t/dynpmc/os.t has invalid stat() and lstat() tests.

Reported by: doughera Owned by:
Priority: normal Milestone:
Component: none Version:
Severity: medium Keywords: testing
Cc: jkeen@… Language:
Patch status: applied Platform:

Description (last modified by jkeenan) (diff)

TT #325 incorrectly put a "TODO" on the stat() and lstat() tests for Solaris in t/pmc/os.t. stat() and lstat() work fine on Solaris. The problem is that the test is wrong. It erroneously assumes that the st_dev value reported by one program (parrot, in this case) is necessarily the same as the st_dev value reported by another program (perl, in this case) that might have been compiled in a different mode. Specifically, on Solaris, the default system perl is compiled in 32-bit mode. If parrot is compiled in 64-bit mode, it will get a different 'st_dev' value. That's not a problem because, according to the Solaris man page for stat(2):

Its value may be used as input to the ustat() function to determine more information about this file system. No other meaning is associated with this value.

The fix is "simple": t/dynpmc/os.t should only compare the last 12 entries returned by stat, not all 13. Alas, I don't know how to do that in PIR.

This problem is not necessarily specific to Solaris, though that's the platform where a mix of models is most likely to be encountered.

If no one has the time to fix the tests, they should probably be skipped. Currently, it can result in spurious passing TODOs if perl and parrot happen to have been compiled in the same mode.

UPDATE: Updated description 2010-09-20 to reflect movement of file from t/pmc/ to t/dynpmc.

Change History

Changed 13 years ago by doughera

Simple patch to skip bad stat() tests.

Changed 13 years ago by jkeenan

Patch applied in r37509 (along with the patch in TT #465).

But, as Andy noted, we're just putting a bandaid on the problem. So the ticket will remain open pending a PIR or other solution.

Changed 13 years ago by jkeenan

  • cc jkeen@… added
  • patch set to applied

Changed 11 years ago by tcurtis

  • keywords testing added

Changed 11 years ago by mikehh

the test was moved from t/pmc/os.t to t/dynpmc/os.t at r46259 - see also TT #1071

Changed 11 years ago by jkeenan

  • description modified (diff)
  • summary changed from t/pmc/os.t has invalid stat() and lstat() tests. to t/dynpmc/os.t has invalid stat() and lstat() tests.
Note: See TracTickets for help on using tickets.