summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-02-24 06:45:44 +0100
committerRichard Braun <rbraun@sceen.net>2018-02-24 06:48:21 +0100
commit7dcf6715ffb3cc2f00f6327b896d16f173a1b082 (patch)
tree210570e98e074d7abade0d22c64e05b9c02435ba /test
parentbe5b9d6ab9f7e7a81c367e4bb0823ba11f85940f (diff)
New errno.h standard header
Use standard errno codes. This change also adds strerror to string.h.
Diffstat (limited to 'test')
-rw-r--r--test/test_sref_noref.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c
index 40f1d8fe..f5b1875e 100644
--- a/test/test_sref_noref.c
+++ b/test/test_sref_noref.c
@@ -32,12 +32,14 @@
* to occur.
*/
+#include <errno.h>
#include <stddef.h>
#include <stdio.h>
+#include <string.h>
#include <kern/condition.h>
-#include <kern/error.h>
#include <kern/init.h>
+#include <kern/error.h>
#include <kern/kmem.h>
#include <kern/macros.h>
#include <kern/mutex.h>
@@ -126,7 +128,7 @@ test_run(void *arg)
threads = kmem_alloc(sizeof(*threads) * nr_threads);
if (threads == NULL) {
- panic("kmem_alloc: %s", error_str(ERROR_NOMEM));
+ panic("kmem_alloc: %s", strerror(ENOMEM));
}
for (i = 0; i < nr_threads; i++) {
@@ -140,7 +142,7 @@ test_run(void *arg)
obj = vm_kmem_alloc(sizeof(*obj));
if (obj == NULL) {
- panic("vm_kmem_alloc: %s", error_str(ERROR_NOMEM));
+ panic("vm_kmem_alloc: %s", strerror(ENOMEM));
}
sref_counter_init(&obj->ref_counter, 1, NULL, test_obj_noref);