From 2a6ae24ba769892993ec7a173c564f59feb06495 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 23 Nov 2020 19:24:15 -0700 Subject: Update the testing harness to insulate tests in --nofork mode. Before, when running a test binary in --nofork mode, it was up to the test to reset the program state before exiting to avoid dependencies on other tests. Now after each test the test harness will: 1. Wipeout the fake environmennt. 2. Reset the data segment to its initialization state. This achieves reasonable insulation between tests even though certain things (like a segfault) are stil not practical to completely insulate without fork()'ing. --- 02-usart/test_harness/test_harness.h | 3 +++ 1 file changed, 3 insertions(+) (limited to '02-usart/test_harness/test_harness.h') diff --git a/02-usart/test_harness/test_harness.h b/02-usart/test_harness/test_harness.h index b236cba..698e2da 100644 --- a/02-usart/test_harness/test_harness.h +++ b/02-usart/test_harness/test_harness.h @@ -95,4 +95,7 @@ void test_printuc(size_t sz, unsigned char v1, unsigned char v2); void test_harness_abort(int ec); + +void wipeout_fake_env(); + #endif -- cgit