diff --git a/xargs/testsuite/config/unix.exp b/xargs/testsuite/config/unix.exp index 8f1a73c2..2d4e60b0 100644 --- a/xargs/testsuite/config/unix.exp +++ b/xargs/testsuite/config/unix.exp @@ -1,6 +1,6 @@ # -*- TCL -*- # Test-specific TCL procedures required by DejaGNU. -# Copyright (C) 1994 Free Software Foundation, Inc. +# Copyright (C) 1994, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. -# Modified by David MacKenzie from the gcc files +# Modified by David MacKenzie from the gcc files # written by Rob Savoye . @@ -54,7 +54,7 @@ proc xargs_version {} { # Run xargs and leave the output in $comp_output. # Called by individual test scripts. -proc xargs_start { passfail options {infile ""}} { +proc xargs_start { passfail options {infile ""} {errh ""} } { global verbose global XARGS global XARGSFLAGS @@ -65,20 +65,34 @@ proc xargs_start { passfail options {infile ""}} { exit 1 } - set fail_good [string match "f*" $passfail] - set scriptname [uplevel {info script}] set testbase [file rootname $scriptname] set testname [file tail $testbase] + if {[string match "\[0-9\]*" $passfail]} then { + set execrc "$passfail" + } elseif {[string match "p*" $passfail]} then { + set execrc "0" + } elseif {[string match "f*" $passfail]} then { + set execrc "1" + } else { + fail "$testname, failure in testing framework: passfail=$passfail" + return + } + set outfile "$testbase.xo" - set errfile "$testbase.xe" if {$infile != ""} then { set infile "[file dirname [file dirname $testbase]]/inputs/$infile" } else { set infile /dev/null } + if {[string match "s*" $errh]} then { + set errfile "" + } else { + set errfile "$testbase.xe" + } + catch "exec rm -f xargs.out xargs.err" set cmd "$XARGS $XARGSFLAGS $options < $infile > xargs.out 2> xargs.err" @@ -87,25 +101,30 @@ proc xargs_start { passfail options {infile ""}} { send_user "Spawning \"$cmd\"\n" } - catch "exec $cmd" comp_output - if {$comp_output != ""} then { - # The command failed; if that was the desired effect, the - # test might still pass - send_log "$comp_output\n" - if $verbose>1 then { - send_user "$comp_output\n" - } - if $fail_good then { - # expected failure - pass "$testname" + set status 0 + if {[catch "exec $cmd" comp_output]} then { + if {[lindex $::errorCode 0] == "CHILDSTATUS"} then { + set status [lindex $::errorCode 2] } else { - # unexpected failure - fail "$testname, $comp_output" + fail "$testname, failure in testing framework, $comp_output" + return + } + } + + catch "exec cat xargs.err" comp_error + + if {$execrc != $status} then { + if {$status == 0} then { + fail "$testname, unexpected success" + } elseif {$execrc == 0} then { + fail "$testname, unexpected failure, $comp_output, $comp_error" + } else { + fail "$testname, expected exit code $execrc, but got exit code $status" } return } + # ok, at least exit code match. - # The command succeeded, but that might not have been the expected result. if [file exists $outfile] then { set cmp_cmd "cmp xargs.out $outfile" send_log "$cmp_cmd\n" @@ -113,35 +132,34 @@ proc xargs_start { passfail options {infile ""}} { if {$cmpout != ""} then { # stdout is wrong. catch "exec diff -u xargs.out $outfile" diffs - send_log "diffs: $diffs\n" + send_log "stdout diffs: $diffs\n" fail "$testname, wrong stdout output: $cmpout" return } - } else { - if {[file size xargs.out] != 0} then { - fail "$testname, output on stdout should be empty" - return - } + } elseif {[file size xargs.out] != 0} then { + fail "$testname, output on stdout should be empty" + return } - # If testname.xe exists, check the stderr result. - if [file exists $errfile] then { - set cmp_cmd "cmp xargs.err $errfile" - send_log "$cmp_cmd\n" - catch "exec $cmp_cmd" cmperr - if {$cmperr != ""} then { - # stderr is wrong. - catch "exec diff -u xargs.err $errfile" diffs - send_log "$diffs\n" - fail "$testname, wrong stderr output: $cmperr" - return - } - } else { - if {[file size xargs.err] != 0} then { + # if stderr check is enabled, + if {$errfile != ""} then { + if {[file exists $errfile]} then { + set cmp_cmd "cmp xargs.err $errfile" + send_log "$cmp_cmd\n" + catch "exec $cmp_cmd" cmperr + if {$cmperr != ""} then { + # stderr is wrong + catch "exec diff -ua xargs.err $errfile" diffs + send_log "stderr diffs: $diffs\n" + fail "$testname, wrong stderr output: $cmperr" + return + } + } elseif {[file size xargs.err] != 0} then { fail "$testname, output on stderr should be empty" return } } + pass "$testname" } @@ -150,5 +168,3 @@ proc xargs_start { passfail options {infile ""}} { proc xargs_exit {} { catch "exec rm -f xargs.out xargs.err" } - - diff --git a/xargs/testsuite/inputs/EOF.xi b/xargs/testsuite/inputs/EOF.xi new file mode 100644 index 00000000..2a1c7a41 --- /dev/null +++ b/xargs/testsuite/inputs/EOF.xi @@ -0,0 +1,5 @@ +one +two + EOF +three +four diff --git a/xargs/testsuite/inputs/EOFb.xi b/xargs/testsuite/inputs/EOFb.xi new file mode 100644 index 00000000..f302113c --- /dev/null +++ b/xargs/testsuite/inputs/EOFb.xi @@ -0,0 +1,5 @@ +one +two + bEOF +three +four diff --git a/xargs/testsuite/inputs/EOFe.xi b/xargs/testsuite/inputs/EOFe.xi new file mode 100644 index 00000000..f391070c --- /dev/null +++ b/xargs/testsuite/inputs/EOFe.xi @@ -0,0 +1,5 @@ +one +two + EOFe +three +four diff --git a/xargs/testsuite/inputs/Pdata.xi b/xargs/testsuite/inputs/Pdata.xi new file mode 100644 index 00000000..250f10d3 --- /dev/null +++ b/xargs/testsuite/inputs/Pdata.xi @@ -0,0 +1,3 @@ +sleep 2 && echo one +sleep 1 && echo two +echo three diff --git a/xargs/testsuite/inputs/eof_-0.xi b/xargs/testsuite/inputs/eof_-0.xi new file mode 100644 index 00000000..6e6fa1a1 Binary files /dev/null and b/xargs/testsuite/inputs/eof_-0.xi differ diff --git a/xargs/testsuite/inputs/eof_.xi b/xargs/testsuite/inputs/eof_.xi new file mode 100644 index 00000000..e6270a7d --- /dev/null +++ b/xargs/testsuite/inputs/eof_.xi @@ -0,0 +1,5 @@ +one +two +_ +three +four \ No newline at end of file diff --git a/xargs/testsuite/inputs/ett.xi b/xargs/testsuite/inputs/ett.xi new file mode 100644 index 00000000..ec546245 --- /dev/null +++ b/xargs/testsuite/inputs/ett.xi @@ -0,0 +1,3 @@ +exit 255 +echo 1 +echo 2 diff --git a/xargs/testsuite/inputs/ftt.xi b/xargs/testsuite/inputs/ftt.xi new file mode 100644 index 00000000..633a5d09 --- /dev/null +++ b/xargs/testsuite/inputs/ftt.xi @@ -0,0 +1,3 @@ +false +echo 1 +echo 2 diff --git a/xargs/testsuite/inputs/items-0.xi b/xargs/testsuite/inputs/items-0.xi new file mode 100644 index 00000000..b217e3ac Binary files /dev/null and b/xargs/testsuite/inputs/items-0.xi differ diff --git a/xargs/testsuite/inputs/items.xi b/xargs/testsuite/inputs/items.xi new file mode 100644 index 00000000..163874eb --- /dev/null +++ b/xargs/testsuite/inputs/items.xi @@ -0,0 +1,8 @@ + +dumb + s s + f f + r r + t t + v v + \ No newline at end of file diff --git a/xargs/testsuite/inputs/ldata-0.xi b/xargs/testsuite/inputs/ldata-0.xi new file mode 100644 index 00000000..eaee504b Binary files /dev/null and b/xargs/testsuite/inputs/ldata-0.xi differ diff --git a/xargs/testsuite/inputs/ldata.xi b/xargs/testsuite/inputs/ldata.xi new file mode 100644 index 00000000..b654880b --- /dev/null +++ b/xargs/testsuite/inputs/ldata.xi @@ -0,0 +1,9 @@ +1 22 333 4444 +55555 666666 +7777777 +88888888 +999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/inputs/ldatab-0.xi b/xargs/testsuite/inputs/ldatab-0.xi new file mode 100644 index 00000000..dfd0de36 Binary files /dev/null and b/xargs/testsuite/inputs/ldatab-0.xi differ diff --git a/xargs/testsuite/inputs/ldatab.xi b/xargs/testsuite/inputs/ldatab.xi new file mode 100644 index 00000000..6b156d2a --- /dev/null +++ b/xargs/testsuite/inputs/ldatab.xi @@ -0,0 +1,10 @@ + +1 22 333 4444 +55555 666666 +7777777 +88888888 +999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/inputs/noeof-0.xi b/xargs/testsuite/inputs/noeof-0.xi new file mode 100644 index 00000000..cb2f8ffa Binary files /dev/null and b/xargs/testsuite/inputs/noeof-0.xi differ diff --git a/xargs/testsuite/inputs/noeof.xi b/xargs/testsuite/inputs/noeof.xi new file mode 100644 index 00000000..0bfc124e --- /dev/null +++ b/xargs/testsuite/inputs/noeof.xi @@ -0,0 +1,2 @@ +first +second \ No newline at end of file diff --git a/xargs/testsuite/inputs/space.xi b/xargs/testsuite/inputs/space.xi new file mode 100644 index 00000000..2be76b2a --- /dev/null +++ b/xargs/testsuite/inputs/space.xi @@ -0,0 +1,2 @@ + + diff --git a/xargs/testsuite/inputs/stairs-0.xi b/xargs/testsuite/inputs/stairs-0.xi new file mode 100644 index 00000000..10d1ebd2 Binary files /dev/null and b/xargs/testsuite/inputs/stairs-0.xi differ diff --git a/xargs/testsuite/inputs/stairs.xi b/xargs/testsuite/inputs/stairs.xi new file mode 100644 index 00000000..c2a8ccee --- /dev/null +++ b/xargs/testsuite/inputs/stairs.xi @@ -0,0 +1,18 @@ +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/inputs/stairs2-0.xi b/xargs/testsuite/inputs/stairs2-0.xi new file mode 100644 index 00000000..6445a5f2 Binary files /dev/null and b/xargs/testsuite/inputs/stairs2-0.xi differ diff --git a/xargs/testsuite/inputs/stairs2.xi b/xargs/testsuite/inputs/stairs2.xi new file mode 100644 index 00000000..9f8a5fed --- /dev/null +++ b/xargs/testsuite/inputs/stairs2.xi @@ -0,0 +1,18 @@ +999999999 +88888888 +7777777 +666666 +55555 +4444 +333 +22 +1 +999999999 +88888888 +7777777 +666666 +55555 +4444 +333 +22 +1 diff --git a/xargs/testsuite/inputs/stt.xi b/xargs/testsuite/inputs/stt.xi new file mode 100644 index 00000000..22fb0d26 --- /dev/null +++ b/xargs/testsuite/inputs/stt.xi @@ -0,0 +1,3 @@ +kill $$ +echo 1 +echo 2 diff --git a/xargs/testsuite/inputs/unmatched.xi b/xargs/testsuite/inputs/unmatched.xi new file mode 100644 index 00000000..bc9347a3 --- /dev/null +++ b/xargs/testsuite/inputs/unmatched.xi @@ -0,0 +1,3 @@ +one +"two +three \ No newline at end of file diff --git a/xargs/testsuite/inputs/unmatched2.xi b/xargs/testsuite/inputs/unmatched2.xi new file mode 100644 index 00000000..616a18e6 --- /dev/null +++ b/xargs/testsuite/inputs/unmatched2.xi @@ -0,0 +1,2 @@ +one +"two \ No newline at end of file diff --git a/xargs/testsuite/xargs.gnu/E_-0.exp b/xargs/testsuite/xargs.gnu/E_-0.exp new file mode 100644 index 00000000..3c8d7da9 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/E_-0.exp @@ -0,0 +1 @@ +xargs_start p {-E_ -0} eof_-0.xi diff --git a/xargs/testsuite/xargs.gnu/E_-0.xo b/xargs/testsuite/xargs.gnu/E_-0.xo new file mode 100644 index 00000000..28a9314a --- /dev/null +++ b/xargs/testsuite/xargs.gnu/E_-0.xo @@ -0,0 +1 @@ +one two _ three four diff --git a/xargs/testsuite/xargs.gnu/L2-0.exp b/xargs/testsuite/xargs.gnu/L2-0.exp new file mode 100644 index 00000000..c7668ac8 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/L2-0.exp @@ -0,0 +1 @@ +xargs_start p {-L2 -0} ldata-0.xi diff --git a/xargs/testsuite/xargs.gnu/L2-0.xo b/xargs/testsuite/xargs.gnu/L2-0.xo new file mode 100644 index 00000000..72347025 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/L2-0.xo @@ -0,0 +1,5 @@ +1 22 333 4444 55555 666666 +7777777 88888888 +999999999 1 22 333 4444 55555 +666666 7777777 88888888 +999999999 diff --git a/xargs/testsuite/xargs.gnu/L2_2-0.exp b/xargs/testsuite/xargs.gnu/L2_2-0.exp new file mode 100644 index 00000000..360c0111 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/L2_2-0.exp @@ -0,0 +1 @@ +xargs_start p {-L2 -0} ldatab-0.xi diff --git a/xargs/testsuite/xargs.gnu/L2_2-0.xo b/xargs/testsuite/xargs.gnu/L2_2-0.xo new file mode 100644 index 00000000..24d97fe5 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/L2_2-0.xo @@ -0,0 +1,5 @@ + 1 22 333 4444 +55555 666666 7777777 +88888888 999999999 1 22 +333 4444 55555 666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.gnu/L3-0.exp b/xargs/testsuite/xargs.gnu/L3-0.exp new file mode 100644 index 00000000..8d857a48 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/L3-0.exp @@ -0,0 +1 @@ +xargs_start p {-L3 -0} ldata-0.xi diff --git a/xargs/testsuite/xargs.gnu/L3-0.xo b/xargs/testsuite/xargs.gnu/L3-0.xo new file mode 100644 index 00000000..2cb7fb38 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/L3-0.xo @@ -0,0 +1,3 @@ +1 22 333 4444 55555 666666 7777777 +88888888 999999999 1 22 333 4444 55555 +666666 7777777 88888888 999999999 diff --git a/xargs/testsuite/xargs.gnu/P3-n1-IARG.exp b/xargs/testsuite/xargs.gnu/P3-n1-IARG.exp new file mode 100644 index 00000000..75795892 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/P3-n1-IARG.exp @@ -0,0 +1 @@ +xargs_start p {-P3 -n1 -IARG sh -c ARG} Pdata.xi diff --git a/xargs/testsuite/xargs.gnu/P3-n1-IARG.xo b/xargs/testsuite/xargs.gnu/P3-n1-IARG.xo new file mode 100644 index 00000000..f8eea9f4 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/P3-n1-IARG.xo @@ -0,0 +1,3 @@ +three +two +one diff --git a/xargs/testsuite/xargs.gnu/empty-r.exp b/xargs/testsuite/xargs.gnu/empty-r.exp new file mode 100644 index 00000000..6290f72f --- /dev/null +++ b/xargs/testsuite/xargs.gnu/empty-r.exp @@ -0,0 +1 @@ +xargs_start p {-r echo this plus that} diff --git a/xargs/testsuite/xargs.gnu/empty_def-r.exp b/xargs/testsuite/xargs.gnu/empty_def-r.exp new file mode 100644 index 00000000..858e327b --- /dev/null +++ b/xargs/testsuite/xargs.gnu/empty_def-r.exp @@ -0,0 +1 @@ +xargs_start p {-r} diff --git a/xargs/testsuite/xargs.gnu/idef-0.exp b/xargs/testsuite/xargs.gnu/idef-0.exp new file mode 100644 index 00000000..8bd43ff8 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/idef-0.exp @@ -0,0 +1 @@ +xargs_start p {-i -0 echo from \{\} to x{}y} items-0.xi diff --git a/xargs/testsuite/xargs.gnu/idef-0.xo b/xargs/testsuite/xargs.gnu/idef-0.xo new file mode 100644 index 00000000..d09d7ad5 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/idef-0.xo @@ -0,0 +1,20 @@ +from one to xoney +from + to x +y +from dumb to xdumby +from s s to x s s y +from f f to x f f y +from r r to x r r y +from t t to x t t y +from v v to x v v y +from to x y +from +n + +n + to x +n + +n +y diff --git a/xargs/testsuite/xargs.gnu/idef-s26-0.exp b/xargs/testsuite/xargs.gnu/idef-s26-0.exp new file mode 100644 index 00000000..8513059d --- /dev/null +++ b/xargs/testsuite/xargs.gnu/idef-s26-0.exp @@ -0,0 +1 @@ +xargs_start f {-i -s26 -0 echo from \{\} to x{}y} items-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/idef-s26-0.xo b/xargs/testsuite/xargs.gnu/idef-s26-0.xo new file mode 100644 index 00000000..46598962 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/idef-s26-0.xo @@ -0,0 +1 @@ +from one to xoney diff --git a/xargs/testsuite/xargs.gnu/l1-0.exp b/xargs/testsuite/xargs.gnu/l1-0.exp new file mode 100644 index 00000000..87cf28ca --- /dev/null +++ b/xargs/testsuite/xargs.gnu/l1-0.exp @@ -0,0 +1 @@ +xargs_start p {-l -0} ldata-0.xi diff --git a/xargs/testsuite/xargs.gnu/l1-0.xo b/xargs/testsuite/xargs.gnu/l1-0.xo new file mode 100644 index 00000000..b654880b --- /dev/null +++ b/xargs/testsuite/xargs.gnu/l1-0.xo @@ -0,0 +1,9 @@ +1 22 333 4444 +55555 666666 +7777777 +88888888 +999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.gnu/l1_2-0.exp b/xargs/testsuite/xargs.gnu/l1_2-0.exp new file mode 100644 index 00000000..506672df --- /dev/null +++ b/xargs/testsuite/xargs.gnu/l1_2-0.exp @@ -0,0 +1 @@ +xargs_start p {-l -0} ldatab-0.xi diff --git a/xargs/testsuite/xargs.gnu/l1_2-0.xo b/xargs/testsuite/xargs.gnu/l1_2-0.xo new file mode 100644 index 00000000..6b156d2a --- /dev/null +++ b/xargs/testsuite/xargs.gnu/l1_2-0.xo @@ -0,0 +1,10 @@ + +1 22 333 4444 +55555 666666 +7777777 +88888888 +999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.gnu/n1-0.exp b/xargs/testsuite/xargs.gnu/n1-0.exp new file mode 100644 index 00000000..0c0564c8 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n1-0.exp @@ -0,0 +1 @@ +xargs_start p {-n1 -0} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/n1-0.xo b/xargs/testsuite/xargs.gnu/n1-0.xo new file mode 100644 index 00000000..c2a8ccee --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n1-0.xo @@ -0,0 +1,18 @@ +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.gnu/n2-0.exp b/xargs/testsuite/xargs.gnu/n2-0.exp new file mode 100644 index 00000000..8f8bf13f --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-0.exp @@ -0,0 +1 @@ +xargs_start p {-n2 -0} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/n2-0.xo b/xargs/testsuite/xargs.gnu/n2-0.xo new file mode 100644 index 00000000..33d81777 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-0.xo @@ -0,0 +1,9 @@ +1 22 +333 4444 +55555 666666 +7777777 88888888 +999999999 1 +22 333 +4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.gnu/n2-s26-0.exp b/xargs/testsuite/xargs.gnu/n2-s26-0.exp new file mode 100644 index 00000000..44949053 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-s26-0.exp @@ -0,0 +1 @@ +xargs_start p {-n2 -s26 -0} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/n2-s26-0.xo b/xargs/testsuite/xargs.gnu/n2-s26-0.xo new file mode 100644 index 00000000..a9e8dfaa --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-s26-0.xo @@ -0,0 +1,11 @@ +1 22 +333 4444 +55555 666666 +7777777 +88888888 +999999999 1 +22 333 +4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp b/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp new file mode 100644 index 00000000..f765bcde --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp @@ -0,0 +1 @@ +xargs_start f {-n2 -s26 -x -0} stairs-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/n2-s26-x-0.xo b/xargs/testsuite/xargs.gnu/n2-s26-x-0.xo new file mode 100644 index 00000000..7b6db828 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-s26-x-0.xo @@ -0,0 +1,3 @@ +1 22 +333 4444 +55555 666666 diff --git a/xargs/testsuite/xargs.gnu/n3-0.exp b/xargs/testsuite/xargs.gnu/n3-0.exp new file mode 100644 index 00000000..8fb187df --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n3-0.exp @@ -0,0 +1 @@ +xargs_start p {-n3 -0} stairs2-0.xi diff --git a/xargs/testsuite/xargs.gnu/n3-0.xo b/xargs/testsuite/xargs.gnu/n3-0.xo new file mode 100644 index 00000000..dfef033d --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n3-0.xo @@ -0,0 +1,6 @@ +999999999 88888888 7777777 +666666 55555 4444 +333 22 1 +999999999 88888888 7777777 +666666 55555 4444 +333 22 1 diff --git a/xargs/testsuite/xargs.gnu/n3-s36-0.exp b/xargs/testsuite/xargs.gnu/n3-s36-0.exp new file mode 100644 index 00000000..1d83e261 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n3-s36-0.exp @@ -0,0 +1 @@ +xargs_start p {-n3 -s36 -0} stairs2-0.xi diff --git a/xargs/testsuite/xargs.gnu/n3-s36-0.xo b/xargs/testsuite/xargs.gnu/n3-s36-0.xo new file mode 100644 index 00000000..74844869 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n3-s36-0.xo @@ -0,0 +1,7 @@ +999999999 88888888 +7777777 666666 55555 +4444 333 22 +1 999999999 88888888 +7777777 666666 55555 +4444 333 22 +1 diff --git a/xargs/testsuite/xargs.gnu/noeof-0.exp b/xargs/testsuite/xargs.gnu/noeof-0.exp new file mode 100644 index 00000000..7e680da2 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/noeof-0.exp @@ -0,0 +1 @@ +xargs_start p {-0} noeof-0.xi diff --git a/xargs/testsuite/xargs.gnu/noeof-0.xo b/xargs/testsuite/xargs.gnu/noeof-0.xo new file mode 100644 index 00000000..45f99976 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/noeof-0.xo @@ -0,0 +1 @@ +first second diff --git a/xargs/testsuite/xargs.gnu/s118-0.exp b/xargs/testsuite/xargs.gnu/s118-0.exp new file mode 100644 index 00000000..96634a45 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s118-0.exp @@ -0,0 +1 @@ +xargs_start p {-0 -s118} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/s118-0.xo b/xargs/testsuite/xargs.gnu/s118-0.xo new file mode 100644 index 00000000..06b617aa --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s118-0.xo @@ -0,0 +1 @@ +1 22 333 4444 55555 666666 7777777 88888888 999999999 1 22 333 4444 55555 666666 7777777 88888888 999999999 diff --git a/xargs/testsuite/xargs.gnu/s19-0.exp b/xargs/testsuite/xargs.gnu/s19-0.exp new file mode 100644 index 00000000..7f4f1534 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s19-0.exp @@ -0,0 +1 @@ +xargs_start f {-0 -s19} stairs-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/s19-0.xo b/xargs/testsuite/xargs.gnu/s19-0.xo new file mode 100644 index 00000000..afb3bc3a --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s19-0.xo @@ -0,0 +1,6 @@ +1 22 333 +4444 +55555 +666666 +7777777 +88888888 diff --git a/xargs/testsuite/xargs.gnu/s19_2-0.exp b/xargs/testsuite/xargs.gnu/s19_2-0.exp new file mode 100644 index 00000000..78c460af --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s19_2-0.exp @@ -0,0 +1 @@ +xargs_start f {-0 -s19} stairs2-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/s20-0.exp b/xargs/testsuite/xargs.gnu/s20-0.exp new file mode 100644 index 00000000..899fd10c --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s20-0.exp @@ -0,0 +1 @@ +xargs_start p {-0 -s20} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/s20-0.xo b/xargs/testsuite/xargs.gnu/s20-0.xo new file mode 100644 index 00000000..7f7032ef --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s20-0.xo @@ -0,0 +1,14 @@ +1 22 333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 22 333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.gnu/s30-0.exp b/xargs/testsuite/xargs.gnu/s30-0.exp new file mode 100644 index 00000000..5111b781 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s30-0.exp @@ -0,0 +1 @@ +xargs_start p {-0 -s30} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/s30-0.xo b/xargs/testsuite/xargs.gnu/s30-0.xo new file mode 100644 index 00000000..64ba7cb3 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s30-0.xo @@ -0,0 +1,6 @@ +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.gnu/space-0.exp b/xargs/testsuite/xargs.gnu/space-0.exp new file mode 100644 index 00000000..c44ff33f --- /dev/null +++ b/xargs/testsuite/xargs.gnu/space-0.exp @@ -0,0 +1 @@ +xargs_start p {-0 echo this plus that} space.xi diff --git a/xargs/testsuite/xargs.gnu/space-0.xo b/xargs/testsuite/xargs.gnu/space-0.xo new file mode 100644 index 00000000..7c4d562f --- /dev/null +++ b/xargs/testsuite/xargs.gnu/space-0.xo @@ -0,0 +1,3 @@ +this plus that + + diff --git a/xargs/testsuite/xargs.gnu/space-r.exp b/xargs/testsuite/xargs.gnu/space-r.exp new file mode 100644 index 00000000..9f662892 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/space-r.exp @@ -0,0 +1 @@ +xargs_start p {-r echo this plus that} space.xi diff --git a/xargs/testsuite/xargs.gnu/space-t-0.exp b/xargs/testsuite/xargs.gnu/space-t-0.exp new file mode 100644 index 00000000..35e38606 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/space-t-0.exp @@ -0,0 +1 @@ +xargs_start p {-t -0 echo this plus that} space.xi diff --git a/xargs/testsuite/xargs.gnu/space-t-0.xe b/xargs/testsuite/xargs.gnu/space-t-0.xe new file mode 100644 index 00000000..bfcf50bc --- /dev/null +++ b/xargs/testsuite/xargs.gnu/space-t-0.xe @@ -0,0 +1,3 @@ +echo this plus that + + diff --git a/xargs/testsuite/xargs.gnu/space-t-0.xo b/xargs/testsuite/xargs.gnu/space-t-0.xo new file mode 100644 index 00000000..7c4d562f --- /dev/null +++ b/xargs/testsuite/xargs.gnu/space-t-0.xo @@ -0,0 +1,3 @@ +this plus that + + diff --git a/xargs/testsuite/xargs.posix/EEOF.exp b/xargs/testsuite/xargs.posix/EEOF.exp new file mode 100644 index 00000000..4c976c44 --- /dev/null +++ b/xargs/testsuite/xargs.posix/EEOF.exp @@ -0,0 +1 @@ +xargs_start p {-E EOF} EOF.xi diff --git a/xargs/testsuite/xargs.posix/EEOF.xo b/xargs/testsuite/xargs.posix/EEOF.xo new file mode 100644 index 00000000..bd46cf2d --- /dev/null +++ b/xargs/testsuite/xargs.posix/EEOF.xo @@ -0,0 +1 @@ +one two diff --git a/xargs/testsuite/xargs.posix/EEOFb.exp b/xargs/testsuite/xargs.posix/EEOFb.exp new file mode 100644 index 00000000..8c92c4da --- /dev/null +++ b/xargs/testsuite/xargs.posix/EEOFb.exp @@ -0,0 +1 @@ +xargs_start p {-E EOF} EOFb.xi diff --git a/xargs/testsuite/xargs.posix/EEOFb.xo b/xargs/testsuite/xargs.posix/EEOFb.xo new file mode 100644 index 00000000..1be0fd0b --- /dev/null +++ b/xargs/testsuite/xargs.posix/EEOFb.xo @@ -0,0 +1 @@ +one two bEOF three four diff --git a/xargs/testsuite/xargs.posix/EEOFe.exp b/xargs/testsuite/xargs.posix/EEOFe.exp new file mode 100644 index 00000000..33cb5bcc --- /dev/null +++ b/xargs/testsuite/xargs.posix/EEOFe.exp @@ -0,0 +1 @@ +xargs_start p {-E EOF} EOFe.xi diff --git a/xargs/testsuite/xargs.posix/EEOFe.xo b/xargs/testsuite/xargs.posix/EEOFe.xo new file mode 100644 index 00000000..06fe033d --- /dev/null +++ b/xargs/testsuite/xargs.posix/EEOFe.xo @@ -0,0 +1 @@ +one two EOFe three four diff --git a/xargs/testsuite/xargs.posix/E_-IARG.exp b/xargs/testsuite/xargs.posix/E_-IARG.exp new file mode 100644 index 00000000..f56c565d --- /dev/null +++ b/xargs/testsuite/xargs.posix/E_-IARG.exp @@ -0,0 +1 @@ +xargs_start p {-E_ -IARG echo from ARG to xARGy} eof_.xi diff --git a/xargs/testsuite/xargs.posix/E_-IARG.xo b/xargs/testsuite/xargs.posix/E_-IARG.xo new file mode 100644 index 00000000..bb56ab0d --- /dev/null +++ b/xargs/testsuite/xargs.posix/E_-IARG.xo @@ -0,0 +1,2 @@ +from one to xoney +from two to xtwoy diff --git a/xargs/testsuite/xargs.posix/E_.exp b/xargs/testsuite/xargs.posix/E_.exp new file mode 100644 index 00000000..8edebbb9 --- /dev/null +++ b/xargs/testsuite/xargs.posix/E_.exp @@ -0,0 +1 @@ +xargs_start p {-E_} eof_.xi diff --git a/xargs/testsuite/xargs.posix/E_.xo b/xargs/testsuite/xargs.posix/E_.xo new file mode 100644 index 00000000..bd46cf2d --- /dev/null +++ b/xargs/testsuite/xargs.posix/E_.xo @@ -0,0 +1 @@ +one two diff --git a/xargs/testsuite/xargs.posix/IARG-E_.exp b/xargs/testsuite/xargs.posix/IARG-E_.exp new file mode 100644 index 00000000..3a01b2c3 --- /dev/null +++ b/xargs/testsuite/xargs.posix/IARG-E_.exp @@ -0,0 +1 @@ +xargs_start p {-IARG echo from ARG to xARGy -E_} eof_.xi diff --git a/xargs/testsuite/xargs.posix/IARG-E_.xo b/xargs/testsuite/xargs.posix/IARG-E_.xo new file mode 100644 index 00000000..7452a659 --- /dev/null +++ b/xargs/testsuite/xargs.posix/IARG-E_.xo @@ -0,0 +1,5 @@ +from one to xoney -E_ +from two to xtwoy -E_ +from _ to x_y -E_ +from three to xthreey -E_ +from four to xfoury -E_ diff --git a/xargs/testsuite/xargs.posix/IARG-s15.exp b/xargs/testsuite/xargs.posix/IARG-s15.exp new file mode 100644 index 00000000..b237c0a9 --- /dev/null +++ b/xargs/testsuite/xargs.posix/IARG-s15.exp @@ -0,0 +1 @@ +xargs_start p {-IARG -s15 echo ARG} stairs.xi diff --git a/xargs/testsuite/xargs.posix/IARG-s15.xo b/xargs/testsuite/xargs.posix/IARG-s15.xo new file mode 100644 index 00000000..c2a8ccee --- /dev/null +++ b/xargs/testsuite/xargs.posix/IARG-s15.xo @@ -0,0 +1,18 @@ +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/IARG.exp b/xargs/testsuite/xargs.posix/IARG.exp new file mode 100644 index 00000000..48562212 --- /dev/null +++ b/xargs/testsuite/xargs.posix/IARG.exp @@ -0,0 +1 @@ +xargs_start p {-IARG echo from ARG to xARGy} items.xi diff --git a/xargs/testsuite/xargs.posix/IARG.xo b/xargs/testsuite/xargs.posix/IARG.xo new file mode 100644 index 00000000..a78e799d --- /dev/null +++ b/xargs/testsuite/xargs.posix/IARG.xo @@ -0,0 +1,6 @@ +from dumb to xdumby +from s s to xs s y +from f f to xf f y +from r r to xr r y +from t t to xt t y +from v v to xv v y diff --git a/xargs/testsuite/xargs.posix/L2-n2.exp b/xargs/testsuite/xargs.posix/L2-n2.exp new file mode 100644 index 00000000..88a939f7 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L2-n2.exp @@ -0,0 +1 @@ +xargs_start p {-L2 -n2} ldata.xi diff --git a/xargs/testsuite/xargs.posix/L2-n2.xo b/xargs/testsuite/xargs.posix/L2-n2.xo new file mode 100644 index 00000000..33d81777 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L2-n2.xo @@ -0,0 +1,9 @@ +1 22 +333 4444 +55555 666666 +7777777 88888888 +999999999 1 +22 333 +4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/L2.exp b/xargs/testsuite/xargs.posix/L2.exp new file mode 100644 index 00000000..8ad3dd70 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L2.exp @@ -0,0 +1 @@ +xargs_start p {-L2} ldata.xi diff --git a/xargs/testsuite/xargs.posix/L2.xo b/xargs/testsuite/xargs.posix/L2.xo new file mode 100644 index 00000000..72347025 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L2.xo @@ -0,0 +1,5 @@ +1 22 333 4444 55555 666666 +7777777 88888888 +999999999 1 22 333 4444 55555 +666666 7777777 88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/L2_2.exp b/xargs/testsuite/xargs.posix/L2_2.exp new file mode 100644 index 00000000..7bc11534 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L2_2.exp @@ -0,0 +1 @@ +xargs_start p {-L2} ldatab.xi diff --git a/xargs/testsuite/xargs.posix/L2_2.xo b/xargs/testsuite/xargs.posix/L2_2.xo new file mode 100644 index 00000000..f4e71234 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L2_2.xo @@ -0,0 +1,3 @@ +1 22 333 4444 55555 666666 7777777 88888888 999999999 1 22 +333 4444 55555 666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/L3.exp b/xargs/testsuite/xargs.posix/L3.exp new file mode 100644 index 00000000..b4d87621 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L3.exp @@ -0,0 +1 @@ +xargs_start p {-L3} ldata.xi diff --git a/xargs/testsuite/xargs.posix/L3.xo b/xargs/testsuite/xargs.posix/L3.xo new file mode 100644 index 00000000..2cb7fb38 --- /dev/null +++ b/xargs/testsuite/xargs.posix/L3.xo @@ -0,0 +1,3 @@ +1 22 333 4444 55555 666666 7777777 +88888888 999999999 1 22 333 4444 55555 +666666 7777777 88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/empty.exp b/xargs/testsuite/xargs.posix/empty.exp new file mode 100644 index 00000000..cfab8264 --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty.exp @@ -0,0 +1 @@ +xargs_start p {echo this plus that} diff --git a/xargs/testsuite/xargs.posix/empty.xo b/xargs/testsuite/xargs.posix/empty.xo new file mode 100644 index 00000000..b8e9a023 --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/testsuite/xargs.posix/empty_def.exp b/xargs/testsuite/xargs.posix/empty_def.exp new file mode 100644 index 00000000..765c4bb0 --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty_def.exp @@ -0,0 +1 @@ +xargs_start p {} diff --git a/xargs/testsuite/xargs.posix/empty_def.xo b/xargs/testsuite/xargs.posix/empty_def.xo new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty_def.xo @@ -0,0 +1 @@ + diff --git a/xargs/testsuite/xargs.posix/n1.exp b/xargs/testsuite/xargs.posix/n1.exp new file mode 100644 index 00000000..40ddc9ec --- /dev/null +++ b/xargs/testsuite/xargs.posix/n1.exp @@ -0,0 +1 @@ +xargs_start p {-n1} stairs.xi diff --git a/xargs/testsuite/xargs.posix/n1.xo b/xargs/testsuite/xargs.posix/n1.xo new file mode 100644 index 00000000..c2a8ccee --- /dev/null +++ b/xargs/testsuite/xargs.posix/n1.xo @@ -0,0 +1,18 @@ +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.exp b/xargs/testsuite/xargs.posix/n2-s26-x.exp new file mode 100644 index 00000000..fd59c052 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26-x.exp @@ -0,0 +1 @@ +xargs_start f {-n2 -s26 -x} stairs.xi skip diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.xo b/xargs/testsuite/xargs.posix/n2-s26-x.xo new file mode 100644 index 00000000..7b6db828 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26-x.xo @@ -0,0 +1,3 @@ +1 22 +333 4444 +55555 666666 diff --git a/xargs/testsuite/xargs.posix/n2-s26.exp b/xargs/testsuite/xargs.posix/n2-s26.exp new file mode 100644 index 00000000..ba76660e --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26.exp @@ -0,0 +1 @@ +xargs_start p {-n2 -s26} stairs.xi diff --git a/xargs/testsuite/xargs.posix/n2-s26.xo b/xargs/testsuite/xargs.posix/n2-s26.xo new file mode 100644 index 00000000..a9e8dfaa --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26.xo @@ -0,0 +1,11 @@ +1 22 +333 4444 +55555 666666 +7777777 +88888888 +999999999 1 +22 333 +4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/n2.exp b/xargs/testsuite/xargs.posix/n2.exp new file mode 100644 index 00000000..6bcbad2e --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2.exp @@ -0,0 +1 @@ +xargs_start p {-n2} stairs.xi diff --git a/xargs/testsuite/xargs.posix/n2.xo b/xargs/testsuite/xargs.posix/n2.xo new file mode 100644 index 00000000..33d81777 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2.xo @@ -0,0 +1,9 @@ +1 22 +333 4444 +55555 666666 +7777777 88888888 +999999999 1 +22 333 +4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/n3-s36.exp b/xargs/testsuite/xargs.posix/n3-s36.exp new file mode 100644 index 00000000..00c80e95 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n3-s36.exp @@ -0,0 +1 @@ +xargs_start p {-n3 -s36} stairs2.xi diff --git a/xargs/testsuite/xargs.posix/n3-s36.xo b/xargs/testsuite/xargs.posix/n3-s36.xo new file mode 100644 index 00000000..74844869 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n3-s36.xo @@ -0,0 +1,7 @@ +999999999 88888888 +7777777 666666 55555 +4444 333 22 +1 999999999 88888888 +7777777 666666 55555 +4444 333 22 +1 diff --git a/xargs/testsuite/xargs.posix/noeof.exp b/xargs/testsuite/xargs.posix/noeof.exp new file mode 100644 index 00000000..ad494370 --- /dev/null +++ b/xargs/testsuite/xargs.posix/noeof.exp @@ -0,0 +1 @@ +xargs_start p {} noeof.xi diff --git a/xargs/testsuite/xargs.posix/noeof.xo b/xargs/testsuite/xargs.posix/noeof.xo new file mode 100644 index 00000000..45f99976 --- /dev/null +++ b/xargs/testsuite/xargs.posix/noeof.xo @@ -0,0 +1 @@ +first second diff --git a/xargs/testsuite/xargs.posix/rc-123.exp b/xargs/testsuite/xargs.posix/rc-123.exp new file mode 100644 index 00000000..217de0fa --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-123.exp @@ -0,0 +1 @@ +xargs_start 123 {-n1 -IARG sh -c ARG} ftt.xi diff --git a/xargs/testsuite/xargs.posix/rc-123.xo b/xargs/testsuite/xargs.posix/rc-123.xo new file mode 100644 index 00000000..1191247b --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-123.xo @@ -0,0 +1,2 @@ +1 +2 diff --git a/xargs/testsuite/xargs.posix/rc-124.exp b/xargs/testsuite/xargs.posix/rc-124.exp new file mode 100644 index 00000000..4fe3aba6 --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-124.exp @@ -0,0 +1 @@ +xargs_start 124 {-n1 -IARG sh -c ARG} ett.xi skip diff --git a/xargs/testsuite/xargs.posix/rc-125.exp b/xargs/testsuite/xargs.posix/rc-125.exp new file mode 100644 index 00000000..b80d1bf9 --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-125.exp @@ -0,0 +1 @@ +xargs_start 125 {-n1 -IARG sh -c ARG} stt.xi skip diff --git a/xargs/testsuite/xargs.posix/rc-126.exp b/xargs/testsuite/xargs.posix/rc-126.exp new file mode 100644 index 00000000..17cb9f4c --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-126.exp @@ -0,0 +1 @@ +xargs_start 126 {/} {} skip diff --git a/xargs/testsuite/xargs.posix/rc-127.exp b/xargs/testsuite/xargs.posix/rc-127.exp new file mode 100644 index 00000000..8e4278ad --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-127.exp @@ -0,0 +1 @@ +xargs_start 127 {./missing} {} skip diff --git a/xargs/testsuite/xargs.posix/s118.exp b/xargs/testsuite/xargs.posix/s118.exp new file mode 100644 index 00000000..1f0fc9fa --- /dev/null +++ b/xargs/testsuite/xargs.posix/s118.exp @@ -0,0 +1 @@ +xargs_start p {-s118} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s118.xo b/xargs/testsuite/xargs.posix/s118.xo new file mode 100644 index 00000000..06b617aa --- /dev/null +++ b/xargs/testsuite/xargs.posix/s118.xo @@ -0,0 +1 @@ +1 22 333 4444 55555 666666 7777777 88888888 999999999 1 22 333 4444 55555 666666 7777777 88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/s19.exp b/xargs/testsuite/xargs.posix/s19.exp new file mode 100644 index 00000000..86f93378 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s19.exp @@ -0,0 +1 @@ +xargs_start f {-s19} stairs.xi skip diff --git a/xargs/testsuite/xargs.posix/s19.xo b/xargs/testsuite/xargs.posix/s19.xo new file mode 100644 index 00000000..afb3bc3a --- /dev/null +++ b/xargs/testsuite/xargs.posix/s19.xo @@ -0,0 +1,6 @@ +1 22 333 +4444 +55555 +666666 +7777777 +88888888 diff --git a/xargs/testsuite/xargs.posix/s19_2.exp b/xargs/testsuite/xargs.posix/s19_2.exp new file mode 100644 index 00000000..be27aefc --- /dev/null +++ b/xargs/testsuite/xargs.posix/s19_2.exp @@ -0,0 +1 @@ +xargs_start f {-s19} stairs2.xi skip diff --git a/xargs/testsuite/xargs.posix/s20.exp b/xargs/testsuite/xargs.posix/s20.exp new file mode 100644 index 00000000..f87d4410 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s20.exp @@ -0,0 +1 @@ +xargs_start p {-s20} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s20.xo b/xargs/testsuite/xargs.posix/s20.xo new file mode 100644 index 00000000..7f7032ef --- /dev/null +++ b/xargs/testsuite/xargs.posix/s20.xo @@ -0,0 +1,14 @@ +1 22 333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 22 333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/s30.exp b/xargs/testsuite/xargs.posix/s30.exp new file mode 100644 index 00000000..9faa71b2 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s30.exp @@ -0,0 +1 @@ +xargs_start p {-s30} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s30.xo b/xargs/testsuite/xargs.posix/s30.xo new file mode 100644 index 00000000..64ba7cb3 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s30.xo @@ -0,0 +1,6 @@ +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/s47.exp b/xargs/testsuite/xargs.posix/s47.exp index 0945b08b..8f79b2a0 100644 --- a/xargs/testsuite/xargs.posix/s47.exp +++ b/xargs/testsuite/xargs.posix/s47.exp @@ -1 +1 @@ -xargs_start f {-s47} files.xi +xargs_start f {-s47} files.xi skip diff --git a/xargs/testsuite/xargs.posix/s470.exp b/xargs/testsuite/xargs.posix/s470.exp index 0643926d..5828ce6d 100644 --- a/xargs/testsuite/xargs.posix/s470.exp +++ b/xargs/testsuite/xargs.posix/s470.exp @@ -1 +1 @@ -xargs_start p {-s470} files.xi +xargs_start p {-s470} files.xi skip diff --git a/xargs/testsuite/xargs.posix/s6.exp b/xargs/testsuite/xargs.posix/s6.exp index d572ae13..a5a714f5 100644 --- a/xargs/testsuite/xargs.posix/s6.exp +++ b/xargs/testsuite/xargs.posix/s6.exp @@ -1 +1 @@ -xargs_start f {-s6} files.xi +xargs_start f {-s6} files.xi skip diff --git a/xargs/testsuite/xargs.posix/space-I.exp b/xargs/testsuite/xargs.posix/space-I.exp new file mode 100644 index 00000000..69eb0b76 --- /dev/null +++ b/xargs/testsuite/xargs.posix/space-I.exp @@ -0,0 +1 @@ +xargs_start p {-IARG echo from ARG to xARGy} space.xi diff --git a/xargs/testsuite/xargs.posix/space.exp b/xargs/testsuite/xargs.posix/space.exp new file mode 100644 index 00000000..3ba833bf --- /dev/null +++ b/xargs/testsuite/xargs.posix/space.exp @@ -0,0 +1 @@ +xargs_start p {echo this plus that} space.xi diff --git a/xargs/testsuite/xargs.posix/space.xo b/xargs/testsuite/xargs.posix/space.xo new file mode 100644 index 00000000..b8e9a023 --- /dev/null +++ b/xargs/testsuite/xargs.posix/space.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/testsuite/xargs.posix/unmatched-n2-x.exp b/xargs/testsuite/xargs.posix/unmatched-n2-x.exp new file mode 100644 index 00000000..720b48f9 --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched-n2-x.exp @@ -0,0 +1 @@ +xargs_start f {-n2 -x} unmatched.xi skip diff --git a/xargs/testsuite/xargs.posix/unmatched.exp b/xargs/testsuite/xargs.posix/unmatched.exp new file mode 100644 index 00000000..a98c9206 --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched.exp @@ -0,0 +1 @@ +xargs_start f {} unmatched.xi skip diff --git a/xargs/testsuite/xargs.posix/unmatched.xo b/xargs/testsuite/xargs.posix/unmatched.xo new file mode 100644 index 00000000..5626abf0 --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched.xo @@ -0,0 +1 @@ +one diff --git a/xargs/testsuite/xargs.posix/unmatched2.exp b/xargs/testsuite/xargs.posix/unmatched2.exp new file mode 100644 index 00000000..12b17f3e --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched2.exp @@ -0,0 +1 @@ +xargs_start f {} unmatched2.xi skip diff --git a/xargs/testsuite/xargs.posix/unmatched2.xo b/xargs/testsuite/xargs.posix/unmatched2.xo new file mode 100644 index 00000000..5626abf0 --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched2.xo @@ -0,0 +1 @@ +one diff --git a/xargs/testsuite/xargs.sysv/e.exp b/xargs/testsuite/xargs.sysv/e.exp new file mode 100644 index 00000000..86c3af1e --- /dev/null +++ b/xargs/testsuite/xargs.sysv/e.exp @@ -0,0 +1 @@ +xargs_start p {-e} eof_.xi diff --git a/xargs/testsuite/xargs.sysv/e.xo b/xargs/testsuite/xargs.sysv/e.xo new file mode 100644 index 00000000..28a9314a --- /dev/null +++ b/xargs/testsuite/xargs.sysv/e.xo @@ -0,0 +1 @@ +one two _ three four diff --git a/xargs/testsuite/xargs.sysv/empty-t.exp b/xargs/testsuite/xargs.sysv/empty-t.exp new file mode 100644 index 00000000..80470155 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty-t.exp @@ -0,0 +1 @@ +xargs_start p {-t echo this plus that} diff --git a/xargs/testsuite/xargs.sysv/empty-t.xe b/xargs/testsuite/xargs.sysv/empty-t.xe new file mode 100644 index 00000000..ec9c43db --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty-t.xe @@ -0,0 +1 @@ +echo this plus that diff --git a/xargs/testsuite/xargs.sysv/empty-t.xo b/xargs/testsuite/xargs.sysv/empty-t.xo new file mode 100644 index 00000000..b8e9a023 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty-t.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.exp b/xargs/testsuite/xargs.sysv/empty_def-t.exp new file mode 100644 index 00000000..2f1e9b93 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty_def-t.exp @@ -0,0 +1 @@ +xargs_start p {-t} diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.xe b/xargs/testsuite/xargs.sysv/empty_def-t.xe new file mode 100644 index 00000000..da4ae853 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty_def-t.xe @@ -0,0 +1 @@ +/bin/echo diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.xo b/xargs/testsuite/xargs.sysv/empty_def-t.xo new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty_def-t.xo @@ -0,0 +1 @@ + diff --git a/xargs/testsuite/xargs.sysv/idef-s26.exp b/xargs/testsuite/xargs.sysv/idef-s26.exp new file mode 100644 index 00000000..348661bf --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef-s26.exp @@ -0,0 +1 @@ +xargs_start f {-i -s26 echo from \{\} to x{}y} items.xi skip diff --git a/xargs/testsuite/xargs.sysv/idef-s26.xo b/xargs/testsuite/xargs.sysv/idef-s26.xo new file mode 100644 index 00000000..94f1e344 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef-s26.xo @@ -0,0 +1 @@ +from dumb to xdumby diff --git a/xargs/testsuite/xargs.sysv/idef.exp b/xargs/testsuite/xargs.sysv/idef.exp new file mode 100644 index 00000000..78049fa5 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef.exp @@ -0,0 +1 @@ +xargs_start p {-i echo from \{\} to x{}y} items.xi diff --git a/xargs/testsuite/xargs.sysv/idef.xo b/xargs/testsuite/xargs.sysv/idef.xo new file mode 100644 index 00000000..a78e799d --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef.xo @@ -0,0 +1,6 @@ +from dumb to xdumby +from s s to xs s y +from f f to xf f y +from r r to xr r y +from t t to xt t y +from v v to xv v y diff --git a/xargs/testsuite/xargs.sysv/l1.exp b/xargs/testsuite/xargs.sysv/l1.exp new file mode 100644 index 00000000..5dbec2ad --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1.exp @@ -0,0 +1 @@ +xargs_start p {-l} ldata.xi diff --git a/xargs/testsuite/xargs.sysv/l1.xo b/xargs/testsuite/xargs.sysv/l1.xo new file mode 100644 index 00000000..b654880b --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1.xo @@ -0,0 +1,9 @@ +1 22 333 4444 +55555 666666 +7777777 +88888888 +999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.sysv/l1_2.exp b/xargs/testsuite/xargs.sysv/l1_2.exp new file mode 100644 index 00000000..ffb6ad6b --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1_2.exp @@ -0,0 +1 @@ +xargs_start p {-l} ldatab.xi diff --git a/xargs/testsuite/xargs.sysv/l1_2.xo b/xargs/testsuite/xargs.sysv/l1_2.xo new file mode 100644 index 00000000..f9dc665b --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1_2.xo @@ -0,0 +1,6 @@ +1 22 333 4444 55555 666666 +7777777 88888888 999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.sysv/s30-t.exp b/xargs/testsuite/xargs.sysv/s30-t.exp new file mode 100644 index 00000000..4145c8d7 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s30-t.exp @@ -0,0 +1 @@ +xargs_start p {-s30 -t} stairs.xi diff --git a/xargs/testsuite/xargs.sysv/s30-t.xe b/xargs/testsuite/xargs.sysv/s30-t.xe new file mode 100644 index 00000000..f91bf789 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s30-t.xe @@ -0,0 +1,6 @@ +/bin/echo 1 22 333 4444 55555 +/bin/echo 666666 7777777 +/bin/echo 88888888 999999999 +/bin/echo 1 22 333 4444 55555 +/bin/echo 666666 7777777 +/bin/echo 88888888 999999999 diff --git a/xargs/testsuite/xargs.sysv/s30-t.xo b/xargs/testsuite/xargs.sysv/s30-t.xo new file mode 100644 index 00000000..64ba7cb3 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s30-t.xo @@ -0,0 +1,6 @@ +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.sysv/space-t.exp b/xargs/testsuite/xargs.sysv/space-t.exp new file mode 100644 index 00000000..1d9c8577 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/space-t.exp @@ -0,0 +1 @@ +xargs_start p {-t echo this plus that} space.xi diff --git a/xargs/testsuite/xargs.sysv/space-t.xe b/xargs/testsuite/xargs.sysv/space-t.xe new file mode 100644 index 00000000..ec9c43db --- /dev/null +++ b/xargs/testsuite/xargs.sysv/space-t.xe @@ -0,0 +1 @@ +echo this plus that diff --git a/xargs/testsuite/xargs.sysv/space-t.xo b/xargs/testsuite/xargs.sysv/space-t.xo new file mode 100644 index 00000000..b8e9a023 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/space-t.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/xargs.c b/xargs/xargs.c index 1d891d50..13f003c4 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -303,8 +303,10 @@ static void push_arg PARAMS ((char *arg, size_t len)); static boolean print_args PARAMS ((boolean ask)); /* static void do_exec PARAMS ((void)); */ static int xargs_do_exec (const struct buildcmd_control *cl, struct buildcmd_state *state); +static void exec_if_possible PARAMS ((void)); static void add_proc PARAMS ((pid_t pid)); static void wait_for_proc PARAMS ((boolean all)); +static void wait_for_proc_all PARAMS ((void)); static long parse_num PARAMS ((char *str, int option, long min, long max, int fatal)); static long env_size PARAMS ((char **envp)); static void usage PARAMS ((FILE * stream)); @@ -360,6 +362,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); atexit (close_stdout); + atexit (wait_for_proc_all); /* IEE Std 1003.1, 2003 specifies that the combined argument and * environment list shall not exceed {ARG_MAX}-2048 bytes. It also @@ -628,7 +631,6 @@ main (int argc, char **argv) } } - wait_for_proc (true); return child_error; } @@ -724,7 +726,12 @@ read_line (void) return -1; *p++ = '\0'; len = p - linebuf; - /* FIXME we don't check for unterminated quotes here. */ + if (state == QUOTE) + { + exec_if_possible (); + error (1, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"), + quotc == '"' ? _("double") : _("single")); + } if (first && EOF_STR (linebuf)) return -1; if (!bc_ctl.replace_pat) @@ -801,8 +808,11 @@ read_line (void) case QUOTE: if (c == '\n') - error (1, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"), - quotc == '"' ? _("double") : _("single")); + { + exec_if_possible (); + error (1, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"), + quotc == '"' ? _("double") : _("single")); + } if (c == quotc) { state = NORM; @@ -816,7 +826,10 @@ read_line (void) } #if 1 if (p >= endbuf) - error (1, 0, _("argument line too long")); + { + exec_if_possible (); + error (1, 0, _("argument line too long")); + } *p++ = c; #else append_char_to_buf(&linebuf, &endbuf, &p, c); @@ -870,7 +883,10 @@ read_string (void) return len; } if (p >= endbuf) - error (1, 0, _("argument line too long")); + { + exec_if_possible (); + error (1, 0, _("argument line too long")); + } *p++ = c; } } @@ -980,6 +996,17 @@ xargs_do_exec (const struct buildcmd_control *ctl, struct buildcmd_state *state) return 1; /* Success */ } +/* Execute the command if possible. */ + +static void +exec_if_possible (void) +{ + if (bc_ctl.replace_pat || initial_args || + bc_state.cmd_argc == bc_ctl.initial_argc || bc_ctl.exit_if_size_exceeded) + return; + xargs_do_exec (&bc_ctl, &bc_state); +} + /* Add the process with id PID to the list of processes that have been executed. */ @@ -1057,6 +1084,21 @@ wait_for_proc (boolean all) } } +/* Wait for all child processes to finish. */ + +static void +wait_for_proc_all (void) +{ + static boolean waiting = false; + + if (waiting) + return; + + waiting = true; + wait_for_proc (true); + waiting = false; +} + /* Return the value of the number represented in STR. OPTION is the command line option to which STR is the argument. If the value does not fall within the boundaries MIN and MAX,