230 likes | 350 Views
APCC’2004. Automatic Testing of Neighbor Discovery Protocol Based on FSM and TTCN. Sep. 1, 2004. Zhiliang Wang , Xia Yin, Haibin Wang, Jianping Wu Department of Computer Science Tsinghua University http://netlab.cs.tsinghua.edu.cn. Outline. Background Motivation Our proposed method
E N D
APCC’2004 Automatic Testing of Neighbor Discovery Protocol Based on FSM and TTCN Sep. 1, 2004 Zhiliang Wang, Xia Yin, Haibin Wang, Jianping Wu Department of Computer Science Tsinghua University http://netlab.cs.tsinghua.edu.cn
Outline • Background • Motivation • Our proposed method • Conclusion and Future work APCC'2004
Background: Protocol Conformance Testing Protocol Specification Test Generation Implementation Process Abstract Test Suite Protocol Impl. IUT Test Implementation Test Execution Test Verdict APCC'2004
Background: Neighbor Discovery Protocol • One of the basic protocols in IPv6 protocol set • Should be supported in all IPv6 implementations • Corresponding functions in IPv4 • ARP (Address Resolution Protocol) • ICMP router discovery • ICMP redirect function • Using 5 ICMP packet types: • Router Solicitation • Router Advertisement • Neighbor Solicitation • Neighbor Advertisement • Redirect APCC'2004
Background: Related work • Conformance testing of ND Protocol • InterOperability Laboratory, University of New Hampshire • TAHI Project • Institute of Computing Technology, Chinese Academy of Sciences • Existing Problems • No standard language used to specify test suite • Must be executed on the proprietary test systems • Not guided by formal methods • Cannot ensure test coverage and reliability of test suite APCC'2004
Protocol Specification Test Generation Implementation Processes Abstract Test Suite Protocol Impl. IUT Test Implementation Test Execution Test Verdict Background: Our method • FSM • Finite State Machine • To specify protocol specification • TTCN-2 • Tree and Tabular Notations • Test case specification language • PITS • Our previous work • Protocol Integrated Test System • TTCN-based test system • Automatic test process • Test practice FSM TTCN PITS APCC'2004
Outline • Background • Motivation • Our proposed method • Conclusion and Future work APCC'2004
Motivation • Protocol Modeling • Control part • Data part • Timed part • ND Protocol includes simple Timer Operations! • How to specify it? • EFSM? (Extended FSM) • Control part and data part, no timer! • TIOA? (Timed Input Output Automata) • Common model for timed system • Test generation process has tremendous costs on time and space • Difficult to be applied in practical conformance testing • Our method: EFSM + simple timer operations APCC'2004
Outline • Background • Motivation • Our proposed method • Formal Model • Test Architecture • Test Generation • Test Practice • Test Results and Analysis • Conclusion and Future work APCC'2004
Formal Model • EFSM with Simple Timed Extensions • EFSM + simple timer operations • A local timer for each state • Transition of such a model: • tact (timed action): invoke the local timer start(tq) • Timeout transition:input is timeout(ts) t5 INCOMPLETE REACHABLE up: variable update function i: Input P: Predicate t3 t3: timeout(TI)[counter=3]/{counter:=0} o: output t5: ?NA[NA.S=1]/{LLA:=NA.TLLA;start(TR)}!ERep NONE i: Input P: Predicate up: variable update function tact: timed action APCC'2004
Formal Model (cont) Protocol specification of Neighbor Unreachability Detection in ND Protocol States: 6 Transitions: 45 APCC'2004
Formal Model (cont) Protocol specification of Neighbor Unreachability Detection in ND Protocol APCC'2004
Formal Model (cont) • External Observable timed features • Do not apply any external inputs to the machine in state s. If an external output o can be observed after waiting a while, state s has an External Observable Timed Feature and its observed output is o. • the external behaviors of timeout transitions • To verify the transient state • Example APCC'2004
Test Architecture PCO: Point of Control and Observation IUT: Implementation Under Test APCC'2004
Test Generation • Conformance test suite • State cover: for each state S • Transition cover: for each transition t State to be tested r pre(S) ds(S) ? ? S0 S State cover test case Lead the machine to the initial state S0 Lead the machine from S0 to state S Verify the final state is S r ds(Q) pre(S) t ? Transition cover test case ? S0 S Q r: Reset pre(S):Preamble Verify the final state is Q Transition to be tested ds(S):Distinguishing Sequence APCC'2004
Test Generation (cont) • Generation of Distinguishing Sequence • Extension of traditional method • Key idea: Consider Timed Features of model {N,I,S,R,D,P} Example: Wait Distinguishing Seq. of state S: mNS (1s) -- uNS (1s) uNS (5s) Wait/--; ?EReq/!EPep; Wait(5s)/!uNS I D {N,S,R} P EReq mNS ERep N {S,R} Wait uNS (5s) -- S R APCC'2004
Test Generation (cont) • TTCN-2 Test case example: APCC'2004
Test Generation (cont) APCC'2004
Test Practice • Test System RI: Reference Implementation PCO: Point of Control and Observation IUT: Implementation Under Test APCC'2004
Test Practice (cont) • RI (Reference Implementation) APCC'2004
Test Results and Analysis • Overview of NDP test suite • Test Result APCC'2004
Conclusion and Future work • A formal method to test neighbor discovery protocol • Protocol specification: FSM-based method • Test generation • Test specification: TTCN-2 • Test practice: PITS • Future work: • Data flow testing for such a model • further test activities on IPv6 protocols, especially routing protocols APCC'2004