CSC 405 Lecture Notes Week 9 OCU/Manet Testing Details - - PowerPoint PPT Presentation

csc 405 lecture notes week 9 ocu manet testing details
SMART_READER_LITE
LIVE PREVIEW

CSC 405 Lecture Notes Week 9 OCU/Manet Testing Details - - PowerPoint PPT Presentation

CSC405-F10-L9 Slide 1 CSC 405 Lecture Notes Week 9 OCU/Manet Testing Details CSC405-F10-L9 Slide 2 I. Revisiting SQLite as a "best practice" example. A. Go over each point in the exec summary. B. Consider if/how these points will be


slide-1
SLIDE 1

CSC405-F10-L9 Slide 1

CSC 405 Lecture Notes Week 9 OCU/Manet Testing Details

slide-2
SLIDE 2

CSC405-F10-L9 Slide 2

  • I. Revisiting SQLite as a "best practice" example.
  • A. Go over each point in the exec summary.
  • B. Consider if/how these points will be concretely

realized in the ocu/manet system.

slide-3
SLIDE 3

CSC405-F10-L9 Slide 3

  • II. Executive Summary
  • Three independently developed test harnesses
  • 100% branch test coverage
  • Millions and millions of test cases
slide-4
SLIDE 4

CSC405-F10-L9 Slide 4

Executive Summary, cont’d

  • Out-of-memory tests
  • I/O error tests
  • Crash, power loss tests
  • Fuzz tests
  • Boundary value tests
  • Disabled opt’n tests
  • Regression tests
  • Malformed DB tests
  • Assert run-time checks
  • Valgrind analysis
slide-5
SLIDE 5

CSC405-F10-L9 Slide 5

  • III. SQLite test harnesses
  • A. Tcl/Tk unit tests.
  • B. Deployed system tests.
  • C. User-level SQL Logic tests.
slide-6
SLIDE 6

CSC405-F10-L9 Slide 6

Proposal for OCU/Manet Test Harnesses

  • A. Harness 1: OCU Unplugged.
  • 1. Test with "conventional" CppUnit or

Google Test.

  • 2. Alternatively, use larger-grain unit testing

framework, akin to Tcl/Tk testing,

  • 3. Driven by loop that programmtically sup-

plies inputs to ocu via comm model.

slide-7
SLIDE 7

CSC405-F10-L9 Slide 7

OCU/Manet Test Harnesses, cont’d

  • B. Harness 2: Manet Unplugged.
  • 1. Harness 2s: 80211s Unplugged.
  • 2. Harness 2b: Batman Unplugged.
  • 3. Both driven by loops that programmtically

supply different network configurations.

slide-8
SLIDE 8

CSC405-F10-L9 Slide 8

OCU/Manet Test Harnesses, cont’d

  • C. Harness 3: OCU + Manet integrated.
  • 1. Harness 3s: OCU + 80211s.
  • 2. Harness 3b: OCU + Batman.
  • 3. Driven by manet-unplugged driver.
slide-9
SLIDE 9

CSC405-F10-L9 Slide 9

OCU/Manet Test Harnesses, cont’d

  • D. Harness 4: OCU + Manet + Laptops in the

Football Field.

  • E. Harness 5: OCU + Manet + Surrogates and

Robots in "Live" Environment.

  • F. Harness 6: OCU + Manet + Simulated Robots.
slide-10
SLIDE 10

CSC405-F10-L9 Slide 10

  • IV. 100% branch test coverage
  • A. Use gcov and/or lcov.
  • B. Critically important to ensure coverage of black-

box tests.

  • C. SQLite testing handles coverage of defensive

code in a novel way

slide-11
SLIDE 11

CSC405-F10-L9 Slide 11

  • V. Millions and millions of test cases
  • A. As a practical matter, these are programmatically

generated.

  • B. SQLite has some interesting, potentially reusable

strategies.

slide-12
SLIDE 12

CSC405-F10-L9 Slide 12

  • VI. Out-of-memory tests
  • A. Particularly important for C++ code, to test for

memory leakage.

  • B. Important in general for all forms of malloc

