#457: t/pmc/os.t has invalid stat() and lstat() tests.
----------------------+-----------------------------------------------------
 Reporter:  doughera  |       Owner:     
     Type:  bug       |      Status:  new
 Priority:  normal    |   Milestone:     
Component:  none      |     Version:     
 Severity:  medium    |    Keywords:     
     Lang:            |       Patch:     
 Platform:            |  
----------------------+-----------------------------------------------------
 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/pmc/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.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/457>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to