(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children:[(C {(pwd)})]) ) (Lit_Other ':') (/command) (Lit_Other ':') (/usr/local/bin) (Lit_Other ':') (/usr/local/sbin) (Lit_Other ':') (/bin) (Lit_Other ':') (/sbin) (Lit_Other ':') (/usr/bin) (Lit_Other ':') (/usr/sbin) (Lit_Other ':') (/usr/X11R6/bin) (Lit_Other ':') (/usr/ucb) } ) ] ) (C {(export)} {(PATH)}) (C {(umask)} {(022)}) (command.ShFunction name: die body: (command.BraceGroup children: [ (C {(echo)} {(DQ ($ VSub_At '$@'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ) (command.ShFunction name: catexe body: (command.BraceGroup children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Number '$1')} ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {($ VSub_Number '$1')}) ] ) ) (command.ShFunction name: filter_svstat body: (command.BraceGroup children: [ (C {(sed)} {(-e)} {(SQ <'s/[0-9]* seconds/x seconds/'>)} {(-e)} {(SQ <'s/pid [0-9]*/pid x/'>)}) ] ) ) (command.AndOr ops: [Op_DPipe] children: [(C {(rm)} {(-rf)} {(rts-tmp)}) (C {(die)} {(DQ ('Could not clean up old rts-tmp'))})] ) (command.AndOr ops: [Op_DPipe] children: [(C {(mkdir)} {(rts-tmp)}) (C {(die)} {(DQ ('Could not create new rts-tmp'))})] ) (command.AndOr ops: [Op_DPipe] children: [(C {(cd)} {(rts-tmp)}) (C {(die)} {(DQ ('Could not change to rts-tmp'))})] ) (command.AndOr ops: [Op_DPipe] children: [(C {(mkdir)} {(test.sv)}) (C {(die)} {(DQ ('Could not create test.sv'))})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TOP) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children:[(C {(pwd)})]) ) } ) ] ) (C {(echo)} {(SQ <'--- envdir requires arguments'>)}) (command.CommandList children: [ (command.Sentence child:(C {(envdir)} {(whatever)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- envdir complains if it cannot read directory'>)}) (C {(ln)} {(-s)} {(env1)} {(env1)}) (command.CommandList children: [ (command.Sentence child: (C {(envdir)} {(env1)} {(echo)} {(yes)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- envdir complains if it cannot read file'>)}) (C {(rm)} {(env1)}) (C {(mkdir)} {(env1)}) (C {(ln)} {(-s)} {(Message)} {(env1/Message)}) (command.CommandList children: [ (command.Sentence child: (C {(envdir)} {(env1)} {(echo)} {(yes)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- envdir adds variables'>)}) (C {(rm)} {(env1/Message)}) (command.Simple words: [{(echo)} {(This)} {(is)} {(a)} {(test.)} {(This)} {(is)} {(only)} {(a)} {(test.)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(env1/Message)})] ) (command.CommandList children: [ (command.Sentence child: (C {(envdir)} {(env1)} {(sh)} {(-c)} {(SQ <'echo $Message'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- envdir removes variables'>)}) (C {(mkdir)} {(env2)}) (C {(touch)} {(env2/Message)}) (command.CommandList children: [ (command.Sentence child: (C {(envdir)} {(env1)} {(envdir)} {(env2)} {(sh)} {(-c)} {(SQ <'echo $Message'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- envuidgid insists on two arguments'>)}) (command.CommandList children: [ (command.Sentence child:(C {(envuidgid)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {(envuidgid)} {(root)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- envuidgid sets UID=0 for root'>)}) (command.CommandList children: [ (command.Sentence child: (C {(envuidgid)} {(root)} {(printenv)} {(UID)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- envuidgid complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child: (C {(envuidgid)} {(root)} {(./nonexistent)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- fghack insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child:(C {(fghack)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- fghack complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child:(C {(fghack)} {(./nonexistent)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- fghack runs a program'>)}) (command.CommandList children: [ (command.Sentence child: (C {(fghack)} {(sh)} {(-c)} {(SQ <'echo hi &'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- match handles literal string'>)}) (C {(matchtest)} {(one)} {(one)}) (C {(matchtest)} {(one)} {(SQ )}) (C {(matchtest)} {(one)} {(on)}) (C {(matchtest)} {(one)} {(onf)}) (C {(matchtest)} {(one)} {(SQ <'one*'>)}) (C {(matchtest)} {(one)} {(onetwo)}) (C {(echo)} {(SQ <'--- match handles empty string'>)}) (C {(matchtest)} {(SQ )} {(SQ )}) (C {(matchtest)} {(SQ )} {(x)}) (C {(echo)} {(SQ <'--- match handles full-line wildcard'>)}) (C {(matchtest)} {(SQ <'*'>)} {(SQ )}) (C {(matchtest)} {(SQ <'*'>)} {(x)}) (C {(matchtest)} {(SQ <'*'>)} {(SQ <'*'>)}) (C {(matchtest)} {(SQ <'*'>)} {(one)}) (C {(echo)} {(SQ <'--- match handles ending wildcard'>)}) (C {(matchtest)} {(SQ <'one*'>)} {(one)}) (C {(matchtest)} {(SQ <'one*'>)} {(SQ <'one*'>)}) (C {(matchtest)} {(SQ <'one*'>)} {(onetwo)}) (C {(matchtest)} {(SQ <'one*'>)} {(SQ )}) (C {(matchtest)} {(SQ <'one*'>)} {(x)}) (C {(matchtest)} {(SQ <'one*'>)} {(on)}) (C {(matchtest)} {(SQ <'one*'>)} {(onf)}) (C {(echo)} {(SQ <'--- match handles wildcard termination'>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <'x one'>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <'* one'>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <'xy one'>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <one>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <' two'>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'* one'>)} {(SQ <'xy one '>)}) (C {(echo)} {(SQ <'--- match handles multiple wildcards'>)}) (C {(matchtest)} {(SQ <'* * one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'* * one'>)} {(SQ <'x one'>)}) (C {(matchtest)} {(SQ <'* * one'>)} {(SQ <' y one'>)}) (C {(matchtest)} {(SQ <'* * one'>)} {(SQ <'x y one'>)}) (C {(matchtest)} {(SQ <'* * one'>)} {(SQ <one>)}) (C {(matchtest)} {(SQ <'* * one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'* * one'>)} {(SQ <' one'>)}) (C {(echo)} {(SQ <'--- fnmatch handles literal string'>)}) (C {(matchtest)} {(Fone)} {(one)}) (C {(matchtest)} {(Fone)} {(SQ )}) (C {(matchtest)} {(Fone)} {(on)}) (C {(matchtest)} {(Fone)} {(onf)}) (C {(matchtest)} {(Fone)} {(SQ <'one*'>)}) (C {(matchtest)} {(Fone)} {(onetwo)}) (C {(echo)} {(SQ <'--- fnmatch handles empty string'>)}) (C {(matchtest)} {(SQ <F>)} {(SQ )}) (C {(matchtest)} {(SQ <F>)} {(x)}) (C {(echo)} {(SQ <'--- fnmatch handles full-line wildcard'>)}) (C {(matchtest)} {(SQ <'F*'>)} {(SQ )}) (C {(matchtest)} {(SQ <'F*'>)} {(x)}) (C {(matchtest)} {(SQ <'F*'>)} {(SQ <'*'>)}) (C {(matchtest)} {(SQ <'F*'>)} {(one)}) (C {(echo)} {(SQ <'--- fnmatch handles ending wildcard'>)}) (C {(matchtest)} {(SQ <'Fone*'>)} {(one)}) (C {(matchtest)} {(SQ <'Fone*'>)} {(SQ <'one*'>)}) (C {(matchtest)} {(SQ <'Fone*'>)} {(onetwo)}) (C {(matchtest)} {(SQ <'Fone*'>)} {(SQ )}) (C {(matchtest)} {(SQ <'Fone*'>)} {(x)}) (C {(matchtest)} {(SQ <'Fone*'>)} {(on)}) (C {(matchtest)} {(SQ <'Fone*'>)} {(onf)}) (C {(echo)} {(SQ <'--- fnmatch handles wildcard termination'>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <'x one'>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <'* one'>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <'xy one'>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <one>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <' two'>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'F* one'>)} {(SQ <'xy one '>)}) (C {(echo)} {(SQ <'--- fnmatch handles multiple wildcards'>)}) (C {(matchtest)} {(SQ <'F* * one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'F* * one'>)} {(SQ <'x one'>)}) (C {(matchtest)} {(SQ <'F* * one'>)} {(SQ <' y one'>)}) (C {(matchtest)} {(SQ <'F* * one'>)} {(SQ <'x y one'>)}) (C {(matchtest)} {(SQ <'F* * one'>)} {(SQ <one>)}) (C {(matchtest)} {(SQ <'F* * one'>)} {(SQ <' one'>)}) (C {(matchtest)} {(SQ <'F* * one'>)} {(SQ <' one'>)}) (C {(echo)} {(SQ <'--- multilog prints nothing with no actions'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (C {(multilog)}) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog e prints to stderr'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (command.Simple words: [{(multilog)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog inserts newline after partial final line'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (command.Pipeline children: [(C {(echo)} {(two)}) (C {(tr)} {(-d)} {(SQ <'\\012'>)})] negated: F ) ] ) ) (command.Simple words: [{(multilog)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog handles multiple actions'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (command.Simple words: [{(multilog)} {(e)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog handles wildcard -'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (command.Simple words: [{(multilog)} {(SQ <'-*'>)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog handles literal +'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (command.Simple words: [{(multilog)} {(SQ <'-*'>)} {(SQ <'+one'>)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog handles fnmatch -'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (command.Simple words: [{(multilog)} {(F)} {(SQ <'-*'>)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog handles fnmatch +'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(echo)} {(two)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(one)} {(two)}) ] ) ) (command.Simple words: [{(multilog)} {(F)} {(SQ <'-*'>)} {(SQ <'+*o*'>)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog handles long lines for stderr'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} { ( 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 ) } ) (command.Simple words: [{(multilog)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} { ( 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ) } ) (command.Simple words: [{(multilog)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} { ( 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 ) } ) (command.Simple words: [{(multilog)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- multilog handles status files'>)}) (C {(rm)} {(-f)} {(test.status)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (C {(multilog)} {(Lit_Equals '=') (test.status)}) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.Pipeline children: [ (command.Simple words: [{(uniq)} {(-c)}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(test.status)})] ) (C {(sed)} {(SQ <'s/[ \t]*[ \t]/_/g'>)}) ] negated: F ) (C {(echo)} {(SQ <'--- multilog t has the right format'>)}) (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child:(C {(echo)} {(ONE)}) terminator:<Op_Semi ';'>) (C {(echo)} {(TWO)}) ] ) ) (command.Simple words: [{(multilog)} {(t)} {(e)}] redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) (C {(sed)} {(SQ <'s/[0-9a-f]/x/g'>)}) ] negated: F ) (C {(echo)} {(SQ <'--- svstat handles new and nonexistent directories'>)}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(SQ <'#!/bin/sh'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(echo)} {(hi)}) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.sv/run)})] ) (C {(chmod)} {(755)} {(test.sv/run)}) (C {(touch)} {(test.sv/down)}) (command.CommandList children: [ (command.Sentence child: (C {(svstat)} {(test.sv)} {(nonexistent)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- svc handles new and nonexistent directories'>)}) (command.CommandList children: [ (command.Sentence child: (C {(svc)} {(test.sv)} {(nonexistent)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- svok handles new and nonexistent directories'>)}) (command.CommandList children: [ (command.Sentence child:(C {(svok)} {(test.sv)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {(svok)} {(nonexistent)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- supervise handles nonexistent directories'>)}) (command.CommandList children: [ (command.Sentence child:(C {(supervise)} {(nonexistent)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- pgrphack insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child:(C {(pgrphack)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- pgrphack complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child:(C {(pgrphack)} {(./nonexistent)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- pgrphack runs a program'>)}) (command.CommandList children: [ (command.Sentence child:(C {(pgrphack)} {(echo)} {(ok)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- readproctitle insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{(readproctitle)}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(/dev/null)})] ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- readproctitle insists on last argument being at least five bytes'>)}) (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{(readproctitle)} {(..........)} {(four)}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(/dev/null)})] ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- setlock requires arguments'>)}) (command.CommandList children: [ (command.Sentence child:(C {(setlock)} {(whatever)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- setlock complains if it cannot create lock file'>)}) (command.CommandList children: [ (command.Sentence child: (C {(setlock)} {(nonexistent/lock)} {(echo)} {(wrong)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- setlock -x exits quietly if it cannot create lock file'>)}) (command.CommandList children: [ (command.Sentence child: (C {(setlock)} {(-x)} {(nonexistent/lock)} {(echo)} {(wrong)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- setlock creates lock file'>)}) (command.CommandList children: [ (command.Sentence child: (C {(setlock)} {(lock)} {(echo)} {(ok)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- setlock does not truncate lock file'>)}) (command.Simple words: [{(echo)} {(ok)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(lock)})] ) (command.CommandList children: [ (command.Sentence child: (C {(setlock)} {(lock)} {(cat)} {(lock)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(rm)} {(-f)} {(lock)}) (C {(echo)} {(SQ <'--- setlock -n complains if file is already locked'>)}) (command.CommandList children: [ (command.Sentence child: (C {(setlock)} {(lock)} {(sh)} {(-c)} {(SQ <'setlock -n lock echo one && echo two'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- setlock -nx exits quietly if file is already locked'>)}) (command.CommandList children: [ (command.Sentence child: (C {(setlock)} {(lock)} {(sh)} {(-c)} {(SQ <'setlock -nx lock echo one && echo two'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- softlimit insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child:(C {(softlimit)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- softlimit complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child:(C {(softlimit)} {(./nonexistent)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- softlimit -p0 still allows exec'>)}) (command.CommandList children: [ (command.Sentence child: (C {(softlimit)} {(-p0)} {(echo)} {(./nonexistent)}) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- supervise starts, svok works, svup works, svstat works, svc -x works'>)}) (command.Sentence child:(C {(supervise)} {(test.sv)}) terminator:<Op_Amp '&'>) (command.WhileUntil keyword: <KW_Until until> cond: [(C {(svok)} {(test.sv)})] body: (command.DoGroup children:[(C {(sleep)} {(1)})]) ) (command.CommandList children: [ (command.Sentence child:(C {(svup)} {(test.sv)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {(svup)} {(-l)} {(test.sv)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {(svup)} {(-L)} {(test.sv)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(svstat)} {(test.sv)}) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(echo)} {($ VSub_QMark '$?')}) terminator: <Op_Semi ';'> ) ] ) ) (C {(filter_svstat)}) ] negated: F ) (command.CommandList children: [ (command.Sentence child:(C {(svc)} {(-x)} {(test.sv)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(wait)}) (command.CommandList children: [ (command.Sentence child:(C {(svstat)} {(test.sv)}) terminator:<Op_Semi ';'>) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(echo)} {(SQ <'--- svc -ox works'>)}) (command.Sentence child:(C {(supervise)} {(test.sv)}) terminator:<Op_Amp '&'>) (command.WhileUntil keyword: <KW_Until until> cond: [(C {(svok)} {(test.sv)})] body: (command.DoGroup children:[(C {(sleep)} {(1)})]) ) (C {(svc)} {(-ox)} {(test.sv)}) (C {(wait)}) (C {(echo)} {(SQ <'--- svstat and svup work for up services'>)}) (command.Simple words: [{(catexe)} {(test.sv/run)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2274 stdin_parts: [ ('#!/bin/sh\n') ('sleep 1\n') ('svstat .\n') ('echo ') ($ VSub_QMark '$?') ('\n') ('svstat -l .\n') ('echo ') ($ VSub_QMark '$?') ('\n') ('svstat -L .\n') ('echo ') ($ VSub_QMark '$?') ('\n') ('svup .\n') ('echo ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('?\n') ('svup -L .\n') ('echo ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('?\n') ('svup -l .\n') ('echo ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('?\n') ] ) ] ) (command.Sentence child: (command.Pipeline children: [(C {(supervise)} {(test.sv)}) (C {(filter_svstat)})] negated: F ) terminator: <Op_Amp '&'> ) (command.WhileUntil keyword: <KW_Until until> cond: [(C {(svok)} {(test.sv)})] body: (command.DoGroup children:[(C {(sleep)} {(1)})]) ) (C {(svc)} {(-ox)} {(test.sv)}) (C {(wait)}) (C {(echo)} {(SQ <'--- svstat and svup work for logged services'>)}) (command.Simple words: [{(catexe)} {(test.sv/run)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2349 stdin_parts: [ ('#!/bin/sh\n') ('sleep 1\n') ('svstat .\n') ('echo ') ($ VSub_QMark '$?') ('\n') ('svstat -l .\n') ('echo ') ($ VSub_QMark '$?') ('\n') ('svstat -L .\n') ('echo ') ($ VSub_QMark '$?') ('\n') ('svup .\n') ('echo ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('?\n') ('svup -L .\n') ('echo ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('?\n') ('svup -l .\n') ('echo ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('?\n') ] ) ] ) (command.Simple words: [{(catexe)} {(test.sv/log)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2360 stdin_parts: [('#!/bin/sh\n') ('exec cat\n')] ) ] ) (command.Sentence child: (command.Pipeline children: [(C {(supervise)} {(test.sv)}) (C {(filter_svstat)})] negated: F ) terminator: <Op_Amp '&'> ) (command.WhileUntil keyword: <KW_Until until> cond: [(C {(svok)} {(test.sv)})] body: (command.DoGroup children:[(C {(sleep)} {(1)})]) ) (C {(svc)} {(-Lolox)} {(test.sv)}) (C {(wait)}) (C {(rm)} {(-f)} {(test.sv/log)}) (C {(echo)} {(SQ <'--- svc -u works'>)}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(SQ <'#!/bin/sh'>)}) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(echo)} {(echo)} {(first)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(mv)} {(run2)} {(run)}) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.sv/run)})] ) (C {(chmod)} {(755)} {(test.sv/run)}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(SQ <'#!/bin/sh'>)}) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(echo)} {(echo)} {(second)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(svc)} {(-x)} {(.)}) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.sv/run2)})] ) (C {(chmod)} {(755)} {(test.sv/run2)}) (command.Sentence child:(C {(supervise)} {(test.sv)}) terminator:<Op_Amp '&'>) (command.WhileUntil keyword: <KW_Until until> cond: [(C {(svok)} {(test.sv)})] body: (command.DoGroup children:[(C {(sleep)} {(1)})]) ) (C {(svc)} {(-u)} {(test.sv)}) (C {(wait)}) (C {(echo)} {(SQ <'--- supervise runs stop on down'>)}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(SQ <'#!/bin/sh'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(svc)} {(-dx)} {(.)}) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.sv/run)})] ) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(SQ <'#!/bin/sh'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(echo)} {(KW_In in)} {(stop)}) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.sv/stop)})] ) (C {(rm)} {(-f)} {(test.sv/down)}) (C {(chmod)} {(Lit_Other '+') (x)} {(test.sv/run)} {(test.sv/stop)}) (command.Sentence child:(C {(supervise)} {(test.sv)}) terminator:<Op_Amp '&'>) (C {(wait)}) (C {(rm)} {(-f)} {(test.sv/stop)}) (C {(echo)}) (C {(echo)} {(SQ <'--- supervise stops log after main'>)}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(SQ <'#!/bin/sh'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(SQ <'exec ../../sleeper'>)}) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.sv/log)})] ) (C {(chmod)} {(Lit_Other '+') (x)} {(test.sv/log)}) (C {(supervise)} {(test.sv)}) (C {(wait)}) (C {(rm)} {(-f)} {(test.sv/log)}) (C {(echo)}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(SQ <'#!/bin/sh'>)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(SQ <'exec ../../sleeper'>)}) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.sv/run)})] ) (C {(chmod)} {(755)} {(test.sv/run)}) (C {(echo)} {(SQ <'--- svc sends right signals'>)}) (command.Sentence child:(C {(supervise)} {(test.sv)}) terminator:<Op_Amp '&'>) (C {(sleep)} {(1)}) (C {(svc)} {(-a)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-c)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-h)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-i)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-t)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-q)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-1)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-2)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-w)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-d)} {(test.sv)}) (C {(sleep)} {(1)}) (C {(svc)} {(-xk)} {(test.sv)}) (C {(wait)}) (C {(mkdir)} {(service)} {(svc0)} {(svc1)} {(svc2)} {(svc2/log)}) (command.Simple words: [{(catexe)} {(svc0/run)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2815 stdin_parts: [('#!/bin/sh\n') ('echo svc0 ran >> output\n')] ) ] ) (command.Simple words: [{(catexe)} {(svc1/run)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2827 stdin_parts: [('#!/bin/sh\n') ('echo svc1 ran\n')] ) ] ) (command.Simple words: [{(catexe)} {(svc1/log)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2839 stdin_parts: [('#!/bin/sh\n') ('cat > output\n')] ) ] ) (command.Simple words: [{(catexe)} {(svc2/run)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2851 stdin_parts: [('#!/bin/sh\n') ('echo svc2 ran\n')] ) ] ) (command.Simple words: [{(catexe)} {(svc2/log/run)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2863 stdin_parts: [('#!/bin/sh\n') ('cat > ../output\n')] ) ] ) (C {(ln)} {(-s)} { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children:[(C {(pwd)})]) ) (/svc) (Lit_LBracket '[') (0-9) (Lit_RBracket ']') } {(service/)} ) (command.Sentence child: (command.Simple words: [ {(svscan)} { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children:[(C {(pwd)})]) ) (/service) } ] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(svscan.log)}) (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) terminator: <Op_Amp '&'> ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:svscanpid) op:Equal rhs:{($ VSub_Bang '$!')})] ) (command.WhileUntil keyword: <KW_Until until> cond: [ (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(svok)} {(svc0)}) (C {(svok)} {(svc1)}) (C {(svok)} {(svc2)}) (C {(svok)} {(svc2/log)}) ] ) ] body: (command.DoGroup children:[(C {(sleep)} {(1)})]) ) (C {(kill)} {($ VSub_DollarName '$svscanpid')}) (command.Simple words: [{(wait)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) (C {(svc)} {(-dx)} {(Lit_ArrayLhsOpen 'svc[') (0-9) (Lit_RBracket ']')} {(svc2/log)}) (command.WhileUntil keyword: <KW_Until until> cond: [ (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (command.Pipeline children:[(C {(svok)} {(svc0)})] negated:T) (command.Pipeline children:[(C {(svok)} {(svc1)})] negated:T) (command.Pipeline children:[(C {(svok)} {(svc2)})] negated:T) (command.Pipeline children:[(C {(svok)} {(svc2/log)})] negated:T) ] ) ] body: (command.DoGroup children:[(C {(sleep)} {(1)})]) ) (C {(head)} {(-n)} {(1)} {(Lit_ArrayLhsOpen 'svc[') (0-9) (Lit_RBracket ']') (/output)}) (C {(cat)} {(svscan.log)}) (C {(rm)} {(-r)} {(svc0)} {(svc1)} {(svc2)} {(service)}) (C {(echo)} {(SQ <'--- tai64n has the right format'>)}) (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child:(C {(echo)} {(ONE)}) terminator:<Op_Semi ';'>) (C {(echo)} {(TWO)}) ] ) ) (C {(tai64n)}) (C {(sed)} {(SQ <'s/[0-9a-f]/x/g'>)}) ] negated: F ) (C {(echo)} {(SQ <'--- tai64nlocal handles non-@ lines correctly'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(echo)} {(one)}) terminator: <Op_Semi ';'> ) (C {(echo)} {(two)}) ] ) ) (C {(tai64nlocal)}) ] negated: F ) terminator: <Op_Semi ';'> ) (C {(echo)} {($ VSub_QMark '$?')}) ] ) (C {(cd)} {(..)}) (C {(rm)} {(-rf)} {(rts-tmp)}) ] )