All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] fs_bind: Fix incorrect mount option
@ 2022-08-08 11:04 Dylan Jhong
  2022-08-08 12:53 ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Dylan Jhong @ 2022-08-08 11:04 UTC (permalink / raw)
  To: ltp; +Cc: alankao, x5710999x

Fix the "--make-[r]share" option of mount, which should be
"--make-[r]shared".

Reference:
    https://linux.die.net/man/8/mount

Signed-off-by: Dylan Jhong <dylan@andestech.com>
---
 testcases/kernel/fs/fs_bind/rbind/fs_bind_rbind33.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/fs/fs_bind/rbind/fs_bind_rbind33.sh b/testcases/kernel/fs/fs_bind/rbind/fs_bind_rbind33.sh
index 170f7c42b..13704ce2e 100755
--- a/testcases/kernel/fs/fs_bind/rbind/fs_bind_rbind33.sh
+++ b/testcases/kernel/fs/fs_bind/rbind/fs_bind_rbind33.sh
@@ -17,11 +17,11 @@ test()
 
 	EXPECT_PASS mount --rbind dir1 dir2
 	EXPECT_PASS mount --make-rslave dir2
-	EXPECT_PASS mount --make-share dir2
+	EXPECT_PASS mount --make-shared dir2
 
 	EXPECT_PASS mount --rbind dir2 dir3
 	EXPECT_PASS mount --make-rslave dir3
-	EXPECT_PASS mount --make-share dir3
+	EXPECT_PASS mount --make-shared dir3
 
 	EXPECT_PASS mount --rbind dir3 dir4
 	EXPECT_PASS mount --make-rslave dir4
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] fs_bind: Fix incorrect mount option
  2022-08-08 11:04 [LTP] [PATCH] fs_bind: Fix incorrect mount option Dylan Jhong
@ 2022-08-08 12:53 ` Petr Vorel
  2022-08-09  2:57   ` Dylan Jhong
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2022-08-08 12:53 UTC (permalink / raw)
  To: Dylan Jhong; +Cc: x5710999x, alankao, ltp

Hi Dylan,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

I wonder why test didn't failed (at least on SUT I tested it).

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] fs_bind: Fix incorrect mount option
  2022-08-08 12:53 ` Petr Vorel
@ 2022-08-09  2:57   ` Dylan Jhong
  2022-08-09  5:11     ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Dylan Jhong @ 2022-08-09  2:57 UTC (permalink / raw)
  To: Petr Vorel
  Cc: x5710999x@gmail.com, Alan Quey-Liang Kao((((((((((),
	ltp@lists.linux.it

Hi Petr:

Thanks for the review.

>>>>> I wonder why test didn't failed (at least on SUT I tested it).
Some mount command implementations[*1] use getopt_long() to parse mount 
options, but getopt_long() seems to treat "--make-share" and "--make-shared"
as the same option.

The error I encounter this time is using busybox's mount command[*2], which 
uses strncasecmp() to parse the argements, It will treat "--make-share" and 
"--make-shared" as different options.

According to the manual of mount command, "--make-shared" should be the correct
option.

reference:
    [*1] https://kernel.googlesource.com/pub/scm/utils/util-linux/util-linux/+/stable/v2.13/mount/mount.c#1816
    [*2] https://github.com/brgl/busybox/blob/master/util-linux/mount.c#L372
    [*3] https://linux.die.net/man/8/mount

Best,
Dylan

On Mon, Aug 08, 2022 at 08:53:09PM +0800, Petr Vorel wrote:
> Hi Dylan,
> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> I wonder why test didn't failed (at least on SUT I tested it).
> 
> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] fs_bind: Fix incorrect mount option
  2022-08-09  2:57   ` Dylan Jhong
@ 2022-08-09  5:11     ` Petr Vorel
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2022-08-09  5:11 UTC (permalink / raw)
  To: Dylan Jhong
  Cc: x5710999x@gmail.com, Alan Quey-Liang Kao((((((((((),
	ltp@lists.linux.it

Hi Dylan,

> Hi Petr:

> Thanks for the review.

> >>>>> I wonder why test didn't failed (at least on SUT I tested it).
> Some mount command implementations[*1] use getopt_long() to parse mount 
> options, but getopt_long() seems to treat "--make-share" and "--make-shared"
> as the same option.

> The error I encounter this time is using busybox's mount command[*2], which 
> uses strncasecmp() to parse the argements, It will treat "--make-share" and 
> "--make-shared" as different options.

> According to the manual of mount command, "--make-shared" should be the correct
> option.

> reference:
>     [*1] https://kernel.googlesource.com/pub/scm/utils/util-linux/util-linux/+/stable/v2.13/mount/mount.c#1816
>     [*2] https://github.com/brgl/busybox/blob/master/util-linux/mount.c#L372
>     [*3] https://linux.die.net/man/8/mount

Thanks for info. Please next time include this in the commit message
(useful info, but as I wrote yesterday I already merged your commit).

Kind regards,
Petr

> Best,
> Dylan

> On Mon, Aug 08, 2022 at 08:53:09PM +0800, Petr Vorel wrote:
> > Hi Dylan,

> > Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > I wonder why test didn't failed (at least on SUT I tested it).

> > Kind regards,
> > Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-09  5:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-08 11:04 [LTP] [PATCH] fs_bind: Fix incorrect mount option Dylan Jhong
2022-08-08 12:53 ` Petr Vorel
2022-08-09  2:57   ` Dylan Jhong
2022-08-09  5:11     ` Petr Vorel

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.