Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2017-12-27 20:47:48 +0300
committerChristopher Haster <chaster@utexas.edu>2018-01-12 21:07:40 +0300
commitdb8872781a7bc110b2a84b67c5fe818e9708e68a (patch)
tree7025d5302cc13e26807b43f2fcac14b851988d69 /tests
parentc2fab8fabb18c6d5e3670b73b1009a8acf39dcab (diff)
Added error code LFS_ERR_NOTEMPTY
As noted by itayzafrir, removing a non-empty directory should error with ENOTEMPTY, not EINVAL
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_dirs.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_dirs.sh b/tests/test_dirs.sh
index 4318890..197d0f5 100755
--- a/tests/test_dirs.sh
+++ b/tests/test_dirs.sh
@@ -126,7 +126,7 @@ TEST
echo "--- Directory remove ---"
tests/test.py << TEST
lfs_mount(&lfs, &cfg) => 0;
- lfs_remove(&lfs, "potato") => LFS_ERR_INVAL;
+ lfs_remove(&lfs, "potato") => LFS_ERR_NOTEMPTY;
lfs_remove(&lfs, "potato/sweet") => 0;
lfs_remove(&lfs, "potato/baked") => 0;
lfs_remove(&lfs, "potato/fried") => 0;
@@ -255,7 +255,7 @@ tests/test.py << TEST
lfs_rename(&lfs, "warmpotato/baked", "coldpotato/baked") => 0;
lfs_rename(&lfs, "warmpotato/sweet", "coldpotato/sweet") => 0;
lfs_rename(&lfs, "warmpotato/fried", "coldpotato/fried") => 0;
- lfs_remove(&lfs, "coldpotato") => LFS_ERR_INVAL;
+ lfs_remove(&lfs, "coldpotato") => LFS_ERR_NOTEMPTY;
lfs_remove(&lfs, "warmpotato") => 0;
lfs_unmount(&lfs) => 0;
TEST
@@ -285,7 +285,7 @@ TEST
echo "--- Recursive remove ---"
tests/test.py << TEST
lfs_mount(&lfs, &cfg) => 0;
- lfs_remove(&lfs, "coldpotato") => LFS_ERR_INVAL;
+ lfs_remove(&lfs, "coldpotato") => LFS_ERR_NOTEMPTY;
lfs_dir_open(&lfs, &dir[0], "coldpotato") => 0;
lfs_dir_read(&lfs, &dir[0], &info) => 1;
@@ -328,7 +328,7 @@ TEST
echo "--- Multi-block remove ---"
tests/test.py << TEST
lfs_mount(&lfs, &cfg) => 0;
- lfs_remove(&lfs, "cactus") => LFS_ERR_INVAL;
+ lfs_remove(&lfs, "cactus") => LFS_ERR_NOTEMPTY;
for (int i = 0; i < $LARGESIZE; i++) {
sprintf((char*)buffer, "cactus/test%d", i);