(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SOCK_LOCAL) op: assign_op.Equal rhs: {<unix> <Id.Lit_Colon ':'> <'//commsock1'>} spids: [79] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SOCK_PEER) op: assign_op.Equal rhs: {<unix> <Id.Lit_Colon ':'> <'//commsock2'>} spids: [84] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SOCK_GW) op: assign_op.Equal rhs: {<unix> <Id.Lit_Colon ':'> <'//commsock3'>} spids: [89] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BUS) op: assign_op.Equal rhs: {<bus1>} spids: [94] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BUS2) op: assign_op.Equal rhs: {<bus2>} spids: [97] ) ] ) (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: [101] ) ] ) (command.ShFunction name: setup_local body: (BraceGroup children: [ (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<rump_server_add_iface>} {($ Id.VSub_DollarName '$SOCK_LOCAL')} {<shmif0>} {($ Id.VSub_DollarName '$BUS')} ) (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif0>} {<'10.0.0.2/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif0>} {<up>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<-w>} {<10>} ) (command.AndOr ops: [Id.Op_DAmp] children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.ifconfig>})] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) ] ) ) (command.ShFunction name: setup_peer body: (BraceGroup children: [ (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCK_PEER')}) (C {<rump_server_add_iface>} {($ Id.VSub_DollarName '$SOCK_PEER')} {<shmif0>} {($ Id.VSub_DollarName '$BUS')} ) (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_PEER')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif0>} {<'10.0.0.1/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif0>} {<up>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<-w>} {<10>} ) (command.AndOr ops: [Id.Op_DAmp] children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.ifconfig>})] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) ] ) ) (command.ShFunction name: setup_gw body: (BraceGroup children: [ (C {<rump_server_start>} {($ Id.VSub_DollarName '$SOCK_GW')}) (C {<rump_server_add_iface>} {($ Id.VSub_DollarName '$SOCK_GW')} {<shmif0>} {($ Id.VSub_DollarName '$BUS')} ) (C {<rump_server_add_iface>} {($ Id.VSub_DollarName '$SOCK_GW')} {<shmif1>} {($ Id.VSub_DollarName '$BUS2')} ) (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_GW')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif0>} {<'10.0.0.254/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif0>} {<up>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif1>} {<'10.0.2.1/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif1>} {<alias>} {<'10.0.2.2/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<shmif1>} {<up>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ifconfig>} {<-w>} {<10>} ) (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-x>} {(DQ <'rump.ifconfig shmif1 |grep -q tentative'>)} ) (command.AndOr ops: [Id.Op_DAmp] children: [(C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.ifconfig>})] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) ] ) ) (command.ShFunction name: test_lo body: (BraceGroup children: [ (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<check_route_flags>} {<127.0.0.1>} {<UHl>}) ] ) ) (command.ShFunction name: test_connected body: (BraceGroup children: [ (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<check_route_flags>} {<10.0.0.2>} {<UHl>}) (C {<check_route_flags>} {<'10.0.0/24'>} {<UC>}) ] ) ) (command.ShFunction name: test_default_gateway body: (BraceGroup children: [ (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<default>} {<10.0.0.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<default>} {<UGS>}) ] ) ) (command.ShFunction name: test_static body: (BraceGroup children: [ (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<10.0.1.1>} {<10.0.0.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<10.0.1.1>} {<UGHS>}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<-net>} {<'10.0.2.0/24'>} {<10.0.0.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<'10.0.2/24'>} {<UGS>}) ] ) ) (command.ShFunction name: test_blackhole body: (BraceGroup children: [ (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ping>} {<-n>} {<-w>} {<1>} {<-c>} {<1>} {<10.0.0.1>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<delete>} {<-net>} {<'10.0.0.0/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<-net>} {<'10.0.0.0/24'>} {<127.0.0.1>} {<-blackhole>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<'10.0.0/24'>} {<UGBS>}) (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> (SQ <'100.0% packet loss'>)} {<rump.ping>} {<-n>} {<-w>} {<1>} {<-c>} {<1>} {<10.0.0.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_no_entry>} {<10.0.0.1>}) ] ) ) (command.ShFunction name: test_reject body: (BraceGroup children: [ (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<delete>} {<-net>} {<'10.0.0.0/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<-net>} {<'10.0.0.0/24'>} {<10.0.0.1>} {<-reject>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<'10.0.0/24'>} {<UGRS>}) (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<-e>} {<match> <Id.Lit_Colon ':'> (SQ <'No route to host'>)} {<rump.ping>} {<-n>} {<-w>} {<1>} {<-c>} {<1>} {<10.0.0.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_no_entry>} {<10.0.0.1>}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<delete>} {<-net>} {<'10.0.0.0/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<-net>} {<'10.0.0.0/24'>} {<127.0.0.1>} {<-reject>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<'10.0.0/24'>} {<UGRS>}) (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<-e>} {<match> <Id.Lit_Colon ':'> (SQ <'Network is unreachable'>)} {<rump.ping>} {<-n>} {<-w>} {<1>} {<-c>} {<1>} {<10.0.0.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_no_entry>} {<10.0.0.1>}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<delete>} {<-net>} {<'10.0.0.0/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<-host>} {<'10.0.0.1/24'>} {<127.0.0.1>} {<-iface>} {<-reject>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<10.0.0.1>} {<UHRS>}) (C {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<-e>} {<match> <Id.Lit_Colon ':'> (SQ <'No route to host'>)} {<rump.ping>} {<-n>} {<-w>} {<1>} {<-c>} {<1>} {<10.0.0.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: test_icmp_redirect body: (BraceGroup doc_token: <Id.Ignored_Comment _> children: [ (C {<setup_gw>}) (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_PEER')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<-net>} {<'10.0.2.0/24'>} {<10.0.0.254>} ) (C {<check_route_flags>} {<'10.0.2/24'>} {<UGS>}) (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<default>} {<10.0.0.1>} ) (C {<check_route_flags>} {<default>} {<UGS>}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ping>} {<-n>} {<-w>} {<1>} {<-c>} {<1>} {<10.0.2.1>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<10.0.2.1>} {<UGHD>}) (C {<check_route_gw>} {<10.0.2.1>} {<10.0.0.254>}) (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_PEER')}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<10.0.2.2>} {<10.0.0.1>} ) (C {<check_route_flags>} {<10.0.2.2>} {<UGHS>}) (C {<check_route_gw>} {<10.0.2.2>} {<10.0.0.1>}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.ping>} {<-n>} {<-w>} {<1>} {<-c>} {<1>} {<10.0.2.2>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<10.0.2.2>} {<UGHMS>}) (C {<check_route_gw>} {<10.0.2.2>} {<10.0.0.254>}) ] ) ) (command.ShFunction name: test_announce body: (BraceGroup children: [ (C {<export>} {<Id.Lit_VarLike 'RUMP_SERVER='> ($ Id.VSub_DollarName '$SOCK_LOCAL')}) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<delete>} {<-net>} {<'10.0.0.0/24'>} ) (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} {<rump.route>} {<add>} {<-net>} {<'10.0.0.0/24'>} {<10.0.0.1>} {<-proxy>} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$DEBUG')}) (C {<rump.netstat>} {<-rn>} {<-f>} {<inet>}) ] ) (C {<check_route_flags>} {<'10.0.0/24'>} {<UGSp>}) ] ) ) (command.ShFunction name: add_test body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'name='> ($ Id.VSub_Number '$1')}) (C {<local>} {<Id.Lit_VarLike 'desc='> (DQ ($ Id.VSub_Number '$2'))}) (C {<atf_test_case>} {(DQ <route_flags_> (${ Id.VSub_Name name))} {<cleanup>}) (C {<eval>} { (DQ <route_flags_> (${ Id.VSub_Name name) <'_head() { '> <'\t\t\tatf_set '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <descr> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) (${ Id.VSub_Name desc) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'; '> <'\t\t\tatf_set '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <require.progs> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <rump_server> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'; '> <'\t\t}; '> <'\t route_flags_'> (${ Id.VSub_Name name) <'_body() { '> <'\t\t\tsetup_local; '> <'\t\t\tsetup_peer; '> <'\t\t\ttest_'> (${ Id.VSub_Name name) <'; '> <'\t\t\trump_server_destroy_ifaces; '> <'\t\t}; '> <'\t route_flags_'> (${ Id.VSub_Name name) <'_cleanup() { '> <'\t\t\t'> ($ Id.VSub_DollarName '$DEBUG') <' && dump; '> <'\t\t\tcleanup; '> <'\t\t}'> ) } ) (C {<atf_add_test_case>} {(DQ <route_flags_> (${ Id.VSub_Name name))}) ] ) ) (command.ShFunction name: atf_init_test_cases body: (BraceGroup children: [ (C {<add_test>} {<lo>} {(DQ <'Tests route flags: loop back interface'>)}) (C {<add_test>} {<connected>} {(DQ <'Tests route flags: connected route'>)}) (C {<add_test>} {<default_gateway>} {(DQ <'Tests route flags: default gateway'>)}) (C {<add_test>} {<static>} {(DQ <'Tests route flags: static route'>)}) (C {<add_test>} {<blackhole>} {(DQ <'Tests route flags: blackhole route'>)}) (C {<add_test>} {<reject>} {(DQ <'Tests route flags: reject route'>)}) (C {<add_test>} {<icmp_redirect>} {(DQ <'Tests route flags: icmp redirect'>)}) (C {<add_test>} {<announce>} {(DQ <'Tests route flags: announce flag'>)}) ] ) ) ] )