(command.CommandList children: [ (C {<atf_test_case>} {<info_ok>}) (command.ShFunction name: info_ok_head body: (BraceGroup children: [ (C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_check prints an informative'>)} {(DQ <'message even when the command is successful'>)} ) ] ) ) (command.ShFunction name: info_ok_body body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:h) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>})) ) } spids: [113] ) ] ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} {<save> <Id.Lit_Colon ':'> <stdout>} {<-e>} {<save> <Id.Lit_Colon ':'> <stderr>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_info_ok'>)} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'Executing command.*true'>)} {<stdout>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print an informative message'>)}) ] ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} {<save> <Id.Lit_Colon ':'> <stdout>} {<-e>} {<save> <Id.Lit_Colon ':'> <stderr>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_info_fail'>)} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'Executing command.*false'>)} {<stdout>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print an informative message'>)}) ] ) ] ) ) (C {<atf_test_case>} {<expout_mismatch>}) (command.ShFunction name: expout_mismatch_head body: (BraceGroup children: [ (C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_check prints a diff of the'>)} {(DQ <'stdout and the expected stdout if the two do not'>)} {(DQ <match>)} ) ] ) ) (command.ShFunction name: expout_mismatch_body body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:h) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>})) ) } spids: [279] ) ] ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <1>} {<-o>} {<save> <Id.Lit_Colon ':'> <stdout>} {<-e>} {<save> <Id.Lit_Colon ':'> <stderr>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_expout_mismatch'>)} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'Executing command.*echo bar'>)} {<stdout>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print an informative message'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'stdout does not match golden output'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stdout header'>)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<grep>} {(SQ <stderr>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check prints the stderr header'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'^-foo'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stdout\'s diff'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'^+bar'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stdout\'s diff'>)}) ] ) ] ) ) (C {<atf_test_case>} {<experr_mismatch>}) (command.ShFunction name: experr_mismatch_head body: (BraceGroup children: [ (C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_check prints a diff of the'>)} {(DQ <'stderr and the expected stderr if the two do not'>)} {(DQ <match>)} ) ] ) ) (command.ShFunction name: experr_mismatch_body body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:h) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>})) ) } spids: [478] ) ] ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <1>} {<-o>} {<save> <Id.Lit_Colon ':'> <stdout>} {<-e>} {<save> <Id.Lit_Colon ':'> <stderr>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_experr_mismatch'>)} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'Executing command.*echo bar'>)} {<stdout>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print an informative message'>)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<grep>} {(SQ <stdout>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check prints the stdout header'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'stderr does not match golden output'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stderr header'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'^-foo'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stderr\'s diff'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'^+bar'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stderr\'s diff'>)}) ] ) ] ) ) (C {<atf_test_case>} {<null_stdout>}) (command.ShFunction name: null_stdout_head body: (BraceGroup children: [ (C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_check prints a the stdout it got'>)} {(DQ <'when it was supposed to be null'>)} ) ] ) ) (command.ShFunction name: null_stdout_body body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:h) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>})) ) } spids: [671] ) ] ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <1>} {<-o>} {<save> <Id.Lit_Colon ':'> <stdout>} {<-e>} {<save> <Id.Lit_Colon ':'> <stderr>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_null_stdout'>)} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'Executing command.*echo.*These.*contents'>)} {<stdout>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print an informative message'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'stdout not empty'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stdout header'>)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<grep>} {(SQ <stderr>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check prints the stderr header'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'These are the contents'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print stdout\'s contents'>)}) ] ) ] ) ) (C {<atf_test_case>} {<null_stderr>}) (command.ShFunction name: null_stderr_head body: (BraceGroup children: [ (C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_check prints a the stderr it got'>)} {(DQ <'when it was supposed to be null'>)} ) ] ) ) (command.ShFunction name: null_stderr_body body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:h) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>})) ) } spids: [842] ) ] ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <1>} {<-o>} {<save> <Id.Lit_Colon ':'> <stdout>} {<-e>} {<save> <Id.Lit_Colon ':'> <stderr>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_null_stderr'>)} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'Executing command.*echo.*These.*contents'>)} {<stdout>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print an informative message'>)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<grep>} {(SQ <stdout>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check prints the stdout header'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'stderr not empty'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print the stderr header'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<grep>} {(SQ <'These are the contents'>)} {<stderr>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<atf_fail>} {(DQ <'atf_check does not print stderr\'s contents'>)}) ] ) ] ) ) (C {<atf_test_case>} {<equal>}) (command.ShFunction name: equal_head body: (BraceGroup children: [(C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_check_equal works'>)})] ) ) (command.ShFunction name: equal_body body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:h) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>})) ) } spids: [1007] ) ] ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<-e>} {<ignore>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_equal_ok'>)} ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <1>} {<-o>} {<ignore>} {<-e>} {<ignore>} {<-x>} {(DQ (${ Id.VSub_Name h) <' -r resfile atf_check_equal_fail'>)} ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<-e>} {<empty>} {<grep>} {(SQ <'^failed: a != b (a != b)$'>)} {<resfile>} ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<-e>} {<ignore>} {<-x>} {(DQ (${ Id.VSub_Name h) <' atf_check_equal_eval_ok'>)} ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <1>} {<-o>} {<ignore>} {<-e>} {<ignore>} {<-x>} {(DQ (${ Id.VSub_Name h) <' -r resfile atf_check_equal_eval_fail'>)} ) (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<-e>} {<empty>} {<grep>} {(SQ <'^failed: \\${x} != \\${y} (a != b)$'>)} {<resfile>} ) ] ) ) (C {<atf_test_case>} {<flush_stdout_on_death>}) (command.ShFunction name: flush_stdout_on_death_body body: (BraceGroup children: [ (command.Sentence child: (command.Simple words: [ { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) <'/misc_helpers'> ) } {<-s>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<atf_get_srcdir>}) ) ) } {<atf_check_flush_stdout>} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<out>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<err>} ) ] more_env: [ (env_pair name: CONTROL_FILE val: { (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>})) <'/done'> ) } spids: [1198] ) ] do_fork: T ) terminator: <Id.Op_Amp _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pid) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Bang '!'))} spids: [1234] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {<'./done'>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] body: (command.DoGroup children: [ (C {<echo>} {(DQ <'Still waiting for helper to create control file'>)}) (C {<ls>}) (C {<sleep>} {<1>}) ] ) ) (C {<kill>} {<-9>} {(DQ (${ Id.VSub_Name pid))}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<grep>} {(SQ <'Executing command.*true'>)} {<out>}) (C {<atf_fail>} {(SQ <'First command not in output'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<grep>} {(SQ <'Executing command.*false'>)} {<out>}) (C {<atf_fail>} {(SQ <'Second command not in output'>)}) ] ) ] ) ) (command.ShFunction name: atf_init_test_cases body: (BraceGroup children: [ (C {<atf_add_test_case>} {<info_ok>}) (C {<atf_add_test_case>} {<expout_mismatch>}) (C {<atf_add_test_case>} {<experr_mismatch>}) (C {<atf_add_test_case>} {<null_stdout>}) (C {<atf_add_test_case>} {<null_stderr>}) (C {<atf_add_test_case>} {<equal>}) (C {<atf_add_test_case>} {<flush_stdout_on_death>}) ] ) ) ] )