summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxshm02
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-25 11:46:51 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-25 11:46:51 +0100
commit7cb7454f9321f9d68ad79c7bc21458755a4a6b46 (patch)
tree89cab50b02adbcb5b8cd47a034ee75ae40f960c6 /testsuites/psxtests/psxshm02
parentposix: Fix use of uninitialized variable (diff)
downloadrtems-7cb7454f9321f9d68ad79c7bc21458755a4a6b46.tar.bz2
psxtests: Relax shared memory tests
There is currently no proper mmap() implementation. Update #2859.
Diffstat (limited to 'testsuites/psxtests/psxshm02')
-rw-r--r--testsuites/psxtests/psxshm02/init.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/testsuites/psxtests/psxshm02/init.c b/testsuites/psxtests/psxshm02/init.c
index 29dea97f7c..071f4c4da8 100644
--- a/testsuites/psxtests/psxshm02/init.c
+++ b/testsuites/psxtests/psxshm02/init.c
@@ -65,16 +65,19 @@ void *POSIX_Init(
fd,
0
);
- rtems_test_assert( p != MAP_FAILED );
- puts( "Init: write to mapped region" );
- p->len = MAX_LEN;
-
- puts( "Init: munmap" );
- err = munmap( p, sizeof( struct region ) );
- if ( err == -1 ) {
- printf ( "Error: %s\n", strerror(errno) );
- rtems_test_assert( err != -1 );
+ if( p != MAP_FAILED ) {
+ puts( "Init: write to mapped region" );
+ p->len = MAX_LEN;
+
+ puts( "Init: munmap" );
+ err = munmap( p, sizeof( struct region ) );
+ if ( err == -1 ) {
+ printf ( "Error: %s\n", strerror(errno) );
+ rtems_test_assert( err != -1 );
+ }
+ } else {
+ puts( "Init: FIXME: mmap() not supported" );
}
puts( "Init: close" );