(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tid) op: Equal rhs: {(DQ ('agent timeout test'))} spids: [7] ) ] spids: [7] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SSHAGENT_TIMEOUT) op:Equal rhs:{(10)} spids:[13])] spids: [13] ) (C {(trace)} {(DQ ('start agent'))}) (SimpleCommand words: [ {(eval)} { (CommandSubPart command_list: (CommandList children:[(C {(${ VSub_Name SSHAGENT)} {(-s)})]) left_token: <Left_Backtick '`'> spids: [25 31] ) } ] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[33])] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:r) op:Equal rhs:{($ VSub_QMark '$?')} spids:[37])] spids: [37] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$r')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(fail)} {(DQ ('could not start ssh-agent: exit code ') ($ VSub_Name '$r'))})] spids: [16777215 53] ) ] else_action: [ (C {(trace)} {(DQ ('add keys with timeout'))}) (ForEach iter_name: t iter_words: [{(${ VSub_Name SSH_KEYTYPES)}] do_arg_iter: False body: (DoGroup children: [ (SimpleCommand words: [ {(${ VSub_Name SSHADD)} {(-t)} {(${ VSub_Name SSHAGENT_TIMEOUT)} {($ VSub_Name '$OBJ') (/) ($ VSub_Name '$t')} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [101] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[105]) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(fail)} {(DQ ('ssh-add did succeed exit code 0'))})] spids: [16777215 122] ) ] spids: [16777215 132] ) ] spids: [84 135] ) spids: [78 82] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:n) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [{(${ VSub_Name SSHADD)} {(-l)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [146] ) ] ) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [139 155] ) } spids: [138] ) ] spids: [138] ) (C {(trace)} {(DQ ('agent has ') ($ VSub_Name '$n') (' keys'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$n')} {(-ne)} {(2)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(fail)} {(DQ ('ssh-add -l did not return 2 keys: ') ($ VSub_Name '$n'))})] spids: [16777215 180] ) ] spids: [16777215 191] ) (C {(trace)} {(DQ ('sleeping 2*') (${ VSub_Name SSHAGENT_TIMEOUT) (' seconds'))}) (C {(sleep)} {(${ VSub_Name SSHAGENT_TIMEOUT)}) (C {(sleep)} {(${ VSub_Name SSHAGENT_TIMEOUT)}) (Pipeline children: [ (SimpleCommand words: [{(${ VSub_Name SSHADD)} {(-l)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[225])] ) (SimpleCommand words: [{(grep)} {(SQ <'The agent has no identities.'>)}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[237])] ) ] negated: False ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(fail)} {(DQ ('ssh-add -l still returns keys after timeout'))})] spids: [16777215 254] ) ] spids: [16777215 264] ) (C {(trace)} {(DQ ('kill agent'))}) (SimpleCommand words: [{(${ VSub_Name SSHAGENT)} {(-k)}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[281])] ) ] spids: [63 285] ) ] )