All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dylan Jhong <dylan@andestech.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: "x5710999x@gmail.com" <x5710999x@gmail.com>,
	"Alan Quey-Liang Kao\(\(\(\(\(\(\(\(\(\(\)"
	<alankao@andestech.com>,
	"ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] fs_bind: Fix incorrect mount option
Date: Tue, 9 Aug 2022 10:57:34 +0800	[thread overview]
Message-ID: <YvHNHt87WPxg7faE@atcsi01> (raw)
In-Reply-To: <YvEHNbOm0dSSmjoI@pevik>

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

  reply	other threads:[~2022-08-09  2:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-08-09  5:11     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YvHNHt87WPxg7faE@atcsi01 \
    --to=dylan@andestech.com \
    --cc=alankao@andestech.com \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    --cc=x5710999x@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.