diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-20 09:04:50 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-20 09:46:54 +0200 |
commit | 4f8869bde1f2c815abe38eecfaf2a80dca2f0e11 (patch) | |
tree | 2ac8669676631563eeb916308b6ccc1202df6a5a | |
parent | modules: Update rtems (diff) | |
download | rtems-central-4f8869bde1f2c815abe38eecfaf2a80dca2f0e11.tar.bz2 |
spec: Use posix_memalign()
The aligned_alloc() depends on errno.
-rw-r--r-- | spec/testsuites/validation/c-library.yml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/testsuites/validation/c-library.yml b/spec/testsuites/validation/c-library.yml index e3c3cfbe..0239e03a 100644 --- a/spec/testsuites/validation/c-library.yml +++ b/spec/testsuites/validation/c-library.yml @@ -5,13 +5,20 @@ enabled-by: true links: [] test-actions: - action-brief: | - Allocate four bytes with an alignment of 128 bytes with aligned_alloc(). + Allocate four bytes with an alignment of 128 bytes with posix_memalign(). action-code: | void *p; + int eno; - p = aligned_alloc(128, 4); + p = (void *)(uintptr_t) 1; + eno = posix_memalign(&p, 128, 4); checks: - brief: | + Check that the returned status is zero. + code: | + T_step_eq_int(${step}, eno, 0); + links: [] + - brief: | Check that the returned pointer is not NULL. code: | T_step_not_null(${step}, p); |