summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-16 15:01:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-16 15:01:11 +0000
commit917e4b4781594d1e6257b554c65fb3bb0b467a58 (patch)
tree86dfc7017a4dc7b650d92afed62fe89ee6c27306 /testsuites/sptests
parent2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-917e4b4781594d1e6257b554c65fb3bb0b467a58.tar.bz2
2010-07-16 Bharath Suri <bharath.s.jois@gmail.com>
PR 1617/testing * spmountmgr01/init.c, spmountmgr01/spmountmgr01.scn, spmountmgr01/spmountmgr01.doc: Added cases to exercise mount-mktgt.c.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/ChangeLog7
-rw-r--r--testsuites/sptests/spmountmgr01/init.c21
-rw-r--r--testsuites/sptests/spmountmgr01/spmountmgr01.doc8
-rw-r--r--testsuites/sptests/spmountmgr01/spmountmgr01.scn3
4 files changed, 37 insertions, 2 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index ffd0afd637..055ac106f4 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-16 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1617/testing
+ * spmountmgr01/init.c, spmountmgr01/spmountmgr01.scn,
+ spmountmgr01/spmountmgr01.doc: Added cases to exercise
+ mount-mktgt.c.
+
2010-07-15 Bharath Suri <bharath.s.jois@gmail.com>
PR 1617/testing
diff --git a/testsuites/sptests/spmountmgr01/init.c b/testsuites/sptests/spmountmgr01/init.c
index 4e5b8a4282..69b36a2f2e 100644
--- a/testsuites/sptests/spmountmgr01/init.c
+++ b/testsuites/sptests/spmountmgr01/init.c
@@ -50,6 +50,27 @@ rtems_task Init(
status = rtems_filesystem_register( "fs", fs_mount );
rtems_test_assert( status == 0 );
+ puts( "Init - attempt to make target(NULL) and mount - expect EINVAL" );
+ status = mount_and_make_target_path(
+ NULL,
+ NULL,
+ "fs",
+ 0,
+ NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "Init - attempt to make target and mount - expect EINVAL" );
+ status = mount_and_make_target_path(
+ NULL,
+ "/tmp",
+ "fs",
+ 2,
+ NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+
puts( "Init - register filesystem fs - expect EINVAL" );
status = rtems_filesystem_register( "fs", fs_mount );
rtems_test_assert( status == -1 );
diff --git a/testsuites/sptests/spmountmgr01/spmountmgr01.doc b/testsuites/sptests/spmountmgr01/spmountmgr01.doc
index f1dae4b7d4..4475c602da 100644
--- a/testsuites/sptests/spmountmgr01/spmountmgr01.doc
+++ b/testsuites/sptests/spmountmgr01/spmountmgr01.doc
@@ -17,9 +17,13 @@ directives:
+ rtems_filesystem_register
+ rtems_filesystem_unregister
++ mount_and_make_target_path
concepts:
-+ Exercise the routines of mount-mgr.c under libcsupport.
-+ These routines are mostly to register / unregister new filesytem
++ Exercise the routines of mount-mgr.c and mount-mktgt.c under libcsupport.
++ The routines in mount-mgr.c are mostly to register / unregister new filesytem
for later use.
++ The routines in mount-mktgt.c are used to mount a filesystem at a
+target path. If the target path does not exist, it is created and then
+the mount is processed
diff --git a/testsuites/sptests/spmountmgr01/spmountmgr01.scn b/testsuites/sptests/spmountmgr01/spmountmgr01.scn
index d85166f354..7459d2c473 100644
--- a/testsuites/sptests/spmountmgr01/spmountmgr01.scn
+++ b/testsuites/sptests/spmountmgr01/spmountmgr01.scn
@@ -1,8 +1,11 @@
+
*** TEST MOUNT MANAGER ROUTINE - 01 ***
Init - allocating most of heap -- OK
Init - attempt to register filesystem fs - expect ENOMEM
Init - freeing allocated memory -- OK
Init - register filesystem fs -- OK
+Init - attempt to make target(NULL) and mount - expect EINVAL
+Init - attempt to make target and mount - expect EINVAL
Init - register filesystem fs - expect EINVAL
Init - register filesystem bfs -- OK
Init - register filesystem bfs - expect EINVAL