[LTP] [PATCH v3 04/12] syscalls/quotactl:Add docparse formatting
Yang Xu
xuyang2018.jy@fujitsu.com
Tue Nov 9 11:52:39 CET 2021
Also remove useless header files and add linux git in test structure.
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
.../kernel/syscalls/quotactl/quotactl02.c | 54 ++++++-------------
.../kernel/syscalls/quotactl/quotactl02.h | 3 +-
.../kernel/syscalls/quotactl/quotactl03.c | 17 +++---
.../kernel/syscalls/quotactl/quotactl04.c | 39 ++++++--------
.../kernel/syscalls/quotactl/quotactl05.c | 32 +++++------
.../kernel/syscalls/quotactl/quotactl07.c | 9 ++--
6 files changed, 65 insertions(+), 89 deletions(-)
diff --git a/testcases/kernel/syscalls/quotactl/quotactl02.c b/testcases/kernel/syscalls/quotactl/quotactl02.c
index ad81ee7e5..55a6a8906 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl02.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl02.c
@@ -1,50 +1,28 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Copyright (c) 2013-2019 FUJITSU LIMITED. All rights reserved
+ * Copyright (c) 2013-2021 FUJITSU LIMITED. All rights reserved
* Author: DAN LI <li.dan@cn.fujitsu.com>
- * Author: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
+ * Author: Yang Xu <xuyang2018.jy@fujitsu.com>
*/
/*\
* [Description]
*
- * This testcase checks basic flags of quotactl(2) for an XFS file system:
+ * This testcases checks that quotactl(2) on xfs filesystem succeeds to:
*
- * 1. quotactl(2) succeeds to turn off xfs quota and get xfs quota off status
- * for user.
- *
- * 2. quotactl(2) succeeds to turn on xfs quota and get xfs quota on status
- * for user.
- *
- * 3. quotactl(2) succeeds to set and use Q_XGETQUOTA to get xfs disk quota
- * limits for user.
- *
- * 4. quotactl(2) succeeds to set and use Q_XGETNEXTQUOTA to get xfs disk
- * quota limits greater than or equal to ID for user.
- *
- * 5. quotactl(2) succeeds to turn off xfs quota and get xfs quota off statv
- * for user.
- *
- * 6. quotactl(2) succeeds to turn on xfs quota and get xfs quota on statv
- * for user.
- *
- * 7. quotactl(2) succeeds to turn off xfs quota and get xfs quota off status
- * for group.
- *
- * 8. quotactl(2) succeeds to turn on xfs quota and get xfs quota on status
- * for group.
- *
- * 9. quotactl(2) succeeds to set and use Q_XGETQUOTA to get xfs disk quota
- * limits for group.
- *
- * 10. quotactl(2) succeeds to set and use Q_XGETNEXTQUOTA to get xfs disk
- * quota limits for group.
- *
- * 11. quotactl(2) succeeds to turn off xfs quota and get xfs quota off statv
- * for group.
- *
- * 12. quotactl(2) succeeds to turn on xfs quota and get xfs quota on statv
- * for group.
+ * - turn off xfs quota and get xfs quota off status for user
+ * - turn on xfs quota and get xfs quota on status for user
+ * - set and use Q_XGETQUOTA to get xfs disk quota limits for user
+ * - set and use Q_XGETNEXTQUOTA to get xfs disk quota limits greater than or
+ * equal to ID for user
+ * - turn off xfs quota and get xfs quota off statv for user
+ * - turn on xfs quota and get xfs quota on statv for user
+ * - turn off xfs quota and get xfs quota off status for group
+ * - turn on xfs quota and get xfs quota on status for group
+ * - set and use Q_XGETQUOTA to get xfs disk quota limits for group
+ * - set and use Q_XGETNEXTQUOTA to get xfs disk quota limits for group
+ * - turn off xfs quota and get xfs quota off statv for group
+ * - turn on xfs quota and get xfs quota on statv for gorup
*/
#include "quotactl02.h"
diff --git a/testcases/kernel/syscalls/quotactl/quotactl02.h b/testcases/kernel/syscalls/quotactl/quotactl02.h
index 37f3d7eb7..3351fb578 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl02.h
+++ b/testcases/kernel/syscalls/quotactl/quotactl02.h
@@ -1,14 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2019 FUJITSU LIMITED. All rights reserved.
- * Author: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
+ * Author: Yang Xu <xuyang2018.jy@fujitsu.com>
*/
#ifndef QUOTACTL02_H
#define QUOTACTL02_H
#define _GNU_SOURCE
-#include "config.h"
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/testcases/kernel/syscalls/quotactl/quotactl03.c b/testcases/kernel/syscalls/quotactl/quotactl03.c
index 3ec931727..e0e4bf5b2 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl03.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl03.c
@@ -4,10 +4,9 @@
* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
*/
-/*
- * Test Name: quotactl03
+/*\
+ * [Description]
*
- * Description:
* quotactl(2) with XGETNEXTQUOTA looks for the next active quota for an user
* equal or higher to a given ID, in this test the ID is specified to a value
* close to UINT_MAX(max value of unsigned int). When reaching the upper limit
@@ -16,11 +15,11 @@
*
* This kernel bug of xfs has been fixed in:
*
- * commit 657bdfb7f5e68ca5e2ed009ab473c429b0d6af85
- * Author: Eric Sandeen <sandeen@redhat.com>
- * Date: Tue Jan 17 11:43:38 2017 -0800
+ * commit 657bdfb7f5e68ca5e2ed009ab473c429b0d6af85
+ * Author: Eric Sandeen <sandeen@redhat.com>
+ * Date: Tue Jan 17 11:43:38 2017 -0800
*
- * xfs: don't wrap ID in xfs_dq_get_next_id
+ * xfs: don't wrap ID in xfs_dq_get_next_id
*/
#define _GNU_SOURCE
@@ -75,6 +74,10 @@ static struct tst_test test = {
.dev_fs_type = "xfs",
.mntpoint = mntpoint,
.mnt_data = "usrquota",
+ .tags = (const struct tst_tag[]) {
+ {"linux-git", "657bdfb7f5e6"},
+ {}
+ }
};
#else
diff --git a/testcases/kernel/syscalls/quotactl/quotactl04.c b/testcases/kernel/syscalls/quotactl/quotactl04.c
index f3e2cf3a5..dab61cf4d 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl04.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl04.c
@@ -1,24 +1,22 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Copyright (c) 2019 FUJITSU LIMITED. All rights reserved.
- * Author: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
+ * Copyright (c) 2019-2021 FUJITSU LIMITED. All rights reserved.
+ * Author: Yang Xu <xuyang2018.jy@fujitsu.com>
+ */
+
+/*\
+ * [Description]
*
- * This testcase checks the basic flag of quotactl(2) for project quota on
- * non-XFS filesystems.
+ * This testcase checks that quotactl(2) on ext4 filesystem succeeds to:
*
- * 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.
+ * - turn on quota with Q_QUOTAON flag for project
+ * - set disk quota limits with Q_SETQUOTA flag for project
+ * - get disk quota limits with Q_GETQUOTA flag for project
+ * - set information about quotafile with Q_SETINFO flag for project
+ * - get information about quotafile with Q_GETINFO flag for project
+ * - get quota format with Q_GETFMT flag for project
+ * - get disk quota limit greater than or equal to ID with Q_GETNEXTQUOTA flag for project
+ * - turn off quota with Q_QUOTAOFF flag for project
*
* Minimum e2fsprogs version required is 1.43.
*/
@@ -29,14 +27,9 @@
#include <stdio.h>
#include <sys/stat.h>
#include <sys/mount.h>
-#include "config.h"
-#include "lapi/quotactl.h"
#include "tst_safe_stdio.h"
#include "tst_test.h"
-
-#ifndef QFMT_VFS_V1
-# define QFMT_VFS_V1 4
-#endif
+#include "lapi/quotactl.h"
#define FMTID QFMT_VFS_V1
#define MNTPOINT "mntpoint"
diff --git a/testcases/kernel/syscalls/quotactl/quotactl05.c b/testcases/kernel/syscalls/quotactl/quotactl05.c
index e811e47a4..15a6c1e67 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl05.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl05.c
@@ -1,23 +1,23 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Copyright (c) 2019 FUJITSU LIMITED. All rights reserved.
- * Author: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
+ * Copyright (c) 2019-2021 FUJITSU LIMITED. All rights reserved.
+ * Author: Yang Xu <xuyang2018.jy@.fujitsu.com>
+ */
+
+/*\
+ * [Description]
*
- * This testcase checks basic flags of quotactl(2) for project on an XFS file
- * system:
- * 1) quotactl(2) succeeds to turn off xfs quota and get xfs quota off status
- * for project.
- * 2) quotactl(2) succeeds to turn on xfs quota and get xfs quota on status
- * for project.
- * 3) quotactl(2) succeeds to set and use Q_XGETQUOTA to get xfs disk quota
- * limits for project.
- * 4) quotactl(2) succeeds to set and use Q_XGETNEXTQUOTA to get xfs disk
- * quota limits Cgreater than or equal to ID for project.
- * 5) quotactl(2) succeeds to turn off xfs quota and get xfs quota off statv
- * for project.
- * 6) quotactl(2) succeeds to turn on xfs quota and get xfs quota on statv
- * for project.
+ * This testcases checks that quotactl(2) on xfs filesystem succeeds to:
+ *
+ * - turn off xfs quota and get xfs quota off status for project
+ * - turn on xfs quota and get xfs quota on status for project
+ * - set and use Q_XGETQUOTA to get xfs disk quota limits for project
+ * - set and use Q_XGETNEXTQUOTA to get xfs disk quota limits greater than or
+ * equal to ID for project
+ * - turn off xfs quota and get xfs quota off statv for project
+ * - turn on xfs quota and get xfs quota on statvfor project
*/
+
#include "quotactl02.h"
#if defined(HAVE_XFS_XQM_H)
diff --git a/testcases/kernel/syscalls/quotactl/quotactl07.c b/testcases/kernel/syscalls/quotactl/quotactl07.c
index db477589b..2992a6112 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl07.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl07.c
@@ -1,19 +1,22 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2019 FUJITSU LIMITED. All rights reserved.
- * Author: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
+ * Author: Yang Xu <xuyang2018.jy@fujitsu.com>
+ */
+
+/*\
+ * [Description]
*
* This is a regresstion test for kernel commit 3dd4d40b4208
* ("xfs: Sanity check flags of Q_XQUOTARM call").
*/
-#include "config.h"
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/quota.h>
-#include "lapi/quotactl.h"
#include "tst_test.h"
+#include "lapi/quotactl.h"
#ifdef HAVE_XFS_XQM_H
# include <xfs/xqm.h>
--
2.23.0
More information about the ltp
mailing list