errors.

  • C. Use test-configured versions of malloc.
slide-13
SLIDE 13

CSC405-F10-L9 Slide 13

  • VII. I/O error tests
  • A. In SQLite terms "the system responds sanely to

filed I/O operations".

  • B. Can be done with simulated I/O errors.
slide-14
SLIDE 14

CSC405-F10-L9 Slide 14

  • VIII. Crash and power loss tests
  • A. Test that state of OCU is non-corrupted if Manet
  • r its OS crashes.
  • B. Test other deployed-configuration power-loss sce-

narios.

slide-15
SLIDE 15

CSC405-F10-L9 Slide 15

  • IX. Fuzz tests
  • A. May want to test for mutation-inducing failures of

damaged robots.

  • B. E.g., "fuzzy" behavior that occurs when robot gets

partially blown up.

slide-16
SLIDE 16

CSC405-F10-L9 Slide 16

  • X. Boundary value and range tests
  • A. The main driver of test case generation loops.
  • B. Data range parameters currently identified:
  • 1. throughput
  • 2. latency
  • 3. signal strength
  • 4. number of nodes
  • 5. network target node
  • 6. path configuration
slide-17
SLIDE 17

CSC405-F10-L9 Slide 17

  • XI. Disabled optimization tests
  • A. For SQLite testing, this refers to specific forms of

query processing.

  • B. For OCU/Manet testing, it can mean that tests

need to be run on both -g and -O version of the compiled code.

slide-18
SLIDE 18

CSC405-F10-L9 Slide 18

  • XII. Regression tests
  • A. Of course.
slide-19
SLIDE 19

CSC405-F10-L9 Slide 19

  • XIII. Malformed data tests
  • A. For SQLite, these are tests on various database

malformations.

  • B. For OCU/Manet, comparable tests are for various

network malformations.

  • C. I’m not entirely clear what external causes there

may be of network malformations.

slide-20
SLIDE 20

CSC405-F10-L9 Slide 20

  • XIV. Extensive use of assert() and run-time checks
  • A. In SQLite, the production build disables asserts,

for performance.

  • B. I think the same should be true in OCU/Manet.
slide-21
SLIDE 21

CSC405-F10-L9 Slide 21

  • XV. Valgrind analysis
  • A. Valgrind is a Linux simulator that analyzes for

a variety of runtime errors.

  • B. If we have a simulated test harness, it might be

interesting to run it under valgrind.

slide-22
SLIDE 22

CSC405-F10-L9 Slide 22

  • XVI. Re-visit testing repository structure.
slide-23
SLIDE 23

CSC405-F10-L9 Slide 23

  • XVII. Some practical implementation details.
  • A. Do a sample loop that shows concretely what pro-

grammatic driving of ocu/manet could look like.

  • B. Ask Batman and 80211s teams what such a loop

would look like for their side of things.

slide-24
SLIDE 24

CSC405-F10-L9 Slide 24

  • XVIII. Action Items for this Week
  • A. Agreed testing framework for OCU teams.
  • B. Agreed testing framework for 80211s teams.
  • C. Committed testing for 80211s and OCU teams.
  • D. Project-wide regression test makefile.
  • E. Agreement, as appro, on preceding practices.
slide-25
SLIDE 25

CSC405-F10-L9 Slide 25

  • XIX. Suggested repository updates.
  • A. Populate testing subirs for all 4 subprojects.
  • B. Move batmobile/implementa-

tion/.../*Tests* to batmobile/test- ing/implementation/.../*Tests*.

  • C. Code tests and install for 80211s, kareem-

nassar, ocunited.

slide-26
SLIDE 26

CSC405-F10-L9 Slide 26

Repository additions and modifications, cont’d

  • D. Add manet-ocu/testing dir, with Make-

file for project-wide test build and execute.

  • E. Install bug-tracking supporting infrastructure (if

not already there).

  • F. Add requirements dir and put SRS there.
  • G. Add administration dir and put project-

wide admin docs there.

slide-27
SLIDE 27

CSC405-F10-L9 Slide 27