summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2020-02-14 15:16:46 +1100
committerChris Johns <chrisj@rtems.org>2020-02-19 19:01:08 +1100
commitfe09d8d4d3c8c663217be1d1db49fb579bfdadbe (patch)
tree5d7c05e09551c6d58f9cedfa8b3cdde1a22ed7d8 /testsuites
parentshell: Correct argument order of `mfill` (diff)
downloadrtems-fe09d8d4d3c8c663217be1d1db49fb579bfdadbe.tar.bz2
libcsupport/newlib: Call newlib's __sinit to force reent initialisation
- Newlib overtites any FILE pointers set in stdin, stdout or stderr. Closes #3870
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/newlib01/init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuites/libtests/newlib01/init.c b/testsuites/libtests/newlib01/init.c
index f9d39368d2..a8e5b3926c 100644
--- a/testsuites/libtests/newlib01/init.c
+++ b/testsuites/libtests/newlib01/init.c
@@ -245,6 +245,10 @@ static void test(void)
int rv;
rtems_resource_snapshot snapshot;
+ rtems_test_assert(fileno(stdout) >= 0);
+ rtems_test_assert(fileno(stdin) >= 0);
+ rtems_test_assert(fileno(stderr) >= 0);
+
ctx->main_task_id = rtems_task_self();
rtems_resource_snapshot_take(&snapshot);
@@ -275,6 +279,10 @@ static void test(void)
sc = rtems_task_delete(ctx->worker_task_id);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(fileno(stdout) >= 0);
+ rtems_test_assert(fileno(stdin) >= 0);
+ rtems_test_assert(fileno(stderr) >= 0);
+
rv = unlink(&file_path[0]);
rtems_test_assert(rv == 0);