Move alloc tests to expected-output tests
All threads resolved!
All threads resolved!
This moves the allocation function tests to the tests having expecting a fixed output.
To facilitate this, a number of C helper functions have been added so that the same output will always be obtained for the passing case. For easier debugging, these functions will output the full returned pointer value upon failure.
The alignment checks use a cast to uintptr_t
which, to my knowledge, should avoid UB.
Note: this branch is based off the one used in MR !224 (merged) due to some bugfixes there. I guess it makes sense to merge that MR first, assuming it can be accepted. Edit: Now rebased to master
.
Edited by Peter Limkilde Svendsen
Merge request reports
Activity
added 31 commits
-
d4aec0e6...bf13674e - 20 commits from branch
redox-os:master
- 1742b0e2 - Move alloc tests to expected-ouput list (still failing)
- f1398f9a - Add function to check simple non-NULL allocs
- bbdda88e - Add 'cannot allocate' helper function
- 251281c0 - Generalize for posix_memalign
- a50d7259 - Add alignment check
- 7440a041 - Add check for invalid-alignment tests
- ee323c12 - Add check for size-0 tests
- 49b97c97 - Set expected output
- 97f28876 - Use test_something naming for helper functions
- 93914e92 - Add alignment parameter to size-0 test
- 181c059f - Use alignment from named variable in memalign() tests
Toggle commit list-
d4aec0e6...bf13674e - 20 commits from branch
- Resolved by jD91mZM2
mentioned in commit 3ae46d86
Please register or sign in to reply