[LTP] [PATCH] tst_find_backing_dev: fix logic in matching mount point

Li Wang liwang@redhat.com
Mon Jul 11 08:52:35 CEST 2022


On Fri, Jul 8, 2022 at 3:33 PM Jan Stancek <jstancek@redhat.com> wrote:

> If backing dev is btrfs root device, then starting best_match_len
> from 1 creates an issue, because root (/) is never matched.
> Also we should check that entire mount point string is present in
> path we are matching against.
>
> In case there's error also dump /proc/self/mountinfo before tst_brk.
>
> This fixes test with following partition layout (TMPDIR is on /):
>   # cat /proc/self/mountinfo  | grep btrfs
>   59 1 0:29 /root / rw,relatime shared:1 - btrfs /dev/dasda2
> rw,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=257,subvol=/root
>   93 59 0:29 /home /home rw,relatime shared:47 - btrfs /dev/dasda2
> rw,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=256,subvol=/home
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
>

Make sense!

Reviewed-by: Li Wang <liwang@redhat.com>


-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220711/34f9e638/attachment.htm>


More information about the ltp mailing list