3 testdir="testdir.lrzsz"
5 if test $srcdir = . ; then
8 if test $srcdir = .. ; then
12 if test $objdir = . ; then
16 if test "x$3" = x ; then
22 #SZBUFSIZE="-B 524288"
28 echo checking with srcdir = $1 and objdir = $2
30 # z_test_files: files to test zmodem with.
31 # z8_test_files: files to test zmodem-8k with. Optional.
32 # y_test_files: files to test ymodem with.
33 # x_test_files: files to test xmodem with. Must be ascii, as we need the
34 # ascii mode to remove the padding ^Zs.
36 # generate list of testfiles
38 for i in $srcdir/src/l?z.c ; do
39 z_test_files="$z_test_files $i"
40 x_test_files="$x_test_files $i"
42 for i in $objdir/src/l?z ; do
43 z_test_files="$z_test_files $i"
44 y_test_files="$y_test_files $i"
46 for i in /pub/gnu/emacs-1*.tar.gz ; do
47 if test -f "$i" ; then
48 z8_test_files="$z8_test_files $i"
49 z_test_files="$z_test_files $i"
54 if test "x$TMPDIR" = x ; then
62 exec 5>$testdir/error.log
63 (mkfifo $testdir/pipe || mknod $testdir/pipe p) 2>&5
66 if test "$mode" = all -o "$mode" = z ; then
70 ($SZ -q $SZBUFSIZE $z_test_files ) <$testdir/pipe | \
71 (cd $testdir/zmodem ; exec $RZ $RZBUFSIZE $QUIET >>../pipe )
72 for i in $z_test_files ; do
74 cmp $i $testdir/zmodem/$bn
75 if test $? -eq 0 ; then
76 rm -f $testdir/zmodem/$bn
81 rmdir $testdir/zmodem 2>&5
82 if test $failed = 1 ; then
83 echo "ZMODEM test failed"
84 any_failure="$any_failure ZMODEM"
88 if test "$mode" = f ; then
89 echo "testing ZMODEMframlen"
92 ($SZ -q $SZBUFSIZE -l 128 $z_test_files ) <$testdir/pipe | \
93 (cd $testdir/zmodem ; exec $RZ $RZBUFSIZE $QUIET >>../pipe )
94 for i in $z_test_files ; do
96 cmp $i $testdir/zmodem/$bn
97 if test $? -eq 0 ; then
98 rm -f $testdir/zmodem/$bn
103 rmdir $testdir/zmodem 2>&5
104 if test $failed = 1 ; then
105 echo "ZMODEM test failed"
106 any_failure="$any_failure ZMODEM"
111 if test "$mode" = all -o "$mode" = z4 ; then
112 echo "testing ZMODEM4K"
113 mkdir $testdir/zmodem4k
115 ($SZ -q4 $SZBUFSIZE $z_test_files ) <$testdir/pipe | \
116 (cd $testdir/zmodem4k ; exec $RZ $RZBUFSIZE $QUIET >>../pipe )
117 for i in $z_test_files ; do
119 cmp $i $testdir/zmodem4k/$bn
120 if test $? -eq 0 ; then
121 rm -f $testdir/zmodem4k/$bn
126 rmdir $testdir/zmodem4k 2>&5
127 if test $failed = 1 ; then
128 echo "ZMODEM4k test failed"
129 any_failure="$any_failure ZMODEM4k"
134 if test "$mode" = all -o "$mode" = z8 ; then
135 # we test this only if we have something really large, because this is
136 # we only case we can expect any differences
137 if test "x$z8_test_files" = x ; then
140 echo "testing ZMODEM8K"
141 mkdir $testdir/zmodem8k
143 $SZ -q8OT $SZBUFSIZE $z8_test_files <$testdir/pipe | \
144 (cd $testdir/zmodem8k ; $RZ -O $RZBUFSIZE $QUIET >>../pipe )
145 for i in $z8_test_files ; do
147 cmp $i $testdir/zmodem8k/$bn
148 if test $? -eq 0 ; then
149 rm -f $testdir/zmodem8k/$bn
154 if test $failed = 1 ; then
155 echo "ZMODEM8k test failed"
156 any_failure="$any_failure ZMODEM8k"
158 rmdir $testdir/zmodem8k 2>&5
162 if test "$mode" = all -o "$mode" = z8N ; then
163 # we test this only if we have something really large, because this is
164 # we only case we can expect any differences
165 if test "x$z8_test_files" = x ; then
168 echo "testing ZMODEM8K-NULL"
169 mkdir $testdir/zmodem8k-NULL
170 $SZ -q8OT $SZBUFSIZE $z8_test_files <$testdir/pipe | \
171 (cd $testdir/zmodem8k-NULL ; $RZ -DO $RZBUFSIZE $QUIET >>../pipe )
172 rmdir $testdir/zmodem8k-NULL 2>&5
177 # inband tcp: stdin/out connection needed.
178 if test "$mode" = all -o "$mode" = tcp ; then
179 echo "testing ZMODEMtcp"
180 mkdir $testdir/zmodemtcp
182 ($SZ --tcp -q $SZBUFSIZE $z_test_files ) <$testdir/pipe | \
183 (cd $testdir/zmodemtcp ; exec $RZ $RZBUFSIZE $QUIET >>../pipe )
184 for i in $z_test_files ; do
186 cmp $i $testdir/zmodemtcp/$bn
187 if test $? -eq 0 ; then
188 rm -f $testdir/zmodemtcp/$bn
193 rmdir $testdir/zmodemtcp 2>&5
194 if test $failed = 1 ; then
195 echo "ZMODEMtcp test failed"
196 any_failure="$any_failure ZMODEMtcp"
199 if test "$mode" = all -o "$mode" = tcp4 ; then
200 echo "testing ZMODEMtcp4k"
201 mkdir $testdir/zmodemtcp4k
203 ($SZ --tcp -q4 $SZBUFSIZE $z_test_files ) <$testdir/pipe | \
204 (cd $testdir/zmodemtcp4k ; exec $RZ $RZBUFSIZE $QUIET >>../pipe )
205 for i in $z_test_files ; do
207 cmp $i $testdir/zmodemtcp4k/$bn
208 if test $? -eq 0 ; then
209 rm -f $testdir/zmodemtcp4k/$bn
214 rmdir $testdir/zmodemtcp4k 2>&5
215 if test $failed = 1 ; then
216 echo "ZMODEMtcp4k test failed"
217 any_failure="$any_failure ZMODEMtcp4k"
220 if test "$mode" = all -o "$mode" = tcp8 ; then
221 echo "testing ZMODEMtcp8k"
222 mkdir $testdir/zmodemtcp8k
224 ($SZ --tcp -q8OT $SZBUFSIZE $z_test_files ) <$testdir/pipe | \
225 (cd $testdir/zmodemtcp8k ; exec $RZ $RZBUFSIZE $QUIET >>../pipe )
226 for i in $z_test_files ; do
228 cmp $i $testdir/zmodemtcp8k/$bn
229 if test $? -eq 0 ; then
230 rm -f $testdir/zmodemtcp8k/$bn
235 rmdir $testdir/zmodemtcp8k 2>&5
236 if test $failed = 1 ; then
237 echo "ZMODEMtcp8k test failed"
238 any_failure="$any_failure ZMODEMtcp8k"
242 if test "$mode" = tcpo ; then
243 echo "testing ZMODEMtcpo"
244 mkdir $testdir/zmodemtcpo
246 $SZ --tcp-server -q $SZBUFSIZE $z_test_files | \
247 perl -e '$|=1; while(<>) {if (/^connect with .* "(.*)"/) {print $1 . "\n";}}' |
248 ( cd $testdir/zmodemtcpo ; xargs -l1 $RZ $RZBUFSIZE -vv --tcp-client )
249 for i in $z_test_files ; do
251 cmp $i $testdir/zmodemtcpo/$bn
252 if test $? -eq 0 ; then
253 rm -f $testdir/zmodemtcpo/$bn
258 rmdir $testdir/zmodemtcpo 2>&5
259 if test $failed = 1 ; then
260 echo "ZMODEMtcpo test failed"
261 any_failure="$any_failure ZMODEMtcpo"
265 if test "$mode" = error ; then
266 # we test this only if we have something really large, because this is
267 # we only case we can expect any differences
268 if test "x$y_test_files" = x ; then
271 echo "testing error, lsz"
272 mkdir $testdir/error.lsz
274 # strace -vs 128 -o out $SZ -8 -vvvvvvvv $SZBUFSIZE $y_test_files <$testdir/pipe | \
275 $SZ -8q $SZBUFSIZE $y_test_files <$testdir/pipe | \
276 (cd $testdir/error.lsz ; $RZ --errors 32768 $RZBUFSIZE $QUIET >>../pipe 2>/dev/null)
277 for i in $y_test_files ; do
279 cmp $i $testdir/error.lsz/$bn
280 if test $? -eq 0 ; then
281 rm -f $testdir/error.lsz/$bn
286 if test $failed = 1 ; then
287 echo "error test failed"
288 any_failure="$any_failure error.lsz"
290 rmdir $testdir/error.lsz 2>&5
292 # omen zmodem has a really bad error behaviour. it gets so slow
293 # that you wouldn't believe it ...
294 echo "testing error, omen.sz"
295 mkdir $testdir/error.omen
297 omen.sz $y_test_files <$testdir/pipe | \
298 (cd $testdir/error.omen ; $RZ -vvv --errors 32768 $RZBUFSIZE $QUIET >>../pipe 2>/tmp/out2)
299 for i in $y_test_files ; do
301 cmp $i $testdir/error.omen/$bn
302 if test $? -eq 0 ; then
303 rm -f $testdir/error.omen/$bn
308 if test $failed = 1 ; then
309 echo "error.omen test failed"
310 any_failure="$any_failure error.omen"
312 rmdir $testdir/error.omen 2>&5
314 echo "testing error, zm.sz"
315 mkdir $testdir/error.zm
317 zmtx $y_test_files <$testdir/pipe | \
318 (cd $testdir/error.zm ; $RZ -vvv --errors 32768 $RZBUFSIZE $QUIET >>../pipe 2>/tmp/out2)
319 for i in $y_test_files ; do
321 cmp $i $testdir/error.zm/$bn
322 if test $? -eq 0 ; then
323 rm -f $testdir/error.zm/$bn
328 if test $failed = 1 ; then
329 echo "error.zm test failed"
330 any_failure="$any_failure error.zm"
332 rmdir $testdir/error.zm 2>&5
338 if test "$mode" = all -o "$mode" = y ; then
339 echo "testing YMODEM"
340 mkdir $testdir/ymodem
342 $SZ --ymodem -q $y_test_files <$testdir/pipe | \
343 (cd $testdir/ymodem ; $RZ $QUIET --ymodem >>../pipe)
344 for i in $y_test_files ; do
346 cmp $i $testdir/ymodem/$bn
347 if test $? -eq 0 ; then
348 rm -f $testdir/ymodem/$bn
353 rmdir $testdir/ymodem 2>&5
354 if test $failed = 1 ; then
355 echo "YMODEM test failed"
356 any_failure="$any_failure YMODEM"
360 if test "$mode" = all -o "$mode" = x ; then
361 echo "testing XMODEM"
362 mkdir $testdir/xmodem
364 for i in $x_test_files; do
366 $SZ --xmodem -qa $i <$testdir/pipe | \
367 (cd $testdir/xmodem ; $RZ $QUIET -a --xmodem $bn >>../pipe)
368 cmp $i $testdir/xmodem/$bn
369 if test $? -eq 0 ; then
370 rm -f $testdir/xmodem/$bn
375 rmdir $testdir/xmodem 2>&5
376 if test $failed = 1 ; then
377 echo "XMODEM test failed"
378 any_failure="$any_failure XMODEM"
382 if test "$mode" = all -o "$mode" = manage ; then
383 echo "testing file management, appending"
384 mkdir $testdir/manag.append
386 $SZ -q --append $srcdir/src/lsz.c $srcdir/src/lsz.c <$testdir/pipe | \
387 (cd $testdir/manag.append ; $RZ $QUIET >>../pipe)
388 rm -f $testdir/manag.append/compare
389 cp $srcdir/src/lsz.c $testdir/manag.append/compare
390 cat $srcdir/src/lsz.c >>$testdir/manag.append/compare
391 cmp $testdir/manag.append/compare $testdir/manag.append/lsz.c
392 if test $? -eq 0 ; then
393 rm -f $testdir/manag.append/lsz.c
394 rm -f $testdir/manag.append/compare
398 rmdir $testdir/manag.append 2>&5
399 if test $failed = 1 ; then
400 echo "management/append test failed"
401 any_failure="$any_failure manag.append"
404 echo "testing file management, renaming"
405 mkdir $testdir/manag.rename
407 rm -f $testdir/manag.rename/lsz.c
408 cp $srcdir/src/lsz.c $testdir/manag.rename/
409 $SZ -q --rename $srcdir/src/lsz.c $srcdir/src/lsz.c <$testdir/pipe | \
410 (cd $testdir/manag.rename ; $RZ $QUIET >>../pipe)
411 cmp $testdir/manag.rename/lsz.c $srcdir/src/lsz.c
412 if test $? -ne 0 ; then
415 cmp $testdir/manag.rename/lsz.c.0 $srcdir/src/lsz.c
416 if test $? -ne 0 ; then
419 cmp $testdir/manag.rename/lsz.c.1 $srcdir/src/lsz.c
420 if test $? -ne 0 ; then
425 if test $failed -eq 0 ; then
426 rm -f $testdir/manag.rename/lsz.c
427 rm -f $testdir/manag.rename/lsz.c.0
428 rm -f $testdir/manag.rename/lsz.c.1
430 rmdir $testdir/manag.rename 2>&5
431 if test $failed = 1 ; then
432 echo "management/rename test failed"
433 any_failure="$any_failure manag.rename"
439 if test "$mode" = all -o "$mode" = sz-r ; then
440 mkdir $testdir/resume-s
441 echo "testing ZMODEM resume (sz -r)"
442 dd if=$srcdir/src/Makefile.in of=$testdir/resume-s/lsz.c bs=256 count=5 2>&5
443 ($SZ -rq $srcdir/src/lsz.c) <$testdir/pipe | \
444 (cd $testdir/resume-s ; $RZ $QUIET >>../pipe )
445 echo "differences are normal:" >&5
446 if cmp $srcdir/src/lsz.c $testdir/resume-s/lsz.c >&5 ; then
447 echo "receiver did not resume, but file is ok"
448 any_failure="$any_failure ZMODEM-resume/sz"
450 dd if=$srcdir/src/lsz.c of=$testdir/resume-s/lsz.c1 bs=256 count=5 2>&5
451 dd if=$testdir/resume-s/lsz.c bs=256 skip=5 >>$testdir/resume-s/lsz.c1 2>&5
452 if cmp $srcdir/src/lsz.c $testdir/resume-s/lsz.c1 ; then
454 rm -f $testdir/resume-s/lsz.c
455 rm -f $testdir/resume-s/lsz.c1
456 rmdir $testdir/resume-s 2>&5
458 echo "sender resumed, but files differ. This is really bad"
459 any_failure="$any_failure ZMODEM-resume/sz"
464 if test "$mode" = all -o "$mode" = rz-r ; then
465 echo "testing ZMODEM resume (rz -r)"
466 mkdir $testdir/resume-r 2>&5
467 dd if=$srcdir/src/Makefile.in of=$testdir/resume-r/lsz.c bs=256 count=5 2>&5
468 ($SZ -q $srcdir/src/lsz.c) <$testdir/pipe | \
469 (cd $testdir/resume-r ; $RZ -r $QUIET >>../pipe )
470 echo "differences are normal:" >&5
471 if cmp $srcdir/src/lsz.c $testdir/resume-r/lsz.c >&5 ; then
472 echo "receiver did not resume, but file is ok"
473 any_failure="$any_failure ZMODEM-resume/rz"
475 dd if=$srcdir/src/lsz.c of=$testdir/resume-r/lsz.c1 bs=256 count=5 2>&5
476 dd if=$testdir/resume-r/lsz.c bs=256 skip=5 >>$testdir/resume-r/lsz.c1 2>&5
477 if cmp $srcdir/src/lsz.c $testdir/resume-r/lsz.c1 ; then
479 rm -f $testdir/resume-r/lsz.c
480 rm -f $testdir/resume-r/lsz.c1
481 rmdir $testdir/resume-r 2>&5
483 echo "sender resumed, but files differ. This is really bad"
484 any_failure="$any_failure ZMODEM-resume/rz"
489 # test lsz -> original rz
490 if test "$mode" = orig-rz ; then
491 echo "testing ZMODEM"
492 mkdir $testdir/zmodem
494 ($SZ -q $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
495 (cd $testdir/zmodem ; exec omen.rz $QUIET >>../pipe)
496 for i in $z_test_files ; do
498 cmp $i $testdir/zmodem/$bn
499 if test $? -eq 0 ; then
500 rm -f $testdir/zmodem/$bn
505 rmdir $testdir/zmodem 2>&5
506 if test $failed = 1 ; then
507 echo "orig-rz test failed"
508 any_failure="$any_failure orig-rz"
513 # test original sz -> lrz
514 if test "$mode" = orig-sz ; then
515 echo "testing ZMODEM"
516 mkdir $testdir/zmodem
518 (omen.sz $z_test_files ) 2>/dev/null <$testdir/pipe | \
519 (cd $testdir/zmodem ; exec $RZ >>../pipe)
520 for i in $z_test_files ; do
522 cmp $i $testdir/zmodem/$bn
523 if test $? -eq 0 ; then
524 rm -f $testdir/zmodem/$bn
529 rmdir $testdir/zmodem 2>&5
530 if test $failed = 1 ; then
531 echo "orig-sz test failed"
532 any_failure="$any_failure orig-sz"
536 # test original sz -> lrz
537 if test "$mode" = orig-kombi ; then
538 echo "testing ZMODEM"
539 mkdir $testdir/zmodem
541 (omen.sz $y_test_files ;
544 echo
\18\18\18\18\18\18\18\18\18\18\18\18\18
545 exec omen.rz ) 2>/dev/null <$testdir/pipe | \
546 (cd $testdir/zmodem ;
550 $SZ $y_test_files ) >>$testdir/pipe
551 for i in $y_test_files ; do
553 cmp $i $testdir/zmodem/$bn
554 if test $? -eq 0 ; then
555 rm -f $testdir/zmodem/$bn
560 rmdir $testdir/zmodem 2>&5
561 if test $failed = 1 ; then
562 echo "orig-kombi test failed"
563 any_failure="$any_failure orig-kombi"
567 # test lsz -> zm rz (zxrx)
568 if test "$mode" = zm-rz ; then
569 echo "testing ZMODEM"
570 mkdir $testdir/zmodem
572 ($SZ -q $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
573 (cd $testdir/zmodem ; exec zmrx $QUIET >>../pipe)
574 for i in $z_test_files ; do
576 cmp $i $testdir/zmodem/$bn
577 if test $? -eq 0 ; then
578 rm -f $testdir/zmodem/$bn
583 rmdir $testdir/zmodem 2>&5
584 if test $failed = 1 ; then
585 echo "orig-rz test failed"
586 any_failure="$any_failure zm-rz"
590 # test zm sz (zmtx) -> lrz
591 if test "$mode" = zm-sz ; then
592 echo "testing ZMODEM"
593 mkdir $testdir/zmodem
595 (zmtx $z_test_files ) 2>/dev/null <$testdir/pipe | \
596 (cd $testdir/zmodem ; exec $RZ >>../pipe)
597 for i in $z_test_files ; do
599 cmp $i $testdir/zmodem/$bn
600 if test $? -eq 0 ; then
601 rm -f $testdir/zmodem/$bn
606 rmdir $testdir/zmodem 2>&5
607 if test $failed = 1 ; then
608 echo "orig-sz test failed"
609 any_failure="$any_failure zm-sz"
613 # test turbo mode lsz -> zmrx, omen.rz, lrz
614 if test "$mode" = turbo ; then
615 echo "testing turbo -> zmrx"
616 mkdir $testdir/turbo.zmrx
618 ($SZ -qT $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
619 (cd $testdir/turbo.zmrx ; exec zmrx >>../pipe)
620 for i in $z_test_files ; do
622 cmp $i $testdir/turbo.zmrx/$bn
623 if test $? -eq 0 ; then
624 rm -f $testdir/turbo.zmrx/$bn
629 rmdir $testdir/turbo.zmrx 2>&5
630 if test $failed = 1 ; then
631 echo "turbo-zmrx test failed"
632 any_failure="$any_failure turbo-zmrx"
635 echo "testing turbo -> omen.rz"
636 mkdir $testdir/turbo.omen.rz
638 ($SZ -qT $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
639 (cd $testdir/turbo.omen.rz ; exec omen.rz >>../pipe)
640 for i in $z_test_files ; do
642 cmp $i $testdir/turbo.omen.rz/$bn
643 if test $? -eq 0 ; then
644 rm -f $testdir/turbo.omen.rz/$bn
649 rmdir $testdir/turbo.omen.rz 2>&5
650 if test $failed = 1 ; then
651 echo "turbo-omen.rz test failed"
652 any_failure="$any_failure turbo-omen.rz"
655 echo "testing turbo -> lrz"
656 mkdir $testdir/turbo.lrz
658 ($SZ -qT $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
659 (cd $testdir/turbo.lrz ; exec lrz >>../pipe)
660 for i in $z_test_files ; do
662 cmp $i $testdir/turbo.lrz/$bn
663 if test $? -eq 0 ; then
664 rm -f $testdir/turbo.lrz/$bn
669 rmdir $testdir/turbo.omen.rz 2>&5
670 if test $failed = 1 ; then
671 echo "turbo-lrz test failed"
672 any_failure="$any_failure turbo-lrz"
677 # startup timing checks
679 # test lsz -> zm rz (zxrx)
680 if test "$mode" = startup ; then
682 echo "testing lsz -> zm rz. lsz sleeps 10 seconds"
683 mkdir $testdir/startup.1
685 ($SZ --delay-startup 10 -q $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
686 (cd $testdir/startup.1 ; exec zmrx $QUIET >>../pipe)
687 for i in $z_test_files ; do
689 cmp $i $testdir/startup.1/$bn
690 if test $? -eq 0 ; then
691 rm -f $testdir/startup.1/$bn
696 rmdir $testdir/startup.1 2>&5
697 if test $failed = 1 ; then
698 echo "zm-rz startup-timing test failed"
699 any_failure="$any_failure zm-rz-startup-timing"
702 echo "testing lsz -> omen.rz. lsz sleeps 10 seconds"
703 mkdir $testdir/startup.2
705 ($SZ --delay-startup 10 -q $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
706 (cd $testdir/startup.2 ; exec omen.rz $QUIET >>../pipe)
707 for i in $z_test_files ; do
709 cmp $i $testdir/startup.2/$bn
710 if test $? -eq 0 ; then
711 rm -f $testdir/startup.2/$bn
716 rmdir $testdir/startup.2 2>&5
717 if test $failed = 1 ; then
718 echo "omen.rz startup-timing test failed"
719 any_failure="$any_failure omen-rz-startup-timing"
722 echo "testing lsz -> lrz. lsz sleeps 10 seconds"
723 mkdir $testdir/startup.3
725 ($SZ --delay-startup 10 -q $SZBUFSIZE $z_test_files ) 2>/dev/null <$testdir/pipe | \
726 (cd $testdir/startup.3 ; exec $RZ $QUIET >>../pipe)
727 for i in $z_test_files ; do
729 cmp $i $testdir/startup.3/$bn
730 if test $? -eq 0 ; then
731 rm -f $testdir/startup.3/$bn
736 rmdir $testdir/startup.3 2>&5
737 if test $failed = 1 ; then
738 echo "lrz startup-timing test failed"
739 any_failure="$any_failure lrz-startup-timing"
742 echo "testing zmtx -> lrz. lrz sleeps 10 seconds"
743 mkdir $testdir/startup.4
745 (zmtx $z_test_files ) 2>/dev/null <$testdir/pipe | \
746 (cd $testdir/startup.4 ; exec $RZ --delay-startup 10 $QUIET >>../pipe)
747 for i in $z_test_files ; do
749 cmp $i $testdir/startup.4/$bn
750 if test $? -eq 0 ; then
751 rm -f $testdir/startup.4/$bn
756 rmdir $testdir/startup.4 2>&5
757 if test $failed = 1 ; then
758 echo "zmtx startup-timing test failed"
759 any_failure="$any_failure zmtx-startup-timing"
762 echo "testing omen.sz -> lrz. lrz sleeps 10 seconds"
763 mkdir $testdir/startup.5
765 (omen.sz $z_test_files ) 2>/dev/null <$testdir/pipe | \
766 (cd $testdir/startup.5 ; exec $RZ --delay-startup 10 $QUIET >>../pipe)
767 for i in $z_test_files ; do
769 cmp $i $testdir/startup.5/$bn
770 if test $? -eq 0 ; then
771 rm -f $testdir/startup.5/$bn
776 rmdir $testdir/startup.5 2>&5
777 if test $failed = 1 ; then
778 echo "omen.sz startup-timing test failed"
779 any_failure="$any_failure omen.sz-startup-timing"
782 echo "testing lsz -> lrz. lrz sleeps 10 seconds"
783 mkdir $testdir/startup.6
785 ($SZ -q $z_test_files ) 2>/dev/null <$testdir/pipe | \
786 (cd $testdir/startup.6 ; exec $RZ --delay-startup 10 $QUIET >>../pipe)
787 for i in $z_test_files ; do
789 cmp $i $testdir/startup.6/$bn
790 if test $? -eq 0 ; then
791 rm -f $testdir/startup.6/$bn
796 rmdir $testdir/startup.6 2>&5
797 if test $failed = 1 ; then
798 echo "lsz startup-timing test failed"
799 any_failure="$any_failure lsz-startup-timing"
803 if test "$mode" = stop-at ; then
804 echo "testing lsz -> lrz. lsz stops after 10 seconds"
805 mkdir $testdir/stop-at
807 ($SZ --stop-at +10 $z8_test_files ) 2>/dev/null <$testdir/pipe | \
808 (cd $testdir/stop-at ; exec $RZ $QUIET >>../pipe)
809 for i in $z8_test_files ; do
811 cmp $i $testdir/stop-at/$bn
812 if test $? -eq 0 ; then
813 rm -f $testdir/stop-at/$bn
818 rmdir $testdir/stop-at 2>&5
819 if test $failed = 1 ; then
820 echo "stop-at test failed"
821 any_failure="$any_failure stop-at"
825 if test "x$any_failure" = x ; then
828 echo "the following tests failed:"
830 echo "have a look into `pwd`/$testdir"
835 if test "$mode" = all -o "$mode" = abuse ; then
837 echo "going to tests misuse. Errors are ok, hangs are not!"
840 echo "both sides sending:"
841 $SZ -q $z_test_files <$testdir/pipe | \
842 ($SZ $z_test_files >>$testdir/pipe )
845 echo "both sides receiving:"
846 $RZ -q <$testdir/pipe | \
847 ( $RZ >>$testdir/pipe )