Program must be RIP for a failure to occur: Reachable, incorrect state, propagates to output
Avoidance, Detection (testing), Tolerance (redundancy)
Static Testing at compile time involves review through code inspection (code review)
Dynamic Testing includes black and white box testing
Need testing critera to define coverage
TR
for a coverage criterion C
, a test set T
satisfies C
iff forall tr
in TR
, exists some t
in T
s.t. t
satisfies tr
Subsumption: a test criterion C1 subsumes C2 iff forall test sets that satisfy C1 also satisfy C2. In other words, A subsumes B if it's a strictly weaker coverage criterion
Buffer overflow is a common security vulnerability, and occurs when input overruns a buffer's boundary and overwrites adjacent memory.
Graph Theory Review highlights:
When talking about node or edges in a graph G in coverage criterion, generally syntactically reachable
Single Entry Single Exit graphs: Type of control flow graph where all test paths start at a single node and end at another
we have some mapping pathG
from our test cases to test paths
Node Coverage: forall nodes in reachG[N0], our TR specifies some requirement to visit node n
Edge Coverage: all reachable paths of length 1 are required to be visited based on our TR (includes the 0 edges case too)
Edge Pair Coverage:** TR contains each reachable path of length up to and including 2, in G.
Simple Path has no duplicate nodes except possibly at its ends
Prime Path is simple and does not appear as a subpath of any other simple path
Test paths are not a subset of Prime Paths