From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43BB64A13AB; Tue, 1 Sep 2026 19:12:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788289977; cv=none; b=QSuPmdWEzcofLcW9uMXe7CDhryxvcJobfujuZDu2+U53k+0xB0jeT/AFifI8hTlEwWF0B0VrE4DbbCWZOX4g7yi8G2HrMPkbhNu0DxuZO87luH6Toz+bEZQ8DHDN5NbsnzoB5w0Nd2yfDPVmdrwrIZsX844VDegGvw2pC17ZvLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788289977; c=relaxed/simple; bh=zG74Q/zjTznsPd0k03N4eYzfxMQXjPXi7x9IYMEEp24=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nDpiR3sjNZqQiTbBjz9gwyV16n5rYDeMnF6kzW2XvZER4YXp5CNZE43TNvNzGqZiHntwwxEWRG7zFkTtlFdtvKsa/9UYOlFNxqN2SiuRrAeyHEnXGI3x730gy1/sY98Js5c72umb7kRnmo78Uaa0QTsNO9gvi7/anVMlxKOpi6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BMM26e9a; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BMM26e9a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 389AF1F000E9; Tue, 1 Sep 2026 19:12:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788289969; bh=sMIegqMJrkzX9C9fgmacw7fJ5Kh0SLb0eEV7TbF42uA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=BMM26e9anTVkORjuGbVltEI+EVaF1K99InI7KFBCCOB7jLGl3KrcxFbteHZmFLiQp V5XX/2xoqyxZIn6XtIKpdhu/g1NWVsLXl4zGFnuxemGJuhX5gSYIS3SOq3GdY9kbNv uelBKQzoOkCNWTuIHBuYbp3bJRXIbe6JFjLIva2dxOI3VgtcPYljJ2w0BLIgAGox63 oc5KtZs2qToTrwGLHPJ8RxHuGoQpDDPTmmUe58VMSJ3639w9aXgseZId1jYcUU4fS8 Qhsh/0Gg9eSfr7Cqg/I47fyADd3gN/JxrKADuS/lKC2wTylrr5w4RzkHdKvOvFw0UZ UrrcMPXn/jFAw== Date: Wed, 2 Sep 2026 03:12:43 +0800 From: Zorro Lang To: Anand Jain Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, djwong@kernel.org Subject: Re: [PATCH v8 09/13] fstests: verify libblkid resolution of duplicate UUIDs Message-ID: Mail-Followup-To: Anand Jain , fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, djwong@kernel.org References: <0e530686fa2bfb9a4b8ec4596484a4fec6d849e4.1784949155.git.asj@kernel.org> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0e530686fa2bfb9a4b8ec4596484a4fec6d849e4.1784949155.git.asj@kernel.org> On Sat, Jul 25, 2026 at 03:39:06PM +0800, Anand Jain wrote: > Verify how findmnt, df (libblkid) resolve device paths when multiple I didn't find the `df` test part in this test case. > block devices share the same FSUUID. > > Signed-off-by: Anand Jain > --- > tests/generic/803 | 72 +++++++++++++++++++++++++++++++++++++++++++ > tests/generic/803.out | 6 ++++ > 2 files changed, 78 insertions(+) > create mode 100644 tests/generic/803 > create mode 100644 tests/generic/803.out > > diff --git a/tests/generic/803 b/tests/generic/803 > new file mode 100644 > index 000000000000..77901592366c > --- /dev/null > +++ b/tests/generic/803 > @@ -0,0 +1,72 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2026 Anand Jain . All Rights Reserved. > +# > +# FS QA Test 803 > +# Check if the mountinfo based findmnt would resolve to the common uuid > +# as per the blkid (libblkid based). > + > +. ./common/preamble > +. ./common/filter > + > +_begin_fstest auto quick mount clone > + > +_require_test > +_require_block_device $TEST_DEV > +_require_loop > + > +_cleanup() > +{ > + cd / > + rm -r -f $tmp.* > + umount $mnt1 $mnt2 2>/dev/null > + _loop_image_destroy "${devs[@]}" 2> /dev/null > +} > + > +# Normalize pool devices and mount points names > +filter_pool() > +{ > + sed -e "s|${devs[0]}|DEV1|g" -e "s|${mnt1}|MNT1|g" \ > + -e "s|${devs[1]}|DEV2|g" -e "s|${mnt2}|MNT2|g" | _filter_spaces > +} > + > +# Setup base loop device and its clone > +devs=() > +_loop_image_create_clone devs > +mkdir -p $TEST_DIR/$seq > +mnt1=$TEST_DIR/$seq/mnt1 > +mnt2=$TEST_DIR/$seq/mnt2 > +mkdir -p $mnt1 > +mkdir -p $mnt2 > + > +# Get the uuid from the source device > +fsuuid=$(blkid -s UUID -o value ${devs[0]}) > + > +# Mount both identical UUID filesystems simultaneously > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[0]} $mnt1 || \ > + _fail "Failed to mount dev1" > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[1]} $mnt2 || \ > + _fail "Failed to mount dev2" > + > +findmnt -o SOURCE,TARGET,UUID "${devs[0]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool findmnt -n (or --noheadings) can be used here (and below) to avoid piping to `tail -n +2`. > +findmnt -o SOURCE,TARGET,UUID "${devs[1]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool Same here > + > +# Btrfs assigned a random uuid for the clone fs before the fix. > +# Cycle mounts and reverse the initialization (source and clone fs) order. > +echo "**** mount cycle ****" > +_unmount $mnt1 > +_unmount $mnt2 > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[1]} $mnt2 || \ > + _fail "Failed to mount dev2" > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[0]} $mnt1 || \ > + _fail "Failed to mount dev1" > + > +findmnt -o SOURCE,TARGET,UUID "${devs[0]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool Same here > +findmnt -o SOURCE,TARGET,UUID "${devs[1]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool Same here > + > +status=0 > +exit _exit 0 > diff --git a/tests/generic/803.out b/tests/generic/803.out > new file mode 100644 > index 000000000000..3a130c662430 > --- /dev/null > +++ b/tests/generic/803.out > @@ -0,0 +1,6 @@ > +QA output created by 803 > +DEV1 MNT1 FSUUID > +DEV2 MNT2 FSUUID > +**** mount cycle **** > +DEV1 MNT1 FSUUID > +DEV2 MNT2 FSUUID > -- > 2.43.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 529CCC61DD3 for ; Tue, 1 Sep 2026 19:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Bzt3AxiE3WkI+qHl0dqJSfj4KA09Nc6/DqT8VuHO5OY=; b=B9ovt8l5pzMGtW0B+t+MnV676h YHK52eRikqWXn4C5iqioSW6slRp00f7BLnQAr+rsD6dUI0h7T3VWeUSIBuMe3Q3KwwjdNHuPoFZWB ddN9T2xbpzqJVr/rd5yaz5W9JTJrl/DZK8svlHIkzVPAQ7+3pwMEoxOYvv2LX5KVyz0c=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1x1Tuj-0006Rt-0M; Tue, 01 Sep 2026 19:12:57 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1x1Tui-0006Rl-8k for linux-f2fs-devel@lists.sourceforge.net; Tue, 01 Sep 2026 19:12:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sMIegqMJrkzX9C9fgmacw7fJ5Kh0SLb0eEV7TbF42uA=; b=bLe/UmzLkA8BRHKOsUANF78mR2 STxtFfhcEYEtLKxQih7TIndS4r2s0wkIDLfra4CSqBA4mM6ZRiw/yW59rWNBbMVUAynrcBYMoVm1y 0M6J32h8fMqYBlhXff7Je0rapykLvWfDB/j6f9lNvo2x8OcNxf2OBwXiMGsLn0oBz2I0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sMIegqMJrkzX9C9fgmacw7fJ5Kh0SLb0eEV7TbF42uA=; b=Crf2Vkjo3sbSP+WEE487FYqsJM HwomrPG3KSJnWfr9R4r9KfNp9s6OuTz7m7fFKDGZSL3nj9LxLToD4yLEfkaU5jW+/oN7rIZlHPwaE xlGwGSdq3aR/gcZqnrFX3rOCv+LCLNTRL8QWNtCX9PralK+P/C1ZbMs3wxjyh6C/aKpw=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1x1Tuh-0003T9-Hc for linux-f2fs-devel@lists.sourceforge.net; Tue, 01 Sep 2026 19:12:56 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id B753460232 for ; Tue, 1 Sep 2026 19:12:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 389AF1F000E9; Tue, 1 Sep 2026 19:12:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788289969; bh=sMIegqMJrkzX9C9fgmacw7fJ5Kh0SLb0eEV7TbF42uA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=BMM26e9anTVkORjuGbVltEI+EVaF1K99InI7KFBCCOB7jLGl3KrcxFbteHZmFLiQp V5XX/2xoqyxZIn6XtIKpdhu/g1NWVsLXl4zGFnuxemGJuhX5gSYIS3SOq3GdY9kbNv uelBKQzoOkCNWTuIHBuYbp3bJRXIbe6JFjLIva2dxOI3VgtcPYljJ2w0BLIgAGox63 oc5KtZs2qToTrwGLHPJ8RxHuGoQpDDPTmmUe58VMSJ3639w9aXgseZId1jYcUU4fS8 Qhsh/0Gg9eSfr7Cqg/I47fyADd3gN/JxrKADuS/lKC2wTylrr5w4RzkHdKvOvFw0UZ UrrcMPXn/jFAw== Date: Wed, 2 Sep 2026 03:12:43 +0800 To: Anand Jain Message-ID: Mail-Followup-To: Anand Jain , fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, djwong@kernel.org References: <0e530686fa2bfb9a4b8ec4596484a4fec6d849e4.1784949155.git.asj@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0e530686fa2bfb9a4b8ec4596484a4fec6d849e4.1784949155.git.asj@kernel.org> X-Headers-End: 1x1Tuh-0003T9-Hc Subject: Re: [f2fs-dev] [PATCH v8 09/13] fstests: verify libblkid resolution of duplicate UUIDs X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Zorro Lang via Linux-f2fs-devel Reply-To: Zorro Lang Cc: djwong@kernel.org, fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Sat, Jul 25, 2026 at 03:39:06PM +0800, Anand Jain wrote: > Verify how findmnt, df (libblkid) resolve device paths when multiple I didn't find the `df` test part in this test case. > block devices share the same FSUUID. > > Signed-off-by: Anand Jain > --- > tests/generic/803 | 72 +++++++++++++++++++++++++++++++++++++++++++ > tests/generic/803.out | 6 ++++ > 2 files changed, 78 insertions(+) > create mode 100644 tests/generic/803 > create mode 100644 tests/generic/803.out > > diff --git a/tests/generic/803 b/tests/generic/803 > new file mode 100644 > index 000000000000..77901592366c > --- /dev/null > +++ b/tests/generic/803 > @@ -0,0 +1,72 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2026 Anand Jain . All Rights Reserved. > +# > +# FS QA Test 803 > +# Check if the mountinfo based findmnt would resolve to the common uuid > +# as per the blkid (libblkid based). > + > +. ./common/preamble > +. ./common/filter > + > +_begin_fstest auto quick mount clone > + > +_require_test > +_require_block_device $TEST_DEV > +_require_loop > + > +_cleanup() > +{ > + cd / > + rm -r -f $tmp.* > + umount $mnt1 $mnt2 2>/dev/null > + _loop_image_destroy "${devs[@]}" 2> /dev/null > +} > + > +# Normalize pool devices and mount points names > +filter_pool() > +{ > + sed -e "s|${devs[0]}|DEV1|g" -e "s|${mnt1}|MNT1|g" \ > + -e "s|${devs[1]}|DEV2|g" -e "s|${mnt2}|MNT2|g" | _filter_spaces > +} > + > +# Setup base loop device and its clone > +devs=() > +_loop_image_create_clone devs > +mkdir -p $TEST_DIR/$seq > +mnt1=$TEST_DIR/$seq/mnt1 > +mnt2=$TEST_DIR/$seq/mnt2 > +mkdir -p $mnt1 > +mkdir -p $mnt2 > + > +# Get the uuid from the source device > +fsuuid=$(blkid -s UUID -o value ${devs[0]}) > + > +# Mount both identical UUID filesystems simultaneously > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[0]} $mnt1 || \ > + _fail "Failed to mount dev1" > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[1]} $mnt2 || \ > + _fail "Failed to mount dev2" > + > +findmnt -o SOURCE,TARGET,UUID "${devs[0]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool findmnt -n (or --noheadings) can be used here (and below) to avoid piping to `tail -n +2`. > +findmnt -o SOURCE,TARGET,UUID "${devs[1]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool Same here > + > +# Btrfs assigned a random uuid for the clone fs before the fix. > +# Cycle mounts and reverse the initialization (source and clone fs) order. > +echo "**** mount cycle ****" > +_unmount $mnt1 > +_unmount $mnt2 > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[1]} $mnt2 || \ > + _fail "Failed to mount dev2" > +_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[0]} $mnt1 || \ > + _fail "Failed to mount dev1" > + > +findmnt -o SOURCE,TARGET,UUID "${devs[0]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool Same here > +findmnt -o SOURCE,TARGET,UUID "${devs[1]}" | tail -n +2 | \ > + sed -e "s/${fsuuid}/FSUUID/g" | filter_pool Same here > + > +status=0 > +exit _exit 0 > diff --git a/tests/generic/803.out b/tests/generic/803.out > new file mode 100644 > index 000000000000..3a130c662430 > --- /dev/null > +++ b/tests/generic/803.out > @@ -0,0 +1,6 @@ > +QA output created by 803 > +DEV1 MNT1 FSUUID > +DEV2 MNT2 FSUUID > +**** mount cycle **** > +DEV1 MNT1 FSUUID > +DEV2 MNT2 FSUUID > -- > 2.43.0 > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel