-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update global tests (part 1) #99
Update global tests (part 1) #99
Conversation
Nice work, so consider the following to be less important than what's already been done here: If there's a chance the test function signature have to change again, then perhaps it's handy to define a macro for it? Of course, careful consideration is needed whether macros are acceptable for such an application... |
|
Hmm, you're missing the starting of the test function aka So it would be something like...
However, there are some other tests that are using |
Then the func_tests.h will be better to rename as |
Or you could pass that in as an argument to that macro? |
Good question, should we? Since we have |
The Like So, perhaps the As for when to pass in an argument to a macro, and when to just use it in the macro (assuming the symbol/argument/variable will exist), I think that for Besides, |
Actually, we could move if(ret == 1) {
test_passed &= 1;
}
else {
test_passed &= 0;
} can be convert to use For any custom checks in the tests that aren't using pre-existing macros. We could make additional macro specifically for this purpose. Which could be Though, for ^ purpose it can possibility take a while to find and replace them. Which will make it harder to review in this pull request. I would like to handle this |
ebaaea5
to
683d2cc
Compare
Finalize discussion changes has been pushed recently. Of course excluding minor changes for part 2 pull request mainly to have better readability review after this majority changes. |
Instead of contributors manually input strings of hex index / name of api. I simply replace all into parameters to remove any possible typo mistakes. This way, the compiler/runtime will do the work for us easier.
Instead of manually updating each one which will take hours. I used a couple of regexes to replace all of it in one go. It only took me about 15 seconds and 15 minutes to replace what I had missed. I also spent 45 minutes verifying that each api test bodies were correctly replaced.
In this change:
void test_<name of api>(void)
been replaced tovoid test_<name of api>(int func_num, const char* func_name)
func_num
andfunc_name
of all tests had been removed.kernel_thunk_table
tokernel_api_tests
per @PatrickvL suggestion requestfunc_table.h
tofunc_tests.h
I also confirmed all implemented tests did output the correct hex index value in the log file.