Skip to content

Commit

Permalink
Added back heuristic-based power-loss testing
Browse files Browse the repository at this point in the history
The main change here from the previous test framework design is:

1. Powerloss testing remains in-process, speeding up testing.

2. The state of a test, included all powerlosses, is encoded in the
   test id + leb16 encoded powerloss string. This means exhaustive
   testing can be run in CI, but then easily reproduced locally with
   full debugger support.

   For example:

   ./scripts/test.py test_dirs#reentrant_many_dir#10#1248g1g2 --gdb

   Will run the test test_dir, case reentrant_many_dir, permutation #10,
   with powerlosses at 1, 2, 4, 8, 16, and 32 cycles. Dropping into gdb
   if an assert fails.

The changes to the block-device are a work-in-progress for a
lazily-allocated/copy-on-write block device that I'm hoping will keep
exhaustive testing relatively low-cost.
  • Loading branch information
geky committed Aug 24, 2022
1 parent 01b11da commit 61455b6
Show file tree
Hide file tree
Showing 8 changed files with 1,390 additions and 570 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ tags:
.PHONY: test-runner
test-runner: override CFLAGS+=--coverage
test-runner: $(BUILDDIR)runners/test_runner
rm -f $(TEST_GCDA)

.PHONY: test
test: test-runner
rm -f $(TEST_GCDA)
./scripts/test.py --runner=$(BUILDDIR)runners/test_runner $(TESTFLAGS)

.PHONY: test-list
Expand Down

0 comments on commit 61455b6

Please sign in to comment.