diff --git a/spec/build/bsps/tst.yml b/spec/build/bsps/tst.yml index de00d8f7f2..a62645bcdd 100644 --- a/spec/build/bsps/tst.yml +++ b/spec/build/bsps/tst.yml @@ -39,18 +39,6 @@ actions: - mimfsfsrenamepermexisting - mrfsfsrenameexisting - mrfsfsrenamepermexisting -- set-test-state: - reason: | - Fails because of #5071, dot-dot as last part of a path - is treated as valid - state: expected-fail - tests: - - imfsfsrmdirparent - - jffs2fsrmdirparent - - jffs2nandfsrmdirparent - - mdosfsfsrmdirparent - - mimfsfsrmdirparent - - mrfsfsrmdirparent - set-test-state: reason: | Fails because of #2169 and other rename issue diff --git a/testsuites/fstests/fsrmdirparent/test.c b/testsuites/fstests/fsrmdirparent/test.c index 541a8f1b71..6dfc532f53 100644 --- a/testsuites/fstests/fsrmdirparent/test.c +++ b/testsuites/fstests/fsrmdirparent/test.c @@ -52,13 +52,24 @@ static void rmdir_error (void) const char *wd = __func__; /* - * Create a new directory and change the current directory to this + * Create a new directory and change the current directory to this */ status = mkdir (wd, mode); rtems_test_assert (status == 0); status = chdir (wd); rtems_test_assert (status == 0); + /* + * Try to remove the relative parent directory + */ + EXPECT_EQUAL (-1, rmdir, ".."); + puts ("Testing errno for ENOTEMPTY or EBUSY"); + if ( errno == ENOTEMPTY || errno == EBUSY ) { + FS_PASS (); + } else { + FS_FAIL (); + } + /* * Create a new directory for test */ @@ -70,8 +81,7 @@ static void rmdir_error (void) * or there are hard links to the directory other than * dot or a single entry in dot-dot. */ - - EXPECT_ERROR (ENOTEMPTY, rmdir, ".."); + EXPECT_ERROR (ENOTEMPTY, rmdir, "tmp/.."); /* * Go back to parent directory