Charles Lane wrote:
!Here's the pipe torture test, revised to actually check the output
!from subprocesses and generate the various "ok ..." message.
!
!Seems to work fine on Linux also, so I'm leaving off any "if ($^O eq
'VMS')"
!conditionals.
It works also with the perl@16147 kit on this platform:
../perl -Ilib -V:osname -V:osvers -V:ccversion
osname='solaris';
osvers='2.8';
ccversion='Sun WorkShop 6 update 1 C 5.2 2000/09/11';
!To any non-VMSer's, think this would be useful in the general test suite?
It would be nice to add. Might I suggest an 8.3 compatible name that
fits closer to the existing test suite? How about this name:
diff -ruN perl_16147_orig/MANIFEST perl_16147/MANIFEST
--- perl_16147_orig/MANIFEST Wed Apr 24 17:11:51 2002
+++ perl_16147/MANIFEST Fri Apr 26 08:21:52 2002
@@ -2304,6 +2304,7 @@
t/io/open.t See if open works
t/io/openpid.t See if open works for subprocesses
t/io/pipe.t See if secure pipes work
+t/io/pipetort.t See if pipe torture tests work
t/io/print.t See if print commands work
t/io/read.t See if read works
t/io/tell.t See if file seeking works
?
I note that:
--- vms_pipe_torture.t-orig Tue Apr 23 22:23:22 2002
+++ vms_pipe_torture.t Thu Apr 25 09:17:38 2002
@@ -0,0 +1,803 @@
+#! perl
+# test lots of tough i/o piping cases
+#
+# There are three main processes involved, running this same script
file:
+#
+# perl vms_pipe_torture.t (no arguments) -> grandma, conducts test
+# perl vms_pipe_torture.t parent test# -> runs tests, subproc of
grandma
+# perl vms_pipe_torture.t child ..params.. -> source/sinks data, subproc
of parent
^^^^^^^^^^^^^^^^^^
change these to perl t/io/pipetort.t (if my proposed name change is
acceptable to you the test author).
Also: you make heavy use of the C<open(HANDLE, "$command |");>
idiom (basically the point of the test) along with the
waitpid call. perlport.pod has this to say about open and
waitpid:
=item open FILEHANDLE
The C<|> variants are supported only if ToolServer is installed.
(S<Mac OS>)
open to C<|-> and C<-|> are unsupported. (S<Mac OS>, Win32, S<RISC OS>)
Opening a process does not automatically flush output handles on some
platforms. (SunOS, Solaris, HP-UX)
<snip>
=item waitpid PID,FLAGS
Not implemented. (S<Mac OS>, VOS)
Can only be applied to process handles returned for processes spawned
using C<system(1, ...)> or pseudo processes created with C<fork()>.
(Win32)
Not useful. (S<RISC OS>)
Hence it might prove necessary to add:
# These do not implement Perl's waitpid():
if ($^O eq 'MacOS' || $^O eq 'vos' || $^O eq 'riscos') {
print "1..0\n";
exit;
}
to the top as well.
It would also be real nice to test it out on DOS djgpp, as well as
the various Windows compilers including cygwin, MS, and Borland.
Peter Prymmer