[rtems commit] fstests/fsrename: Avoid double initialization

Sebastian Huber sebh at rtems.org
Mon Feb 9 15:06:05 UTC 2015


Module:    rtems
Branch:    master
Commit:    b4e52ce90f0805fe3bcac655bf2d9bfc13ccac77
Changeset: http://git.rtems.org/rtems/commit/?id=b4e52ce90f0805fe3bcac655bf2d9bfc13ccac77

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Feb  6 21:12:38 2015 +0100

fstests/fsrename: Avoid double initialization

---

 testsuites/fstests/fsrename/test.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/testsuites/fstests/fsrename/test.c b/testsuites/fstests/fsrename/test.c
index f268aff..6799ab4 100644
--- a/testsuites/fstests/fsrename/test.c
+++ b/testsuites/fstests/fsrename/test.c
@@ -1185,7 +1185,8 @@ static void filesystem_test (void)
 
   puts ("\nRename files across diferent filesystems\n");
 
-  test_initialize_filesystem ();
+  rv = chroot ("/");
+  rtems_test_assert (rv == 0);
 
   fd = creat (name01, mode);
   rtems_test_assert (fd >= 0);
@@ -1196,15 +1197,12 @@ static void filesystem_test (void)
   rtems_test_assert (rv < sizeof(path01));
   EXPECT_ERROR (EXDEV, rename, name01, path01);
 
-  /*
-   * Clear directory
-   */
-
-  test_shutdown_filesystem ();
-
   EXPECT_EQUAL (-1, unlink, path01);
   EXPECT_EQUAL (0, unlink, name01);
 
+  rv = chroot (BASE_FOR_TEST);
+  rtems_test_assert (rv == 0);
+
   /*
    * Go back to parent directory
    */




More information about the vc mailing list