[LTP] [PATCH v1 03/11] syscalls/quotactl04: Remove useless quotactl mount options

Yang Xu xuyang2018.jy@fujitsu.com
Mon Oct 18 15:09:43 CEST 2021


When use -O quota options for mkfs.ext4, quota mount option
will be ignored[1]. So remove it.

Also add docparse formatting.

[1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c319d3

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 testcases/kernel/syscalls/quotactl/quotactl04.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/syscalls/quotactl/quotactl04.c b/testcases/kernel/syscalls/quotactl/quotactl04.c
index fd3afc888..ca6a94263 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl04.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl04.c
@@ -2,22 +2,33 @@
 /*
  * Copyright (c) 2019 FUJITSU LIMITED. All rights reserved.
  * Author: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
+ */
+
+/*\
+ * [Description]
  *
  * This testcase checks the basic flag of quotactl(2) for project quota on
  * non-XFS filesystems.
  *
  * 1) quotactl(2) succeeds to turn on quota with Q_QUOTAON flag for project.
+ *
  * 2) quotactl(2) succeeds to set disk quota limits with Q_SETQUOTA flag
  *    for project.
+ *
  * 3) quotactl(2) succeeds to get disk quota limits with Q_GETQUOTA flag
  *    for project.
+ *
  * 4) quotactl(2) succeeds to set information about quotafile with Q_SETINFO
  *    flag for project.
+ *
  * 5) quotactl(2) succeeds to get information about quotafile with Q_GETINFO
  *    flag for project.
+ *
  * 6) quotactl(2) succeeds to get quota format with Q_GETFMT flag for project.
+ *
  * 7) quotactl(2) succeeds to get disk quota limit greater than or equal to
  *    ID with Q_GETNEXTQUOTA flag for project.
+ *
  * 8) quotactl(2) succeeds to turn off quota with Q_QUOTAOFF flag for project.
  *
  * Minimum e2fsprogs version required is 1.43.
@@ -34,10 +45,6 @@
 #include "tst_safe_stdio.h"
 #include "tst_test.h"
 
-#ifndef QFMT_VFS_V1
-# define QFMT_VFS_V1 4
-#endif
-
 #define FMTID QFMT_VFS_V1
 #define MNTPOINT	"mntpoint"
 static int32_t fmt_id = FMTID;
@@ -141,7 +148,7 @@ static void setup(void)
 		tst_brk(TCONF, "Test needs mkfs.ext4 >= 1.43 for quota,project option, test skipped");
 	pclose(f);
 	SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL);
-	do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, "quota");
+	do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL);
 }
 
 static void cleanup(void)
-- 
2.23.0



More information about the ltp mailing list