* [LTP] [PATCH] lib/tst_test.c: set mount_device amd format_device of all_filesystems is set @ 2019-06-04 7:40 Murphy Zhou 2019-06-04 8:09 ` Xiao Yang 0 siblings, 1 reply; 9+ messages in thread From: Murphy Zhou @ 2019-06-04 7:40 UTC (permalink / raw) To: ltp preadv203.c does not set mount_device, which makes BROK: preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP Fixing this by format and mount device if all_filesystems is set in library. Signed-off-by: Murphy Zhou <xzhou@redhat.com> --- lib/tst_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tst_test.c b/lib/tst_test.c index 95f389d2e..61dba793e 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -808,8 +808,11 @@ static void do_setup(int argc, char *argv[]) tst_test->format_device = 1; } - if (tst_test->all_filesystems) + if (tst_test->all_filesystems) { tst_test->needs_device = 1; + tst_test->mount_device = 1; + tst_test->format_device = 1; + } setup_ipc(); -- 2.21.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH] lib/tst_test.c: set mount_device amd format_device of all_filesystems is set 2019-06-04 7:40 [LTP] [PATCH] lib/tst_test.c: set mount_device amd format_device of all_filesystems is set Murphy Zhou @ 2019-06-04 8:09 ` Xiao Yang 2019-06-04 8:23 ` Murphy Zhou 0 siblings, 1 reply; 9+ messages in thread From: Xiao Yang @ 2019-06-04 8:09 UTC (permalink / raw) To: ltp On 2019/06/04 15:40, Murphy Zhou wrote: > preadv203.c does not set mount_device, which makes BROK: > preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP > > Fixing this by format and mount device if all_filesystems is set in library. > > Signed-off-by: Murphy Zhou<xzhou@redhat.com> > --- > lib/tst_test.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/tst_test.c b/lib/tst_test.c > index 95f389d2e..61dba793e 100644 > --- a/lib/tst_test.c > +++ b/lib/tst_test.c > @@ -808,8 +808,11 @@ static void do_setup(int argc, char *argv[]) > tst_test->format_device = 1; > } > > - if (tst_test->all_filesystems) > + if (tst_test->all_filesystems) { > tst_test->needs_device = 1; > + tst_test->mount_device = 1; > + tst_test->format_device = 1; > + } Hi Murph, 1) tst_test->format_device will be set automatically when we set tst_test->mount_device. 2) It's unreasonable to set tst_test->mount_device for all filesystems forcely because we don't need to mount for all filesystems in some cases(e.g. just test formating). Perhaps, you just add tst_test->mount_device in preadv203.c. :-) Best Regards, Xiao Yang > > setup_ipc(); > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH] lib/tst_test.c: set mount_device amd format_device of all_filesystems is set 2019-06-04 8:09 ` Xiao Yang @ 2019-06-04 8:23 ` Murphy Zhou 2019-06-05 4:42 ` [LTP] [PATCH v2] syscalls/preadv2/preadv203: set mount_device flag Murphy Zhou 0 siblings, 1 reply; 9+ messages in thread From: Murphy Zhou @ 2019-06-04 8:23 UTC (permalink / raw) To: ltp Hi, On Tue, Jun 04, 2019 at 04:09:58PM +0800, Xiao Yang wrote: > On 2019/06/04 15:40, Murphy Zhou wrote: > > preadv203.c does not set mount_device, which makes BROK: > > preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP > > > > Fixing this by format and mount device if all_filesystems is set in library. > > > > Signed-off-by: Murphy Zhou<xzhou@redhat.com> > > --- > > lib/tst_test.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/lib/tst_test.c b/lib/tst_test.c > > index 95f389d2e..61dba793e 100644 > > --- a/lib/tst_test.c > > +++ b/lib/tst_test.c > > @@ -808,8 +808,11 @@ static void do_setup(int argc, char *argv[]) > > tst_test->format_device = 1; > > } > > > > - if (tst_test->all_filesystems) > > + if (tst_test->all_filesystems) { > > tst_test->needs_device = 1; > > + tst_test->mount_device = 1; > > + tst_test->format_device = 1; > > + } > Hi Murph, > > 1) tst_test->format_device will be set automatically when we set > tst_test->mount_device. Yes. but need to set mount_device in the tcase. > 2) It's unreasonable to set tst_test->mount_device for all filesystems > forcely because we > don't need to mount for all filesystems in some cases(e.g. just test > formating). Good point. > > Perhaps, you just add tst_test->mount_device in preadv203.c. :-) Yes.. That's I forget to say in the commit message. I just recalled this and then I saw your email :) Hi Cyril, what do you think? I'm fine with either way. Thanks, Murphy > > Best Regards, > Xiao Yang > > > > setup_ipc(); > > > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH v2] syscalls/preadv2/preadv203: set mount_device flag 2019-06-04 8:23 ` Murphy Zhou @ 2019-06-05 4:42 ` Murphy Zhou 2019-06-05 5:19 ` Xiao Yang 0 siblings, 1 reply; 9+ messages in thread From: Murphy Zhou @ 2019-06-05 4:42 UTC (permalink / raw) To: ltp Now the tests are running in MOUNTPOINT without it mounted. Fails on ext2: preadv203.c does not set mount_device, which makes BROK: preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com> --- testcases/kernel/syscalls/preadv2/preadv203.c | 1 + 1 file changed, 1 insertion(+) diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c index 810d1e8db..e4f68a51b 100644 --- a/testcases/kernel/syscalls/preadv2/preadv203.c +++ b/testcases/kernel/syscalls/preadv2/preadv203.c @@ -261,6 +261,7 @@ static struct tst_test test = { .cleanup = cleanup, .test_all = verify_preadv2, .mntpoint = MNTPOINT, + .mount_device = 1, .all_filesystems = 1, .needs_tmpdir = 1, .needs_root = 1, -- 2.21.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH v2] syscalls/preadv2/preadv203: set mount_device flag 2019-06-05 4:42 ` [LTP] [PATCH v2] syscalls/preadv2/preadv203: set mount_device flag Murphy Zhou @ 2019-06-05 5:19 ` Xiao Yang 2019-06-05 5:27 ` Murphy Zhou 2019-06-05 5:33 ` [LTP] [PATCH v3] " Murphy Zhou 0 siblings, 2 replies; 9+ messages in thread From: Xiao Yang @ 2019-06-05 5:19 UTC (permalink / raw) To: ltp On 2019/06/05 12:42, Murphy Zhou wrote: > Now the tests are running in MOUNTPOINT without it mounted. > Fails on ext2: Hi Murphy, Did you get EOPNOTSUPP when running preadv203 on ext2? It seems OK to running preadv203 on ext2, as below: -------------------------------------------------------- tst_test.c:1172: INFO: Testing on ext2 tst_mkfs.c:90: INFO: Formatting /dev/loop0 with ext2 opts='' extra opts='' mke2fs 1.44.3 (10-July-2018) tst_test.c:1111: INFO: Timeout per run is 0h 05m 00s preadv203.c:145: INFO: Number of full_reads 751044, short reads 10, zero len reads 0, EAGAIN(s) 67021 preadv203.c:180: INFO: Number of writes 1087560 preadv203.c:194: INFO: Cache dropped 149 times preadv203.c:223: PASS: Got some EAGAIN ------------------------------------------------------- BTW: I got EOPNOTSUPP when running preadv203 on tmpfs. :-) Best Regards, Xiao Yang > preadv203.c does not set mount_device, which makes BROK: > preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP > > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com> > --- > testcases/kernel/syscalls/preadv2/preadv203.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c > index 810d1e8db..e4f68a51b 100644 > --- a/testcases/kernel/syscalls/preadv2/preadv203.c > +++ b/testcases/kernel/syscalls/preadv2/preadv203.c > @@ -261,6 +261,7 @@ static struct tst_test test = { > .cleanup = cleanup, > .test_all = verify_preadv2, > .mntpoint = MNTPOINT, > + .mount_device = 1, > .all_filesystems = 1, > .needs_tmpdir = 1, > .needs_root = 1, ^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH v2] syscalls/preadv2/preadv203: set mount_device flag 2019-06-05 5:19 ` Xiao Yang @ 2019-06-05 5:27 ` Murphy Zhou 2019-06-05 5:33 ` [LTP] [PATCH v3] " Murphy Zhou 1 sibling, 0 replies; 9+ messages in thread From: Murphy Zhou @ 2019-06-05 5:27 UTC (permalink / raw) To: ltp On Wed, Jun 05, 2019 at 01:19:27PM +0800, Xiao Yang wrote: > On 2019/06/05 12:42, Murphy Zhou wrote: > > Now the tests are running in MOUNTPOINT without it mounted. > > Fails on ext2: > Hi Murphy, > > Did you get EOPNOTSUPP when running preadv203 on ext2? No, it's running on nfs or cifs exactly. ext2 is the first one in all_filesystems list.. My commit msg here is confusing. Sending v3. > > It seems OK to running preadv203 on ext2, as below: > -------------------------------------------------------- > tst_test.c:1172: INFO: Testing on ext2 > tst_mkfs.c:90: INFO: Formatting /dev/loop0 with ext2 opts='' extra opts='' > mke2fs 1.44.3 (10-July-2018) > tst_test.c:1111: INFO: Timeout per run is 0h 05m 00s > preadv203.c:145: INFO: Number of full_reads 751044, short reads 10, zero > len reads 0, EAGAIN(s) 67021 > preadv203.c:180: INFO: Number of writes 1087560 > preadv203.c:194: INFO: Cache dropped 149 times > preadv203.c:223: PASS: Got some EAGAIN > ------------------------------------------------------- > > BTW: I got EOPNOTSUPP when running preadv203 on tmpfs. :-) Ya. Thanks for the info! Murphy > > Best Regards, > Xiao Yang > > preadv203.c does not set mount_device, which makes BROK: > > preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP > > > > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com> > > --- > > testcases/kernel/syscalls/preadv2/preadv203.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c > > index 810d1e8db..e4f68a51b 100644 > > --- a/testcases/kernel/syscalls/preadv2/preadv203.c > > +++ b/testcases/kernel/syscalls/preadv2/preadv203.c > > @@ -261,6 +261,7 @@ static struct tst_test test = { > > .cleanup = cleanup, > > .test_all = verify_preadv2, > > .mntpoint = MNTPOINT, > > + .mount_device = 1, > > .all_filesystems = 1, > > .needs_tmpdir = 1, > > .needs_root = 1, > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH v3] syscalls/preadv2/preadv203: set mount_device flag 2019-06-05 5:19 ` Xiao Yang 2019-06-05 5:27 ` Murphy Zhou @ 2019-06-05 5:33 ` Murphy Zhou 2019-06-05 5:55 ` Xiao Yang 2019-06-05 14:06 ` Cyril Hrubis 1 sibling, 2 replies; 9+ messages in thread From: Murphy Zhou @ 2019-06-05 5:33 UTC (permalink / raw) To: ltp Now the tests are running in MOUNTPOINT without it mounted. Fails on NFS, cifs, tmpfs: preadv203.c does not set mount_device, which makes BROK: preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com> --- v3: improve commit message v2: set mount_device in preadv203.c, rather than in the library testcases/kernel/syscalls/preadv2/preadv203.c | 1 + 1 file changed, 1 insertion(+) diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c index 810d1e8db..e4f68a51b 100644 --- a/testcases/kernel/syscalls/preadv2/preadv203.c +++ b/testcases/kernel/syscalls/preadv2/preadv203.c @@ -261,6 +261,7 @@ static struct tst_test test = { .cleanup = cleanup, .test_all = verify_preadv2, .mntpoint = MNTPOINT, + .mount_device = 1, .all_filesystems = 1, .needs_tmpdir = 1, .needs_root = 1, -- 2.21.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH v3] syscalls/preadv2/preadv203: set mount_device flag 2019-06-05 5:33 ` [LTP] [PATCH v3] " Murphy Zhou @ 2019-06-05 5:55 ` Xiao Yang 2019-06-05 14:06 ` Cyril Hrubis 1 sibling, 0 replies; 9+ messages in thread From: Xiao Yang @ 2019-06-05 5:55 UTC (permalink / raw) To: ltp Hi Murphy, Pushed. Thanks for your patch. :-) Best Regards, Xiao Yang On 2019/06/05 13:33, Murphy Zhou wrote: > Now the tests are running in MOUNTPOINT without it mounted. Fails on > NFS, cifs, tmpfs: > > preadv203.c does not set mount_device, which makes BROK: > preadv203.c:122: BROK: preadv2() failed: EOPNOTSUPP > > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com> > --- > v3: > improve commit message > v2: > set mount_device in preadv203.c, rather than in the library > > testcases/kernel/syscalls/preadv2/preadv203.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c > index 810d1e8db..e4f68a51b 100644 > --- a/testcases/kernel/syscalls/preadv2/preadv203.c > +++ b/testcases/kernel/syscalls/preadv2/preadv203.c > @@ -261,6 +261,7 @@ static struct tst_test test = { > .cleanup = cleanup, > .test_all = verify_preadv2, > .mntpoint = MNTPOINT, > + .mount_device = 1, > .all_filesystems = 1, > .needs_tmpdir = 1, > .needs_root = 1, ^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH v3] syscalls/preadv2/preadv203: set mount_device flag 2019-06-05 5:33 ` [LTP] [PATCH v3] " Murphy Zhou 2019-06-05 5:55 ` Xiao Yang @ 2019-06-05 14:06 ` Cyril Hrubis 1 sibling, 0 replies; 9+ messages in thread From: Cyril Hrubis @ 2019-06-05 14:06 UTC (permalink / raw) To: ltp Hi! > diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c > index 810d1e8db..e4f68a51b 100644 > --- a/testcases/kernel/syscalls/preadv2/preadv203.c > +++ b/testcases/kernel/syscalls/preadv2/preadv203.c > @@ -261,6 +261,7 @@ static struct tst_test test = { > .cleanup = cleanup, > .test_all = verify_preadv2, > .mntpoint = MNTPOINT, > + .mount_device = 1, > .all_filesystems = 1, > .needs_tmpdir = 1, > .needs_root = 1, What a silly mistake of mine, thanks for fixing that. Unfortunately it seems that this breaks the test on a subset of filesystems. For me it fails when files are written in the test setup, guess that writing 1000 files with 66 blocks of size 4123 is about 236MB is too much for the default 256MB loop device. I will look into that and send a patch later on. -- Cyril Hrubis chrubis@suse.cz ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-06-05 14:06 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-06-04 7:40 [LTP] [PATCH] lib/tst_test.c: set mount_device amd format_device of all_filesystems is set Murphy Zhou 2019-06-04 8:09 ` Xiao Yang 2019-06-04 8:23 ` Murphy Zhou 2019-06-05 4:42 ` [LTP] [PATCH v2] syscalls/preadv2/preadv203: set mount_device flag Murphy Zhou 2019-06-05 5:19 ` Xiao Yang 2019-06-05 5:27 ` Murphy Zhou 2019-06-05 5:33 ` [LTP] [PATCH v3] " Murphy Zhou 2019-06-05 5:55 ` Xiao Yang 2019-06-05 14:06 ` Cyril Hrubis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox