(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MODULE_NAME) op: assign_op.Equal rhs: {<udelay_test>} spids: [53] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UDELAY_PATH) op: assign_op.Equal rhs: {<'/sys/kernel/debug/udelay_test'>} spids: [56] ) ] ) (command.ShFunction name: setup body: (BraceGroup children: [ (C {<'/sbin/modprobe'>} {<-q>} {($ Id.VSub_DollarName '$MODULE_NAME')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp_file) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<mktemp>}))} spids: [74] ) ] ) ] ) ) (command.ShFunction name: test_one body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:delay) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [91] ) ] ) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$delay')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$UDELAY_PATH')} ) ] do_fork: T ) (command.Simple words: [{<tee>} {<-a>} {($ Id.VSub_DollarName '$tmp_file')}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {($ Id.VSub_DollarName '$UDELAY_PATH')} ) ] do_fork: T ) ] ) ) (command.ShFunction name: cleanup body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName '$tmp_file')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<rm>} {($ Id.VSub_DollarName '$tmp_file')})] spids: [124 135] ) ] ) (C {<'/sbin/modprobe'>} {<-q>} {<-r>} {($ Id.VSub_DollarName '$MODULE_NAME')}) ] ) ) (C {<trap>} {<cleanup>} {<EXIT>}) (C {<setup>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 1>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 200>} ) update: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 1>} ) body: (command.DoGroup children:[(C {<test_one>} {($ Id.VSub_DollarName '$delay')})]) ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 200>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 500>} ) update: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 10>} ) body: (command.DoGroup children:[(C {<test_one>} {($ Id.VSub_DollarName '$delay')})]) ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 500>} ) cond: (arith_expr.Binary op_id: Id.Arith_LessEqual left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 2000>} ) update: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: <Id.Lit_ArithVarLike delay> right: {<Id.Lit_Digits 100>} ) body: (command.DoGroup children:[(C {<test_one>} {($ Id.VSub_DollarName '$delay')})]) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:count) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<grep>} {<-c>} {<FAIL>} {($ Id.VSub_DollarName '$tmp_file')}) ) } spids: [287] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {(DQ <0>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'ERROR: '> ($ Id.VSub_DollarName '$count') <' delays failed to delay long enough'>) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:retcode) op: assign_op.Equal rhs: {<1>} spids: [327] ) ] ) ] spids: [300 315] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$retcode')} ) ] )