That was quite a bit of work, and I thought it would be.
I’ve refactored the test application so that it no longer uses the standard library or performs memory allocation.
It still needs threads, though.
The test app is now almost completely a library, with a convenience command line wrapper provided.
The test suite is performed by calling basically one function, and you get back the results of which tests passed and which failed (and why).
All you have to do as the caller is pass in a block of memory (for the tests) and implement the threads abstraction layer, which is already done for Linux user-mode and Windows user-mode. You can also pass in callbacks for text output if you want to see results as they come. I think I’ve got code for Windows kernel-mode. I’ll need to see about Linux kernel-mode.
There is still one fundamental shortcoming though. One use case for the library is on embedded single-threaded cores. The use case is that the lock-free data structure instances are safe to use both inside and outside of interrupt handlers. The test application has no way of running in that environment since it uses threads.