tests/test-lib: cmocka helpers to simulate path and map discovery