3 comments:
File tests/lib/bootmem-test.c:
Patch Set #1, Line 93: test_
Since this isn't actually a test, I don't think it should have a test_ prefix. […]
Hmm.. while it is not actually a test, it is tightly coupled with a particular test. It is easy to identify setup and teardown functions for every test case. Don't you think that _setup and _teardown suffixes are enough to tell that it is not a real test but rather a helper? That being said, removing test_ prefix still will allow developers to match helpers and test method, so I can go with your proposal.
The main problem is probably that I'm not using the scheme <test_name>_setup and <test_name>_teardown consistently throughout the module (since test_basic_setup() is for test_bootmem_write_mem_table()).
Patch Set #1, Line 122: /* This test need to be run first, in order to use bootmem library API */
Requiring tests to be run in a specific order is usually a sign that the tests have hidden dependenc […]
You are right, I'm making use of one memory table across all the tests. However I can simply call bootmem_write_memory_table() in every test and simply ignore its output.
These functions only get called once, and their return value is not used. […]
These functions are callbacks defined as
typedef bool (*range_action_t)(const struct range_entry *r, void *arg);
, so I need to keep this format. "The caller has to return false to break out of the loop any time, or return true to continue". I want to iterate through all entries, that's why true is always returned.
To view, visit change 43510. To unsubscribe, or for help writing mail filters, visit settings.