(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SOCKLOCAL)
          op: assign_op.Equal
          rhs: {<unix> <Id.Lit_Colon ':'> <'//commsock1'>}
          spids: [79]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SOCKPEER)
          op: assign_op.Equal
          rhs: {<unix> <Id.Lit_Colon ':'> <'//commsock2'>}
          spids: [84]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DEBUG)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: <Id.VSub_Name DEBUG>
                suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<false>})
              )
            }
          spids: [90]
        )
      ]
    )
    (C {<atf_test_case>} {<dad_basic>} {<cleanup>})
    (C {<atf_test_case>} {<dad_duplicated>} {<cleanup>})
    (command.ShFunction
      name: dad_basic_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for IPv4 DAD basic behavior'>)})
            (C {<atf_set>} {(DQ <require.progs>)} {(DQ <rump_server>)})
          ]
        )
    )
    (command.ShFunction
      name: dad_duplicated_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for IPv4 DAD duplicated state'>)})
            (C {<atf_set>} {(DQ <require.progs>)} {(DQ <rump_server>)})
          ]
        )
    )
    (command.ShFunction
      name: setup_server
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'sock='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'ip='> ($ Id.VSub_Number '$2')})
            (C {<rump_server_add_iface>} {($ Id.VSub_DollarName '$sock')} {<shmif0>} {<bus1>})
            (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$sock')})
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<inet>} {($ Id.VSub_DollarName '$ip') <'/24'>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<up>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<-w>} {<10>}
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.ifconfig>} {<shmif0>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: make_pkt_str
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'target='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'sender='> ($ Id.VSub_Number '$2')})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pkt)
                  op: assign_op.Equal
                  rhs: {(DQ <'> ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42:'>)}
                  spids: [288]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pkt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName '$pkt') <' Request who-has '> 
                        ($ Id.VSub_DollarName '$target') <' tell '> ($ Id.VSub_DollarName '$sender') <', length 28'>
                      )
                    }
                  spids: [294]
                )
              ]
            )
            (C {<echo>} {($ Id.VSub_DollarName '$pkt')})
          ]
        )
    )
    (command.ShFunction
      name: dad_basic_body
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'pkt='>})
            (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCKLOCAL')})
            (C {<rump_server_add_iface>} {($ Id.VSub_DollarName '$SOCKLOCAL')} {<shmif0>} {<bus1>})
            (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCKLOCAL')})
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<inet>} {<'10.0.0.1/24'>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<inet>} {<'10.0.0.2/24'>} {<alias>}
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.ifconfig>} {<shmif0>})]
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<up>}
            )
            (command.Simple
              words: [{<rump.ifconfig>} {<shmif0>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'./out'>})]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<cat>} {<'./out'>})]
            )
            (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'cat ./out |grep 10.0.0.1 |grep -iq tentative'>)}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<sleep>} {<2>})
            (command.Simple
              words: [{<extract_new_packets>} {<bus1>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'./out'>})]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<cat>} {<'./out'>})]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pkt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<make_pkt_str>} {<10.0.0.2>} {<0.0.0.0>})
                      )
                    }
                  spids: [495]
                )
              ]
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'cat ./out |grep -q \''> ($ Id.VSub_DollarName '$pkt') <'\''>)}
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pkt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<make_pkt_str>} {<10.0.0.1>} {<0.0.0.0>})
                      )
                    }
                  spids: [526]
                )
              ]
            )
            (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'cat ./out |grep -q \''> ($ Id.VSub_DollarName '$pkt') <'\''>)}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<-w>} {<10>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<sleep>} {<1>})
            (command.Simple
              words: [{<extract_new_packets>} {<bus1>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'./out'>})]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<cat>} {<'./out'>})]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pkt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<make_pkt_str>} {<10.0.0.2>} {<10.0.0.2>})
                      )
                    }
                  spids: [613]
                )
              ]
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'cat ./out |grep -q \''> ($ Id.VSub_DollarName '$pkt') <'\''>)}
            )
            (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'rump.ifconfig shmif0 |grep 10.0.0.2 |grep -iq tentative'>)}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<inet>} {<'10.0.0.3/24'>} {<alias>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<sleep>} {<2>})
            (command.Simple
              words: [{<extract_new_packets>} {<bus1>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'./out'>})]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<cat>} {<'./out'>})]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pkt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<make_pkt_str>} {<10.0.0.3>} {<0.0.0.0>})
                      )
                    }
                  spids: [740]
                )
              ]
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'cat ./out |grep -q \''> ($ Id.VSub_DollarName '$pkt') <'\''>)}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<-w>} {<10>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<sleep>} {<1>})
            (command.Simple
              words: [{<extract_new_packets>} {<bus1>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'./out'>})]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<cat>} {<'./out'>})]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pkt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<make_pkt_str>} {<10.0.0.3>} {<10.0.0.3>})
                      )
                    }
                  spids: [827]
                )
              ]
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'cat ./out |grep -q \''> ($ Id.VSub_DollarName '$pkt') <'\''>)}
            )
            (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {(DQ <'rump.ifconfig shmif0 |grep 10.0.0.3 |grep -iq tentative'>)}
            )
            (C {<rump_server_destroy_ifaces>})
          ]
        )
    )
    (command.ShFunction
      name: dad_duplicated_body
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'localip1='> <10.0.1.1>})
            (C {<local>} {<Id.Lit_VarLike 'localip2='> <10.0.1.11>})
            (C {<local>} {<Id.Lit_VarLike 'peerip='> <10.0.1.2>})
            (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCKLOCAL')})
            (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCKPEER')})
            (C {<setup_server>} {($ Id.VSub_DollarName '$SOCKLOCAL')} 
              {($ Id.VSub_DollarName '$localip1')}
            )
            (C {<setup_server>} {($ Id.VSub_DollarName '$SOCKPEER')} {($ Id.VSub_DollarName '$peerip')})
            (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCKLOCAL')})
            (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {
                (DQ <'rump.ifconfig shmif0 |grep '> ($ Id.VSub_DollarName '$localip1') 
                  <' |grep -iq duplicated'>
                )
              }
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<inet>} {($ Id.VSub_DollarName '$peerip')} {<alias>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<sleep>} {<1>})
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {
                (DQ <'rump.ifconfig shmif0 |grep '> ($ Id.VSub_DollarName '$peerip') 
                  <' |grep -iq duplicated'>
                )
              }
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} 
              {<shmif0>} {<inet>} {($ Id.VSub_DollarName '$localip2')} {<alias>}
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<sleep>} {<1>})
            (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} 
              {
                (DQ <'rump.ifconfig shmif0 |grep '> ($ Id.VSub_DollarName '$localip2') 
                  <' |grep -iq duplicated'>
                )
              }
            )
            (C {<rump_server_destroy_ifaces>})
          ]
        )
    )
    (command.ShFunction
      name: dad_basic_cleanup
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<dump>})]
            )
            (C {<cleanup>})
          ]
        )
    )
    (command.ShFunction
      name: dad_duplicated_cleanup
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<dump>})]
            )
            (C {<cleanup>})
          ]
        )
    )
    (command.ShFunction
      name: atf_init_test_cases
      body: 
        (BraceGroup
          children: [
            (C {<atf_add_test_case>} {<dad_basic>})
            (C {<atf_add_test_case>} {<dad_duplicated>})
          ]
        )
    )
  ]
)