runners: Reworked test/bench for out-of-tree extensions
The main changes:
- Added TEST_DEFINES and BENCH_DEFINES to allow overriding the default
test/bench define header:
-DTEST_DEFINES=my_test_defines.h
Note these are VERY different from LFS_DEFINES upstream. They aren't a
typical header file, and are included multiple times with various
query macros.
It's hacky, but works surprisingly well.
Or maybe I'll just do anything to avoid having to write multiline
macros. Ugh, backslashes.
- Moved more logic into bench/test_defines.h, including everything
needed to integrate other filesystems out-of-tree.
This mostly meant moving all of the cfg initialization logic into its
own query macro (replacing the BENCH/TEST_CFG field macros).
But this also includes a bunch of small tweaks encountered while trying
to get external benchmarks running again.
The external benchmarks include several other filesystems (littlefs2,
SPIFFS, Yaffs2), and I'm hoping this injectable/queryable header thing
will do a good job at avoiding a maintenance headache. (At least a
better job than forking bench_runner.c, which was the previous
solution.)
This commit is contained in:
+1
-3
@@ -137,12 +137,10 @@ int lfs3_kiwibd_sync(const struct lfs3_cfg *cfg);
|
||||
|
||||
/// Additional kiwibd features ///
|
||||
|
||||
// Get total simulated runtime
|
||||
// Get simulated runtime in nanoseconds
|
||||
lfs3_kiwibd_sns_t lfs3_kiwibd_simtime(const struct lfs3_cfg *cfg);
|
||||
|
||||
// Reset simulation counters
|
||||
//
|
||||
// You probably shouldn't call this, instead diff before/after simtimes
|
||||
int lfs3_kiwibd_simreset(const struct lfs3_cfg *cfg);
|
||||
|
||||
// Get total number of read transactions
|
||||
|
||||
Reference in New Issue
Block a user