Commit Graph

4 Commits

Author SHA1 Message Date
3c7f976acc call defer cmd.Wait() before return 2020-01-16 14:33:02 +01:00
509d6e5505 synchronize concurrent access to map in test 2020-01-16 10:50:06 +01:00
3d9ecdca27 Added comments to gdb_test.go 2020-01-16 10:43:30 +01:00
554ae92194 Test added to compare the Scanner vs GDB
gdb_test.go and testdata implement a go test to compare and verify that
we get correct results from the scanner.

testdata/simple.c is a small program that embeds Python and runs the
same code as in runforever.py.  The Makefile compiles this using
python3.7.  Adjustments to the flags might be needed in your environment

gdb_test.go contains only one test, TestSimpleGDB, that
  1. compiles simple.c
  2. runs it multiple times
  3. calls gdb to extract the address of symbol _PyRuntime for each pid
  4. runs our Scanner
  5. compares the results from gdb and our scanner
2020-01-16 10:30:49 +01:00