F2FS has removed the trailing "=" in the mount options for disabling
user, group, and project journaled quotas. To maintain compatibility,
update the test cases in f2fs/015 to try the new syntax first, and fall
back to the legacy syntax if the initial mount attempt fails.

Signed-off-by: Joanne Chang <[email protected]>
---
 tests/f2fs/015     | 13 +++++++++----
 tests/f2fs/015.out |  6 +++---
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/tests/f2fs/015 b/tests/f2fs/015
index 81ea9818..54cada4a 100755
--- a/tests/f2fs/015
+++ b/tests/f2fs/015
@@ -66,9 +66,9 @@ options=(
        "usrjquota=ausrquota"           ""                      \
        "grpjquota=agrpquota"           ""                      \
        "prjjquota=aprjquota"           ""                      \
-       "usrjquota="                    ""                      \
-       "grpjquota="                    ""                      \
-       "prjjquota="                    ""                      \
+       "usrjquota"                     ""                      \
+       "grpjquota"                     ""                      \
+       "prjjquota"                     ""                      \
        "usrjquota=ausrquota"           "extra_attr,quota,project_quota"        
\
        "grpjquota=agrpquota"           "extra_attr,quota,project_quota"        
\
        "prjjquota=aprjquota"           "extra_attr,quota,project_quota"        
\
@@ -119,7 +119,12 @@ do
        else
                _scratch_mkfs >> $seqres.full || _fail "mkfs failed"
        fi
-       _try_scratch_mount "-o ${options[$i]}" >> $seqres.full 2>&1
+       if [[ "${options[$i]}" == *jquota ]]; then
+               _try_scratch_mount "-o ${options[$i]}" >> $seqres.full 2>&1 || \
+                       _try_scratch_mount "-o ${options[$i]}=" >> $seqres.full 
2>&1
+       else
+               _try_scratch_mount "-o ${options[$i]}" >> $seqres.full 2>&1
+       fi
        echo $?
        _scratch_unmount >> $seqres.full 2>&1
 done
diff --git a/tests/f2fs/015.out b/tests/f2fs/015.out
index cd273550..45ef9ea8 100644
--- a/tests/f2fs/015.out
+++ b/tests/f2fs/015.out
@@ -101,11 +101,11 @@ Option#98: grpjquota=agrpquota :
 32
 Option#100: prjjquota=aprjquota : 
 32
-Option#102: usrjquota= : 
+Option#102: usrjquota : 
 0
-Option#104: grpjquota= : 
+Option#104: grpjquota : 
 0
-Option#106: prjjquota= : 
+Option#106: prjjquota : 
 0
 Option#108: usrjquota=ausrquota : extra_attr,quota,project_quota
 0
-- 
2.54.0.563.g4f69b47b94-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to