(command.CommandList children: [ (command.ShFunction name: tester body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prog='> name:prog) op: assign_op.Equal rhs: {(${ Id.VSub_Number 1)} spids: [51] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pattern='> name:pattern) op: assign_op.Equal rhs: {(${ Id.VSub_Number 2)} spids: [57] ) ] redirects: [] ) (command.Sentence child: (command.Simple words: [{<'./'> ($ Id.VSub_DollarName prog)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) terminator: <Id.Op_Amp _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pid='> name:pid) op: assign_op.Equal rhs: {($ Id.VSub_Bang '!')} spids: [73] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Subshell child: (command.Pipeline children: [ (C {<'/usr/bin/amd64/pstack'>} {($ Id.VSub_DollarName pid)}) (C {<'/usr/xpg4/bin/grep'>} {<-q>} {(DQ (${ Id.VSub_Name pattern))}) ] negated: F stderr_indices: [] ) redirects: [] ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<echo>} {(DQ <'pass: '> (${ Id.VSub_Name prog))})] spids: [77 98] ) ] else_action: [(C {<echo>} {(DQ <'FAIL: '> (${ Id.VSub_Name prog))})] redirects: [] ) (C {<kill>} {($ Id.VSub_DollarName pid)}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<tester>} {<align>} {(DQ <'test (1, 2, 3, 4, 5)'>)}) (C {<tester>} {<basic>} {(DQ <'test (1, 2, 3, 4)'>)}) (C {<tester>} {<big-struct-ret>} {(DQ <'test (1, 2, 3, 4)'>)}) (C {<tester>} {<big-struct-ret-and-spill>} {(DQ <'test (1, 2, 3, 4, 5, 6, 7, 8)'>)}) (C {<tester>} {<small-struct-ret>} {(DQ <'test (1, 2, 3, 4)'>)}) (C {<tester>} {<small-struct-ret-and-spill>} {(DQ <'test (1, 2, 3, 4, 5, 6, 7, 8)'>)}) (C {<tester>} {<stack-spill>} {(DQ <'test (1, 2, 3, 4, 5, 6, 7, 8)'>)}) ] )