* [LTP] [PATCH] aio02: Use mounted filesystem instead of temp directory
@ 2020-02-12 5:08 Yang Xu
2020-02-12 5:30 ` Xiao Yang
0 siblings, 1 reply; 10+ messages in thread
From: Yang Xu @ 2020-02-12 5:08 UTC (permalink / raw)
To: ltp
tmpfs doesn't support O_DIRECT flag, open file with this flag on
tmpfs will report EINVAL error. I thin we should test this case on
ext2 filesystem instead of temp directory.
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
testcases/kernel/io/aio/aio02.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/io/aio/aio02.c b/testcases/kernel/io/aio/aio02.c
index e283afba9..205d1b088 100644
--- a/testcases/kernel/io/aio/aio02.c
+++ b/testcases/kernel/io/aio/aio02.c
@@ -17,7 +17,8 @@
#define AIO_MAXIO 32
#define AIO_BLKSIZE (64*1024)
-
+#define MNTPOINT "mnt_point"
+#define FILE_TEST MNTPOINT"/file"
static int wait_count = 0;
#define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE: " #y: "READ : " #y), \
@@ -206,7 +207,7 @@ static void test_io(unsigned int n)
int status;
struct testcase *tc = testcases + n;
- status = io_tio("file", tc->flags, tc->operation);
+ status = io_tio(FILE_TEST, tc->flags, tc->operation);
if (status)
tst_res(TFAIL, "%s, status = %d", tc->desc, status);
else
@@ -214,7 +215,9 @@ static void test_io(unsigned int n)
}
static struct tst_test test = {
- .needs_tmpdir = 1,
+ .mount_device = 1,
+ .mntpoint = MNTPOINT,
+ .needs_root = 1,
.test = test_io,
.tcnt = ARRAY_SIZE(testcases),
};
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [LTP] [PATCH] aio02: Use mounted filesystem instead of temp directory
2020-02-12 5:08 [LTP] [PATCH] aio02: Use mounted filesystem instead of temp directory Yang Xu
@ 2020-02-12 5:30 ` Xiao Yang
2020-02-12 5:53 ` Yang Xu
2020-02-12 7:31 ` [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs Yang Xu
0 siblings, 2 replies; 10+ messages in thread
From: Xiao Yang @ 2020-02-12 5:30 UTC (permalink / raw)
To: ltp
On 2020/2/12 13:08, Yang Xu wrote:
> tmpfs doesn't support O_DIRECT flag, open file with this flag on
> tmpfs will report EINVAL error. I thin we should test this case on
> ext2 filesystem instead of temp directory.
Hi Xu,
Thanks for your quick fix. :-)
I don't want to use the fixed file system to run aio02.
I perfer to just drop O_DIRECT flag for tmpfs, as below:
1) Drop O_DIRECT flag for tmpfs.
2) Keep O_DIRECT flag for other filesystem.
In this case, user still can run aio02 with different filesystem by
mounting specified filesystem on $TMPDIR.
Best Regards,
Xiao Yang
> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
> ---
> testcases/kernel/io/aio/aio02.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/kernel/io/aio/aio02.c b/testcases/kernel/io/aio/aio02.c
> index e283afba9..205d1b088 100644
> --- a/testcases/kernel/io/aio/aio02.c
> +++ b/testcases/kernel/io/aio/aio02.c
> @@ -17,7 +17,8 @@
>
> #define AIO_MAXIO 32
> #define AIO_BLKSIZE (64*1024)
> -
> +#define MNTPOINT "mnt_point"
> +#define FILE_TEST MNTPOINT"/file"
> static int wait_count = 0;
>
> #define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE: " #y: "READ : " #y), \
> @@ -206,7 +207,7 @@ static void test_io(unsigned int n)
> int status;
> struct testcase *tc = testcases + n;
>
> - status = io_tio("file", tc->flags, tc->operation);
> + status = io_tio(FILE_TEST, tc->flags, tc->operation);
> if (status)
> tst_res(TFAIL, "%s, status = %d", tc->desc, status);
> else
> @@ -214,7 +215,9 @@ static void test_io(unsigned int n)
> }
>
> static struct tst_test test = {
> - .needs_tmpdir = 1,
> + .mount_device = 1,
> + .mntpoint = MNTPOINT,
> + .needs_root = 1,
> .test = test_io,
> .tcnt = ARRAY_SIZE(testcases),
> };
^ permalink raw reply [flat|nested] 10+ messages in thread
* [LTP] [PATCH] aio02: Use mounted filesystem instead of temp directory
2020-02-12 5:30 ` Xiao Yang
@ 2020-02-12 5:53 ` Yang Xu
2020-02-12 7:31 ` [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs Yang Xu
1 sibling, 0 replies; 10+ messages in thread
From: Yang Xu @ 2020-02-12 5:53 UTC (permalink / raw)
To: ltp
on 2020/02/12 13:30, Xiao Yang wrote:
> On 2020/2/12 13:08, Yang Xu wrote:
>> tmpfs doesn't support O_DIRECT flag, open file with this flag on
>> tmpfs will report EINVAL error. I thin we should test this case on
>> ext2 filesystem instead of temp directory.
> Hi Xu,
>
> Thanks for your quick fix. :-)
>
> I don't want to use the fixed file system to run aio02.
> I perfer to just drop O_DIRECT flag for tmpfs, as below:
> 1) Drop O_DIRECT flag for tmpfs.
> 2) Keep O_DIRECT flag for other filesystem.
> In this case, user still can run aio02 with different filesystem by
> mounting specified filesystem on $TMPDIR.
>
Sound reasonable to me, I will filter O_DIRECT flag for tmpfs.
> Best Regards,
> Xiao Yang
>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>> ---
>> ? testcases/kernel/io/aio/aio02.c | 9 ++++++---
>> ? 1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/testcases/kernel/io/aio/aio02.c
>> b/testcases/kernel/io/aio/aio02.c
>> index e283afba9..205d1b088 100644
>> --- a/testcases/kernel/io/aio/aio02.c
>> +++ b/testcases/kernel/io/aio/aio02.c
>> @@ -17,7 +17,8 @@
>>
>> ? #define AIO_MAXIO 32
>> ? #define AIO_BLKSIZE (64*1024)
>> -
>> +#define MNTPOINT?? "mnt_point"
>> +#define FILE_TEST MNTPOINT"/file"
>> ? static int wait_count = 0;
>>
>> ? #define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE: "
>> #y: "READ : " #y), \
>> @@ -206,7 +207,7 @@ static void test_io(unsigned int n)
>> ????? int status;
>> ????? struct testcase *tc = testcases + n;
>>
>> -??? status = io_tio("file", tc->flags, tc->operation);
>> +??? status = io_tio(FILE_TEST, tc->flags, tc->operation);
>> ????? if (status)
>> ????????? tst_res(TFAIL, "%s, status = %d", tc->desc, status);
>> ????? else
>> @@ -214,7 +215,9 @@ static void test_io(unsigned int n)
>> ? }
>>
>> ? static struct tst_test test = {
>> -??? .needs_tmpdir = 1,
>> +??? .mount_device = 1,
>> +??? .mntpoint = MNTPOINT,
>> +??? .needs_root = 1,
>> ????? .test = test_io,
>> ????? .tcnt = ARRAY_SIZE(testcases),
>> ? };
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs
2020-02-12 5:30 ` Xiao Yang
2020-02-12 5:53 ` Yang Xu
@ 2020-02-12 7:31 ` Yang Xu
2020-02-12 9:42 ` Xiao Yang
1 sibling, 1 reply; 10+ messages in thread
From: Yang Xu @ 2020-02-12 7:31 UTC (permalink / raw)
To: ltp
tmpfs doesn't support O_DIRECT flag, drop it. userer still can run aio02
with different filesystem by mounting specified filesystem on $TMPDIR.
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
testcases/kernel/io/aio/aio02.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/io/aio/aio02.c b/testcases/kernel/io/aio/aio02.c
index e283afba9..3bb89c45f 100644
--- a/testcases/kernel/io/aio/aio02.c
+++ b/testcases/kernel/io/aio/aio02.c
@@ -18,7 +18,8 @@
#define AIO_MAXIO 32
#define AIO_BLKSIZE (64*1024)
-static int wait_count = 0;
+static int wait_count;
+static unsigned int use_tmpfs;
#define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE: " #y: "READ : " #y), \
.flags = y, .operation = x
@@ -206,6 +207,11 @@ static void test_io(unsigned int n)
int status;
struct testcase *tc = testcases + n;
+ if (use_tmpfs && (tc->flags & O_DIRECT)) {
+ tst_res(TINFO, "Drop O_DIRECT flag for tmpfs");
+ tc->flags &= (~O_DIRECT);
+ }
+
status = io_tio("file", tc->flags, tc->operation);
if (status)
tst_res(TFAIL, "%s, status = %d", tc->desc, status);
@@ -213,7 +219,14 @@ static void test_io(unsigned int n)
tst_res(TPASS, "%s", tc->desc);
}
+static void setup(void)
+{
+ if (tst_fs_type(".") == TST_TMPFS_MAGIC)
+ use_tmpfs = 1;
+}
+
static struct tst_test test = {
+ .setup = setup,
.needs_tmpdir = 1,
.test = test_io,
.tcnt = ARRAY_SIZE(testcases),
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs
2020-02-12 7:31 ` [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs Yang Xu
@ 2020-02-12 9:42 ` Xiao Yang
2020-02-12 9:47 ` Xiao Yang
0 siblings, 1 reply; 10+ messages in thread
From: Xiao Yang @ 2020-02-12 9:42 UTC (permalink / raw)
To: ltp
On 2020/2/12 15:31, Yang Xu wrote:
> tmpfs doesn't support O_DIRECT flag, drop it. userer still can run aio02
> with different filesystem by mounting specified filesystem on $TMPDIR.
>
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
> testcases/kernel/io/aio/aio02.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/io/aio/aio02.c b/testcases/kernel/io/aio/aio02.c
> index e283afba9..3bb89c45f 100644
> --- a/testcases/kernel/io/aio/aio02.c
> +++ b/testcases/kernel/io/aio/aio02.c
> @@ -18,7 +18,8 @@
> #define AIO_MAXIO 32
> #define AIO_BLKSIZE (64*1024)
>
> -static int wait_count = 0;
> +static int wait_count;
Hi,
Why do you set wait_count to 0?
Isn't it default behavior?
> +static unsigned int use_tmpfs;
>
> #define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE: " #y: "READ : " #y), \
> .flags = y, .operation = x
> @@ -206,6 +207,11 @@ static void test_io(unsigned int n)
> int status;
> struct testcase *tc = testcases + n;
>
> + if (use_tmpfs && (tc->flags & O_DIRECT)) {
> + tst_res(TINFO, "Drop O_DIRECT flag for tmpfs");
> + tc->flags &= (~O_DIRECT);
> + }
> +
> status = io_tio("file", tc->flags, tc->operation);
> if (status)
> tst_res(TFAIL, "%s, status = %d", tc->desc, status);
> @@ -213,7 +219,14 @@ static void test_io(unsigned int n)
> tst_res(TPASS, "%s", tc->desc);
> }
>
> +static void setup(void)
> +{
> + if (tst_fs_type(".") == TST_TMPFS_MAGIC)
> + use_tmpfs = 1;
Could you simple the fix by moving 'tst_fs_type(".") == TST_TMPFS_MAGIC
' into test_io().
(i.e. Drop unused setup() and use_tmpfs.)
Thanks,
Xiao Yang
> +}
> +
> static struct tst_test test = {
> + .setup = setup,
> .needs_tmpdir = 1,
> .test = test_io,
> .tcnt = ARRAY_SIZE(testcases),
^ permalink raw reply [flat|nested] 10+ messages in thread
* [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs
2020-02-12 9:42 ` Xiao Yang
@ 2020-02-12 9:47 ` Xiao Yang
2020-02-12 9:53 ` Yang Xu
2020-02-12 10:07 ` [LTP] [PATCH v3] " Yang Xu
0 siblings, 2 replies; 10+ messages in thread
From: Xiao Yang @ 2020-02-12 9:47 UTC (permalink / raw)
To: ltp
On 2020/2/12 17:42, Xiao Yang wrote:
> On 2020/2/12 15:31, Yang Xu wrote:
>> tmpfs doesn't support O_DIRECT flag, drop it. userer still can run aio02
>> with different filesystem by mounting specified filesystem on $TMPDIR.
>>
>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>> ---
>> testcases/kernel/io/aio/aio02.c | 15 ++++++++++++++-
>> 1 file changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/testcases/kernel/io/aio/aio02.c b/testcases/kernel/io/aio/aio02.c
>> index e283afba9..3bb89c45f 100644
>> --- a/testcases/kernel/io/aio/aio02.c
>> +++ b/testcases/kernel/io/aio/aio02.c
>> @@ -18,7 +18,8 @@
>> #define AIO_MAXIO 32
>> #define AIO_BLKSIZE (64*1024)
>>
>> -static int wait_count = 0;
>> +static int wait_count;
> Hi,
>
> Why do you set wait_count to 0?
> Isn't it default behavior?
Please ignore the comment. Sorry, I misunderstand the change.
>> +static unsigned int use_tmpfs;
>>
>> #define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE: " #y: "READ : " #y), \
>> .flags = y, .operation = x
>> @@ -206,6 +207,11 @@ static void test_io(unsigned int n)
>> int status;
>> struct testcase *tc = testcases + n;
>>
>> + if (use_tmpfs&& (tc->flags& O_DIRECT)) {
>> + tst_res(TINFO, "Drop O_DIRECT flag for tmpfs");
>> + tc->flags&= (~O_DIRECT);
>> + }
>> +
>> status = io_tio("file", tc->flags, tc->operation);
>> if (status)
>> tst_res(TFAIL, "%s, status = %d", tc->desc, status);
>> @@ -213,7 +219,14 @@ static void test_io(unsigned int n)
>> tst_res(TPASS, "%s", tc->desc);
>> }
>>
>> +static void setup(void)
>> +{
>> + if (tst_fs_type(".") == TST_TMPFS_MAGIC)
>> + use_tmpfs = 1;
> Could you simple the fix by moving 'tst_fs_type(".") == TST_TMPFS_MAGIC
> ' into test_io().
> (i.e. Drop unused setup() and use_tmpfs.)
>
> Thanks,
> Xiao Yang
>> +}
>> +
>> static struct tst_test test = {
>> + .setup = setup,
>> .needs_tmpdir = 1,
>> .test = test_io,
>> .tcnt = ARRAY_SIZE(testcases),
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs
2020-02-12 9:47 ` Xiao Yang
@ 2020-02-12 9:53 ` Yang Xu
2020-02-12 10:07 ` [LTP] [PATCH v3] " Yang Xu
1 sibling, 0 replies; 10+ messages in thread
From: Yang Xu @ 2020-02-12 9:53 UTC (permalink / raw)
To: ltp
on 2020/02/12 17:47, Xiao Yang wrote:
> On 2020/2/12 17:42, Xiao Yang wrote:
>> On 2020/2/12 15:31, Yang Xu wrote:
>>> tmpfs doesn't support O_DIRECT flag, drop it. userer still can run aio02
>>> with different filesystem by mounting specified filesystem on $TMPDIR.
>>>
>>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>>> ---
>>> ? testcases/kernel/io/aio/aio02.c | 15 ++++++++++++++-
>>> ? 1 file changed, 14 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/testcases/kernel/io/aio/aio02.c
>>> b/testcases/kernel/io/aio/aio02.c
>>> index e283afba9..3bb89c45f 100644
>>> --- a/testcases/kernel/io/aio/aio02.c
>>> +++ b/testcases/kernel/io/aio/aio02.c
>>> @@ -18,7 +18,8 @@
>>> ? #define AIO_MAXIO 32
>>> ? #define AIO_BLKSIZE (64*1024)
>>>
>>> -static int wait_count = 0;
>>> +static int wait_count;
>> Hi,
>>
>> Why do you set wait_count to 0?
>> Isn't it default behavior?
> Please ignore the comment.? Sorry, I misunderstand the change.
>>> +static unsigned int use_tmpfs;
>>>
>>> ? #define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE:
>>> " #y: "READ : " #y), \
>>> ????? .flags = y, .operation = x
>>> @@ -206,6 +207,11 @@ static void test_io(unsigned int n)
>>> ????? int status;
>>> ????? struct testcase *tc = testcases + n;
>>>
>>> +??? if (use_tmpfs&&? (tc->flags&? O_DIRECT)) {
>>> +??????? tst_res(TINFO, "Drop O_DIRECT flag for tmpfs");
>>> +??????? tc->flags&= (~O_DIRECT);
>>> +??? }
>>> +
>>> ????? status = io_tio("file", tc->flags, tc->operation);
>>> ????? if (status)
>>> ????????? tst_res(TFAIL, "%s, status = %d", tc->desc, status);
>>> @@ -213,7 +219,14 @@ static void test_io(unsigned int n)
>>> ????????? tst_res(TPASS, "%s", tc->desc);
>>> ? }
>>>
>>> +static void setup(void)
>>> +{
>>> +??? if (tst_fs_type(".") == TST_TMPFS_MAGIC)
>>> +??????? use_tmpfs = 1;
>> Could you simple the fix by moving 'tst_fs_type(".") == TST_TMPFS_MAGIC
>> ' into test_io().
>> (i.e. Drop unused setup() and use_tmpfs.)
Hi Xiao
Of course, I put this in setup becuase it only run a time. But
tst_fs_type function is simple and move it into test_io is also ok.
I will accept your advise.
Best Regards
Yang Xu
>>
>> Thanks,
>> Xiao Yang
>>> +}
>>> +
>>> ? static struct tst_test test = {
>>> +??? .setup = setup,
>>> ????? .needs_tmpdir = 1,
>>> ????? .test = test_io,
>>> ????? .tcnt = ARRAY_SIZE(testcases),
>>
>>
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [LTP] [PATCH v3] aio02: Drop O_DIRECT flag for tmpfs
2020-02-12 9:47 ` Xiao Yang
2020-02-12 9:53 ` Yang Xu
@ 2020-02-12 10:07 ` Yang Xu
2020-02-12 13:37 ` Jan Stancek
1 sibling, 1 reply; 10+ messages in thread
From: Yang Xu @ 2020-02-12 10:07 UTC (permalink / raw)
To: ltp
tmpfs doesn't support O_DIRECT flag, drop it. So user still can run aio02
with different filesystem by mounting specified filesystem on $TMPDIR.
Also remove unused static value initialization.
Reviewed-by: Xiao Yang <ice_yangxiao@163.com>
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
testcases/kernel/io/aio/aio02.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/io/aio/aio02.c b/testcases/kernel/io/aio/aio02.c
index e283afba9..6dec073a2 100644
--- a/testcases/kernel/io/aio/aio02.c
+++ b/testcases/kernel/io/aio/aio02.c
@@ -18,7 +18,7 @@
#define AIO_MAXIO 32
#define AIO_BLKSIZE (64*1024)
-static int wait_count = 0;
+static int wait_count;
#define DESC_FLAGS_OPR(x, y) .desc = (x == IO_CMD_PWRITE ? "WRITE: " #y: "READ : " #y), \
.flags = y, .operation = x
@@ -206,6 +206,11 @@ static void test_io(unsigned int n)
int status;
struct testcase *tc = testcases + n;
+ if ((tst_fs_type(".") == TST_TMPFS_MAGIC) && (tc->flags & O_DIRECT)) {
+ tst_res(TINFO, "Drop O_DIRECT flag for tmpfs");
+ tc->flags &= ~O_DIRECT;
+ }
+
status = io_tio("file", tc->flags, tc->operation);
if (status)
tst_res(TFAIL, "%s, status = %d", tc->desc, status);
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [LTP] [PATCH v3] aio02: Drop O_DIRECT flag for tmpfs
2020-02-12 10:07 ` [LTP] [PATCH v3] " Yang Xu
@ 2020-02-12 13:37 ` Jan Stancek
2020-02-13 3:03 ` Xiao Yang
0 siblings, 1 reply; 10+ messages in thread
From: Jan Stancek @ 2020-02-12 13:37 UTC (permalink / raw)
To: ltp
----- Original Message -----
> tmpfs doesn't support O_DIRECT flag, drop it. So user still can run aio02
> with different filesystem by mounting specified filesystem on $TMPDIR.
>
> Also remove unused static value initialization.
>
> Reviewed-by: Xiao Yang <ice_yangxiao@163.com>
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
> testcases/kernel/io/aio/aio02.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Acked-by: Jan Stancek <jstancek@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [LTP] [PATCH v3] aio02: Drop O_DIRECT flag for tmpfs
2020-02-12 13:37 ` Jan Stancek
@ 2020-02-13 3:03 ` Xiao Yang
0 siblings, 0 replies; 10+ messages in thread
From: Xiao Yang @ 2020-02-13 3:03 UTC (permalink / raw)
To: ltp
On 2020/2/12 21:37, Jan Stancek wrote:
>
> ----- Original Message -----
>> tmpfs doesn't support O_DIRECT flag, drop it. So user still can run aio02
>> with different filesystem by mounting specified filesystem on $TMPDIR.
>>
>> Also remove unused static value initialization.
>>
>> Reviewed-by: Xiao Yang<ice_yangxiao@163.com>
>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>> ---
>> testcases/kernel/io/aio/aio02.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
> Acked-by: Jan Stancek<jstancek@redhat.com>
>
>
Hi all,
Thanks, I will push it with a minor change:
Keep original tc->flags and change cloned new_flags for tmpfs so that
running aio02
in loops can report the 'Drop ...' hint for each changed subtest. As below:
Without the change:
-----------------------------------------------------------------------------------
[root@Fedora-30 aio]# ./aio02 -i 2
tst_test.c:1215: INFO: Timeout per run is 0h 05m 00s
aio02.c:210: INFO: Drop O_DIRECT flag for tmpfs
aio02.c:218: PASS: WRITE: O_WRONLY | O_TRUNC | O_DIRECT | O_LARGEFILE |
O_CREAT
aio02.c:210: INFO: Drop O_DIRECT flag for tmpfs
aio02.c:218: PASS: READ : O_RDONLY | O_DIRECT | O_LARGEFILE
aio02.c:218: PASS: WRITE: O_RDWR | O_TRUNC
aio02.c:218: PASS: READ : O_RDWR
aio02.c:218: PASS: WRITE: O_WRONLY | O_TRUNC
aio02.c:218: PASS: READ : O_RDONLY
aio02.c:218: PASS: WRITE: O_WRONLY | O_TRUNC | O_DIRECT | O_LARGEFILE |
O_CREAT
aio02.c:218: PASS: READ : O_RDONLY | O_DIRECT | O_LARGEFILE
aio02.c:218: PASS: WRITE: O_RDWR | O_TRUNC
aio02.c:218: PASS: READ : O_RDWR
aio02.c:218: PASS: WRITE: O_WRONLY | O_TRUNC
aio02.c:218: PASS: READ : O_RDONLY
...
-----------------------------------------------------------------------------------
With the change:
-----------------------------------------------------------------------------------
[root@Fedora-30 aio]# ./aio02 -i 2
tst_test.c:1215: INFO: Timeout per run is 0h 05m 00s
aio02.c:212: INFO: Drop O_DIRECT flag for tmpfs
aio02.c:220: PASS: WRITE: O_WRONLY | O_TRUNC | O_DIRECT | O_LARGEFILE |
O_CREAT
aio02.c:212: INFO: Drop O_DIRECT flag for tmpfs
aio02.c:220: PASS: READ : O_RDONLY | O_DIRECT | O_LARGEFILE
aio02.c:220: PASS: WRITE: O_RDWR | O_TRUNC
aio02.c:220: PASS: READ : O_RDWR
aio02.c:220: PASS: WRITE: O_WRONLY | O_TRUNC
aio02.c:220: PASS: READ : O_RDONLY
aio02.c:212: INFO: Drop O_DIRECT flag for tmpfs
aio02.c:220: PASS: WRITE: O_WRONLY | O_TRUNC | O_DIRECT | O_LARGEFILE |
O_CREAT
aio02.c:212: INFO: Drop O_DIRECT flag for tmpfs
aio02.c:220: PASS: READ : O_RDONLY | O_DIRECT | O_LARGEFILE
aio02.c:220: PASS: WRITE: O_RDWR | O_TRUNC
aio02.c:220: PASS: READ : O_RDWR
aio02.c:220: PASS: WRITE: O_WRONLY | O_TRUNC
aio02.c:220: PASS: READ : O_RDONLY
...
-----------------------------------------------------------------------------------
Thanks,
Xiao Yang
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-02-13 3:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 5:08 [LTP] [PATCH] aio02: Use mounted filesystem instead of temp directory Yang Xu
2020-02-12 5:30 ` Xiao Yang
2020-02-12 5:53 ` Yang Xu
2020-02-12 7:31 ` [LTP] [PATCH v2] aio02: Drop O_DIRECT flag for tmpfs Yang Xu
2020-02-12 9:42 ` Xiao Yang
2020-02-12 9:47 ` Xiao Yang
2020-02-12 9:53 ` Yang Xu
2020-02-12 10:07 ` [LTP] [PATCH v3] " Yang Xu
2020-02-12 13:37 ` Jan Stancek
2020-02-13 3:03 ` Xiao Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.