(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] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:duplicated) op: assign_op.Equal rhs: {(DQ <'[Dd][Uu][Pp][Ll][Ii][Cc][Aa][Tt][Ee][Dd]'>)} spids: [98] ) ] ) (C {<atf_test_case>} {<dad_basic>} {<cleanup>}) (C {<atf_test_case>} {<dad_duplicated>} {<cleanup>}) (C {<atf_test_case>} {<dad_count>} {<cleanup>}) (command.ShFunction name: dad_basic_head body: (BraceGroup children: [ (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for IPv6 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 IPv6 DAD duplicated state'>)}) (C {<atf_set>} {(DQ <require.progs>)} {(DQ <rump_server>)}) ] ) ) (command.ShFunction name: dad_count_head body: (BraceGroup children: [ (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for IPv6 DAD count behavior'>)}) (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>} {<inet6>} {($ Id.VSub_DollarName '$ip')} ) (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_ns_pkt_str body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'id='> ($ Id.VSub_Number '$1')}) (C {<local>} {<Id.Lit_VarLike 'target='> ($ Id.VSub_Number '$2')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pkt) op: assign_op.Equal rhs: { (DQ <'33:33:ff:00:00:0'> (${ Id.VSub_Name id) <', ethertype IPv6 (0x86dd), length 78: ::'> ) } spids: [330] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pkt) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$pkt') <' > ff02::1:ff00:'> (${ Id.VSub_Name id) <': ICMP6, neighbor solicitation,'> ) } spids: [340] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pkt) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$pkt') <' who has '> ($ Id.VSub_DollarName '$target') <', length 24'> ) } spids: [351] ) ] ) (C {<echo>} {($ Id.VSub_DollarName '$pkt')}) ] ) ) (command.ShFunction name: dad_basic_body body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'pkt='>}) (C {<local>} {<Id.Lit_VarLike 'localip1='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} ) (C {<local>} {<Id.Lit_VarLike 'localip2='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} ) (C {<local>} {<Id.Lit_VarLike 'localip3='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <3>} ) (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCKLOCAL')} {<netinet6>}) (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>} {<inet6>} {($ Id.VSub_DollarName '$localip1')} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} {<shmif0>} {<inet6>} {($ Id.VSub_DollarName '$localip2')} ) (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 '> ($ Id.VSub_DollarName '$localip1') <' |grep -q 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_ns_pkt_str>} {<2>} {($ Id.VSub_DollarName '$localip2')}) ) } spids: [578] ) ] ) (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_ns_pkt_str>} {<1>} {($ Id.VSub_DollarName '$localip1')}) ) } spids: [609] ) ] ) (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>} ) (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'>})] ) (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} { (DQ <'rump.ifconfig shmif0 |grep '> ($ Id.VSub_DollarName '$localip2') <' |grep -q tentative'> ) } ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} {<shmif0>} {<inet6>} {($ Id.VSub_DollarName '$localip3')} ) (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_ns_pkt_str>} {<3>} {($ Id.VSub_DollarName '$localip3')}) ) } spids: [780] ) ] ) (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>} ) (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'>})] ) (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} { (DQ <'rump.ifconfig shmif0 |grep '> ($ Id.VSub_DollarName '$localip3') <' |grep -q tentative'> ) } ) (C {<rump_server_destroy_ifaces>}) ] ) ) (command.ShFunction name: dad_duplicated_body body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'localip1='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} ) (C {<local>} {<Id.Lit_VarLike 'localip2='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <11>} ) (C {<local>} {<Id.Lit_VarLike 'peerip='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>}) (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCKLOCAL')} {<netinet6>}) (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCKPEER')} {<netinet6>}) (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>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> (DQ ($ Id.VSub_DollarName '$localip1') <'.+'> ($ Id.VSub_DollarName '$duplicated')) } {<rump.ifconfig>} {<shmif0>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} {<shmif0>} {<inet6>} {($ Id.VSub_DollarName '$peerip')} ) (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>} {<-o>} {<match> <Id.Lit_Colon ':'> (DQ ($ Id.VSub_DollarName '$peerip') <'.+'> ($ Id.VSub_DollarName '$duplicated')) } {<rump.ifconfig>} {<shmif0>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} {<shmif0>} {<inet6>} {($ Id.VSub_DollarName '$localip2')} ) (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>} {<-o>} {<not-match> <Id.Lit_Colon ':'> (DQ ($ Id.VSub_DollarName '$localip2') <'.+'> ($ Id.VSub_DollarName '$duplicated')) } {<rump.ifconfig>} {<shmif0>} ) (C {<rump_server_destroy_ifaces>}) ] ) ) (command.ShFunction name: dad_count_test body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'pkt='>}) (C {<local>} {<Id.Lit_VarLike 'count='> ($ Id.VSub_Number '$1')}) (C {<local>} {<Id.Lit_VarLike 'id='> ($ Id.VSub_Number '$2')}) (C {<local>} {<Id.Lit_VarLike 'target='> ($ Id.VSub_Number '$3')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.sysctl>} {<-w>} {<-q>} {<net.inet6.ip6.dad_count> <Id.Lit_Equals '='> ($ Id.VSub_DollarName '$count')} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} {<shmif0>} {<inet6>} {($ Id.VSub_DollarName '$target')} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<rump.ifconfig>} {<-w>} {<20>} ) (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_ns_pkt_str>} {($ Id.VSub_DollarName '$id')} {($ Id.VSub_DollarName '$target')} ) ) } spids: [1258] ) ] ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> (DQ ($ Id.VSub_DollarName '$count'))} {<-x>} {(DQ <'cat ./out |grep \''> ($ Id.VSub_DollarName '$pkt') <'\' | wc -l | tr -d \' \''>)} ) ] ) ) (command.ShFunction name: dad_count_body body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'localip1='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} ) (C {<local>} {<Id.Lit_VarLike 'localip2='> <fc00> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} ) (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCKLOCAL')} {<netinet6>}) (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>} {<-o>} {<match> <Id.Lit_Colon ':'> (DQ <1>)} {<rump.sysctl>} {<-n>} {<net.inet6.ip6.dad_count>} ) (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>} {<sleep>} {<2>}) (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 {<dad_count_test>} {<1>} {<1>} {($ Id.VSub_DollarName '$localip1')}) (C {<dad_count_test>} {<8>} {<2>} {($ Id.VSub_DollarName '$localip2')}) (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: dad_count_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>}) (C {<atf_add_test_case>} {<dad_count>}) ] ) ) ] )