Skip to content

Commit 3aafd51

Browse files
committed
syscalls/{quotactl04, statx05}.c: Replace extra_opts[] with fs_opts[]
extra_opts[] is to store the options which are passed after device name (e.g. fs-size: mkfs -t ext4 /dev/sda1 <fs-size>) so perfer to use fs_opts[] for quotactl04.c and statx05.c. Also add a hint to doc/test-writing-guidelines.txt. References: https://github.com/linux-test-project/ltp/blob/master/doc/test-writing-guidelines.txt https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/mmap/mmap16.c Signed-off-by: Xiao Yang <[email protected]> Acked-by: Yang Xu <[email protected]>
1 parent bde3fbf commit 3aafd51

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

doc/test-writing-guidelines.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,9 @@ The extra options 'extra_opts' should either be 'NULL' if there are none, or a
11161116
will be passed after device name. e.g: +mkfs -t ext4 -b 1024 /dev/sda1 102400+
11171117
in this case.
11181118

1119+
Note that perfer to store the options which can be passed before or after device
1120+
name by 'fs_opts' array.
1121+
11191122
2.2.17 Verifying a filesystem's free space
11201123
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11211124

testcases/kernel/syscalls/quotactl/quotactl04.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ static struct tcase {
102102

103103
static void setup(void)
104104
{
105-
const char *const extra_opts[] = {"-O quota,project", NULL};
105+
const char *const fs_opts[] = {"-O quota,project", NULL};
106106

107107
test_id = geteuid();
108-
SAFE_MKFS(tst_device->dev, tst_device->fs_type, NULL, extra_opts);
108+
SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL);
109109
SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, "quota");
110110
mount_flag = 1;
111111
}

testcases/kernel/syscalls/statx/statx05.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ static void run(unsigned int i)
8787
static void setup(void)
8888
{
8989
char opt_bsize[32];
90-
const char *const extra_opts[] = {"-O encrypt", opt_bsize, NULL};
90+
const char *const fs_opts[] = {"-O encrypt", opt_bsize, NULL};
9191
int ret;
9292

9393
snprintf(opt_bsize, sizeof(opt_bsize), "-b %i", getpagesize());
9494

95-
SAFE_MKFS(tst_device->dev, tst_device->fs_type, NULL, extra_opts);
95+
SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL);
9696
SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, 0);
9797
mount_flag = 1;
9898

0 commit comments

Comments
 (0)