summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-08-30 19:31:17 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-08-30 19:32:18 +0200
commitb0f13f3778cc5192a4c89fab576b21a9140b3dc5 (patch)
treeb8efeef06fb011523b8c968453166d374a57c9fd /testsuites/psxtests
parentsmpfatal01: Fix test time out on sparc/leon3 (diff)
downloadrtems-b0f13f3778cc5192a4c89fab576b21a9140b3dc5.tar.bz2
psxtests/psxconfstr: Fix test case
Update #3373.
Diffstat (limited to 'testsuites/psxtests')
-rw-r--r--testsuites/psxtests/psxconfstr/init.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/testsuites/psxtests/psxconfstr/init.c b/testsuites/psxtests/psxconfstr/init.c
index 91eb8dd687..1fb6bcc27c 100644
--- a/testsuites/psxtests/psxconfstr/init.c
+++ b/testsuites/psxtests/psxconfstr/init.c
@@ -44,39 +44,38 @@
const char rtems_test_name[] = "PSXCONFSTR";
-/* init test function begins */
T_TEST_CASE(confstr)
{
int r;
- char * buf = "";
const char UPE[] = "unsupported programming environment";
+ char buf[sizeof(UPE)];
size_t len1;
- len1 = strlen(UPE) + 1;
- r = confstr(_CS_PATH, buf, sizeof(buf));
- T_quiet_psx_success(r);
+
+ len1 = sizeof(UPE);
r = confstr(_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, buf, sizeof(buf));
- T_quiet_eq_int(r, len1);
+ T_eq_sz(r, len1);
r = confstr(_CS_POSIX_V6_LP64_OFF64_LDFLAGS, buf, sizeof(buf));
- T_quiet_eq_int(r, len1);
+ T_eq_sz(r, len1);
r = confstr(_CS_POSIX_V7_ILP32_OFF32_CFLAGS, buf, sizeof(buf));
- T_quiet_eq_int(r, len1);
+ T_eq_sz(r, len1);
r = confstr(_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, buf, sizeof(buf));
- T_quiet_eq_int(r, len1);
+ T_eq_sz(r, len1);
r = confstr(_CS_POSIX_V7_LP64_OFF64_LIBS, buf, sizeof(buf));
- T_quiet_eq_int(r, len1);
+ T_eq_sz(r, len1);
r = confstr(_CS_POSIX_V6_LP64_OFF64_CFLAGS, buf, sizeof(buf));
- T_quiet_eq_int(r, len1);
+ T_eq_sz(r, len1);
+ errno = 0;
r = confstr(_CS_PATH, buf, sizeof(buf));
- T_quiet_psx_success(r);
-
+ T_eq_sz(r, 0);
+ T_eq_int(errno, EINVAL);
}
static rtems_task Init(rtems_task_argument ignored)