(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>})) <Id.Lit_Colon ':'> <'/command'> <Id.Lit_Colon ':'> <'/usr/local/bin'> <Id.Lit_Colon ':'> <'/usr/local/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> <'/sbin'> <Id.Lit_Colon ':'> <'/usr/bin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/usr/X11R6/bin'> <Id.Lit_Colon ':'> <'/usr/ucb'> } spids: [0] ) ] ) (C {<export>} {<PATH>}) (C {<umask>} {<022>}) (command.ShFunction name: die body: (BraceGroup children: [ (C {<echo>} {(DQ ($ Id.VSub_At '$@'))}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: catexe body: (BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_Number '$1')} ) ] do_fork: T ) (C {<chmod>} {<Id.Lit_Other '+'> <x>} {($ Id.VSub_Number '$1')}) ] ) ) (command.ShFunction name: filter_svstat body: (BraceGroup children: [ (C {<sed>} {<-e>} {(SQ <'s/[0-9]* seconds/x seconds/'>)} {<-e>} {(SQ <'s/pid [0-9]*/pid x/'>)}) ] ) ) (command.AndOr ops: [Id.Op_DPipe] children: [(C {<rm>} {<-rf>} {<rts-tmp>}) (C {<die>} {(DQ <'Could not clean up old rts-tmp'>)})] ) (command.AndOr ops: [Id.Op_DPipe] children: [(C {<mkdir>} {<rts-tmp>}) (C {<die>} {(DQ <'Could not create new rts-tmp'>)})] ) (command.AndOr ops: [Id.Op_DPipe] children: [(C {<cd>} {<rts-tmp>}) (C {<die>} {(DQ <'Could not change to rts-tmp'>)})] ) (command.AndOr ops: [Id.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: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>}))} spids: [154] ) ] ) (C {<echo>} {(SQ <'--- envdir requires arguments'>)}) (command.CommandList children: [ (command.Sentence child:(C {<envdir>} {<whatever>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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 op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'env1/Message'>})] do_fork: T ) (command.CommandList children: [ (command.Sentence child: (C {<envdir>} {<env1>} {<sh>} {<-c>} {(SQ <'echo $Message'>)}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- envuidgid insists on two arguments'>)}) (command.CommandList children: [ (command.Sentence child:(C {<envuidgid>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {<envuidgid>} {<root>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- envuidgid sets UID=0 for root'>)}) (command.CommandList children: [ (command.Sentence child: (C {<envuidgid>} {<root>} {<printenv>} {<UID>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- envuidgid complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child: (C {<envuidgid>} {<root>} {<'./nonexistent'>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- fghack insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child:(C {<fghack>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- fghack complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child:(C {<fghack>} {<'./nonexistent'>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- fghack runs a program'>)}) (command.CommandList children: [ (command.Sentence child: (C {<fghack>} {<sh>} {<-c>} {(SQ <'echo hi &'>)}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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 child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (C {<multilog>}) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- multilog e prints to stderr'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (command.Simple words: [{<multilog>} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- multilog inserts newline after partial final line'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (command.Pipeline children: [(C {<echo>} {<two>}) (C {<tr>} {<-d>} {(SQ <'\\012'>)})] negated: F ) ] ) ) (command.Simple words: [{<multilog>} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- multilog handles multiple actions'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (command.Simple words: [{<multilog>} {<e>} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- multilog handles wildcard -'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (command.Simple words: [{<multilog>} {(SQ <'-*'>)} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- multilog handles literal +'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (command.Simple words: [{<multilog>} {(SQ <'-*'>)} {(SQ <'+one'>)} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- multilog handles fnmatch -'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (command.Simple words: [{<multilog>} {<F>} {(SQ <'-*'>)} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- multilog handles fnmatch +'>)}) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<echo>} {<two>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<one>} {<two>}) ] ) ) (command.Simple words: [{<multilog>} {<F>} {(SQ <'-*'>)} {(SQ <'+*o*'>)} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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 op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (C {<echo>} { < 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 > } ) (command.Simple words: [{<multilog>} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child: (command.Pipeline children: [ (C {<echo>} { < 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 > } ) (command.Simple words: [{<multilog>} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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 child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (C {<multilog>} {<Id.Lit_Equals '='> <test.status>}) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.Pipeline children: [ (command.Simple words: [{<uniq>} {<-c>}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<test.status>})] do_fork: T ) (C {<sed>} {(SQ <'s/[ \t]*[ \t]/_/g'>)}) ] negated: F ) (C {<echo>} {(SQ <'--- multilog t has the right format'>)}) (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<ONE>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<TWO>}) ] ) ) (command.Simple words: [{<multilog>} {<t>} {<e>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) (C {<sed>} {(SQ <'s/[0-9a-f]/x/g'>)}) ] negated: F ) (C {<echo>} {(SQ <'--- svstat handles new and nonexistent directories'>)}) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {(SQ <'#!/bin/sh'>)}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<echo>} {<hi>}) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- svc handles new and nonexistent directories'>)}) (command.CommandList children: [ (command.Sentence child: (C {<svc>} {<test.sv>} {<nonexistent>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- svok handles new and nonexistent directories'>)}) (command.CommandList children: [ (command.Sentence child:(C {<svok>} {<test.sv>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {<svok>} {<nonexistent>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- supervise handles nonexistent directories'>)}) (command.CommandList children: [ (command.Sentence child:(C {<supervise>} {<nonexistent>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- pgrphack insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child:(C {<pgrphack>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- pgrphack complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child: (C {<pgrphack>} {<'./nonexistent'>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- pgrphack runs a program'>)}) (command.CommandList children: [ (command.Sentence child:(C {<pgrphack>} {<echo>} {<ok>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- readproctitle insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<readproctitle>}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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 op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- setlock requires arguments'>)}) (command.CommandList children: [ (command.Sentence child:(C {<setlock>} {<whatever>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- setlock creates lock file'>)}) (command.CommandList children: [ (command.Sentence child: (C {<setlock>} {<lock>} {<echo>} {<ok>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- setlock does not truncate lock file'>)}) (command.Simple words: [{<echo>} {<ok>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<lock>})] do_fork: T ) (command.CommandList children: [ (command.Sentence child: (C {<setlock>} {<lock>} {<cat>} {<lock>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.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: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- softlimit insists on an argument'>)}) (command.CommandList children: [ (command.Sentence child:(C {<softlimit>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- softlimit complains if it cannot run program'>)}) (command.CommandList children: [ (command.Sentence child: (C {<softlimit>} {<'./nonexistent'>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- softlimit -p0 still allows exec'>)}) (command.CommandList children: [ (command.Sentence child: (C {<softlimit>} {<-p0>} {<echo>} {<'./nonexistent'>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- supervise starts, svok works, svup works, svstat works, svc -x works'>)}) (command.Sentence child:(C {<supervise>} {<test.sv>}) terminator:<Id.Op_Amp _>) (command.WhileUntil keyword: <Id.KW_Until until> cond: (condition.Shell commands:[(C {<svok>} {<test.sv>})]) body: (command.DoGroup children:[(C {<sleep>} {<1>})]) ) (command.CommandList children: [ (command.Sentence child:(C {<svup>} {<test.sv>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {<svup>} {<-l>} {<test.sv>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.CommandList children: [ (command.Sentence child:(C {<svup>} {<-L>} {<test.sv>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<svstat>} {<test.sv>}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<echo>} {($ Id.VSub_QMark '$?')}) terminator: <Id.Op_Semi _> ) ] ) ) (C {<filter_svstat>}) ] negated: F ) (command.CommandList children: [ (command.Sentence child:(C {<svc>} {<-x>} {<test.sv>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<wait>}) (command.CommandList children: [ (command.Sentence child:(C {<svstat>} {<test.sv>}) terminator:<Id.Op_Semi _>) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<echo>} {(SQ <'--- svc -ox works'>)}) (command.Sentence child:(C {<supervise>} {<test.sv>}) terminator:<Id.Op_Amp _>) (command.WhileUntil keyword: <Id.KW_Until until> cond: (condition.Shell commands:[(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 op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2274 stdin_parts: [ <'#!/bin/sh\n'> <'sleep 1\n'> <'svstat .\n'> <'echo '> ($ Id.VSub_QMark '$?') <'\n'> <'svstat -l .\n'> <'echo '> ($ Id.VSub_QMark '$?') <'\n'> <'svstat -L .\n'> <'echo '> ($ Id.VSub_QMark '$?') <'\n'> <'svup .\n'> <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'?\n'> <'svup -L .\n'> <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'?\n'> <'svup -l .\n'> <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'?\n'> ] ) ) ] do_fork: T ) (command.Sentence child: (command.Pipeline children: [(C {<supervise>} {<test.sv>}) (C {<filter_svstat>})] negated: F ) terminator: <Id.Op_Amp _> ) (command.WhileUntil keyword: <Id.KW_Until until> cond: (condition.Shell commands:[(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 op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2349 stdin_parts: [ <'#!/bin/sh\n'> <'sleep 1\n'> <'svstat .\n'> <'echo '> ($ Id.VSub_QMark '$?') <'\n'> <'svstat -l .\n'> <'echo '> ($ Id.VSub_QMark '$?') <'\n'> <'svstat -L .\n'> <'echo '> ($ Id.VSub_QMark '$?') <'\n'> <'svup .\n'> <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'?\n'> <'svup -L .\n'> <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'?\n'> <'svup -l .\n'> <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'?\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<catexe>} {<'test.sv/log'>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2360 stdin_parts: [<'#!/bin/sh\n'> <'exec cat\n'>] ) ) ] do_fork: T ) (command.Sentence child: (command.Pipeline children: [(C {<supervise>} {<test.sv>}) (C {<filter_svstat>})] negated: F ) terminator: <Id.Op_Amp _> ) (command.WhileUntil keyword: <Id.KW_Until until> cond: (condition.Shell commands:[(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 child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {(SQ <'#!/bin/sh'>)}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<echo>} {<echo>} {<first>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<mv>} {<run2>} {<run>}) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'test.sv/run'>})] ) (C {<chmod>} {<755>} {<'test.sv/run'>}) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {(SQ <'#!/bin/sh'>)}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<echo>} {<echo>} {<second>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<svc>} {<-x>} {<.>}) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'test.sv/run2'>})] ) (C {<chmod>} {<755>} {<'test.sv/run2'>}) (command.Sentence child:(C {<supervise>} {<test.sv>}) terminator:<Id.Op_Amp _>) (command.WhileUntil keyword: <Id.KW_Until until> cond: (condition.Shell commands:[(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 child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {(SQ <'#!/bin/sh'>)}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<svc>} {<-dx>} {<.>}) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'test.sv/run'>})] ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {(SQ <'#!/bin/sh'>)}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<echo>} {<Id.KW_In in>} {<stop>}) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'test.sv/stop'>})] ) (C {<rm>} {<-f>} {<'test.sv/down'>}) (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<'test.sv/run'>} {<'test.sv/stop'>}) (command.Sentence child:(C {<supervise>} {<test.sv>}) terminator:<Id.Op_Amp _>) (C {<wait>}) (C {<rm>} {<-f>} {<'test.sv/stop'>}) (C {<echo>}) (C {<echo>} {(SQ <'--- supervise stops log after main'>)}) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {(SQ <'#!/bin/sh'>)}) terminator: <Id.Op_Semi _> ) (C {<echo>} {(SQ <'exec ../../sleeper'>)}) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'test.sv/log'>})] ) (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<'test.sv/log'>}) (C {<supervise>} {<test.sv>}) (C {<wait>}) (C {<rm>} {<-f>} {<'test.sv/log'>}) (C {<echo>}) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {(SQ <'#!/bin/sh'>)}) terminator: <Id.Op_Semi _> ) (C {<echo>} {(SQ <'exec ../../sleeper'>)}) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'test.sv/run'>})] ) (C {<chmod>} {<755>} {<'test.sv/run'>}) (C {<echo>} {(SQ <'--- svc sends right signals'>)}) (command.Sentence child:(C {<supervise>} {<test.sv>}) terminator:<Id.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 op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2815 stdin_parts: [<'#!/bin/sh\n'> <'echo svc0 ran >> output\n'>] ) ) ] do_fork: T ) (command.Simple words: [{<catexe>} {<'svc1/run'>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2827 stdin_parts: [<'#!/bin/sh\n'> <'echo svc1 ran\n'>] ) ) ] do_fork: T ) (command.Simple words: [{<catexe>} {<'svc1/log'>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2839 stdin_parts: [<'#!/bin/sh\n'> <'cat > output\n'>] ) ) ] do_fork: T ) (command.Simple words: [{<catexe>} {<'svc2/run'>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2851 stdin_parts: [<'#!/bin/sh\n'> <'echo svc2 ran\n'>] ) ) ] do_fork: T ) (command.Simple words: [{<catexe>} {<'svc2/log/run'>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2863 stdin_parts: [<'#!/bin/sh\n'> <'cat > ../output\n'>] ) ) ] do_fork: T ) (C {<ln>} {<-s>} {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>})) <'/svc'> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> } {<'service/'>} ) (command.Sentence child: (command.Simple words: [ {<svscan>} {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>})) <'/service'>} ] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<svscan.log>}) (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>}) ] do_fork: T ) terminator: <Id.Op_Amp _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:svscanpid) op: assign_op.Equal rhs: {($ Id.VSub_Bang '$!')} spids: [2899] ) ] ) (command.WhileUntil keyword: <Id.KW_Until until> cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.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>} {($ Id.VSub_DollarName '$svscanpid')}) (command.Simple words: [{<wait>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>}) (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>}) ] do_fork: T ) (C {<svc>} {<-dx>} {<Id.Lit_ArrayLhsOpen 'svc['> <0-9> <Id.Lit_RBracket ']'>} {<'svc2/log'>}) (command.WhileUntil keyword: <Id.KW_Until until> cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.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>} {<Id.Lit_ArrayLhsOpen 'svc['> <0-9> <Id.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 child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<ONE>}) terminator: <Id.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 child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {<one>}) terminator: <Id.Op_Semi _> ) (C {<echo>} {<two>}) ] ) ) (C {<tai64nlocal>}) ] negated: F ) terminator: <Id.Op_Semi _> ) (C {<echo>} {($ Id.VSub_QMark '$?')}) ] ) (C {<cd>} {<..>}) (C {<rm>} {<-rf>} {<rts-tmp>}) ] )