Subject: | system.t: Closing *STDOUT fails testing of 'ls' |
Test failure (t/system.t):
On two tested Linux systems, closing the *STDOUT typeglob prior to
executing 'ls' via system() results in a write error from 'ls' ("Bad
File Descriptor").
As 'ls' cannot output to STDOUT, it consequently fails this test:
gsimmons@nougat:~/Perl6-Builtins-0.0.3$ perl -Iblib/lib t/system.t
ls: write error: Bad file descriptor
not ok 1 - successful system command
# Failed test 'successful system command'
# in t/system.t at line 6.
Can't exec "PAY_NO_ATTENTION_TO_THIS": No such file or directory at
blib/lib/Perl6/Builtins.pm line 26.
ok 2 - unsuccessful system command
ls: write error: Bad file descriptor
not ok 3 - successful deferred system command
# Failed test 'successful deferred system command'
# in t/system.t at line 10.
ok 4 - successful value system command
Can't exec "PAY_NO_ATTENTION_TO_THIS": No such file or directory at
blib/lib/Perl6/Builtins.pm line 26.
ok 5 - unsuccessful deferred system command
ok 6 - unsuccessful value system command
1..6
# Looks like you failed 2 tests of 6.
Commenting out close() or redirecting the output of 'ls' (eg. to
/dev/null) results in a successful test. Test results with 'close
*STDOUT' commented shown below:
gsimmons@nougat:~/Perl6-Builtins-0.0.3$ perl -Iblib/lib t/system.t
Build.PL Changes MANIFEST META.yml Makefile Makefile.PL README
blib lib pm_to_blib t
ok 1 - successful system command
Can't exec "PAY_NO_ATTENTION_TO_THIS": No such file or directory at
blib/lib/Perl6/Builtins.pm line 26.
ok 2 - unsuccessful system command
Build.PL Changes MANIFEST META.yml Makefile Makefile.PL README
blib lib pm_to_blib t
ok 3 - successful deferred system command
ok 4 - successful value system command
Can't exec "PAY_NO_ATTENTION_TO_THIS": No such file or directory at
blib/lib/Perl6/Builtins.pm line 26.
ok 5 - unsuccessful deferred system command
ok 6 - unsuccessful value system command
1..6
Tested against Perl6::Builtins v0.0.3 and v0.0.2.
Test environments:
Linux: SUSE Enterprise Server 9
- kernel 2.6.5-7.191-smp
- perl 5.8.3
Linux: Debian 3.1
- kernel 2.4.31
- perl 5.8.4