Re: [PATCH v1] xfstests: test xfs_spaceman fsuuid command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 09, 2022 at 02:26:30PM -0800, Catherine Hoang wrote:
> Add a test to verify the xfs_spaceman fsuuid functionality.
> 
> Signed-off-by: Catherine Hoang <catherine.hoang@xxxxxxxxxx>
> ---

Hmm... I'm a little confused why we need this tool if we already has a
"xfs_admin -u", and we even expect they get same fsuuid. Even if "xfs_admin -u"
can't work with mountpoint, but it can work on the device which is mounted.
And why not let xfs_admin support that ?

Anyway, I'm care more about if this command is acked by xfs list? If xfs list
would like to have that command, then I'm OK to have this test coverage :)

Thanks,
Zorro

>  tests/xfs/557     | 31 +++++++++++++++++++++++++++++++
>  tests/xfs/557.out |  2 ++
>  2 files changed, 33 insertions(+)
>  create mode 100755 tests/xfs/557
>  create mode 100644 tests/xfs/557.out
> 
> diff --git a/tests/xfs/557 b/tests/xfs/557
> new file mode 100755
> index 00000000..0b41e693
> --- /dev/null
> +++ b/tests/xfs/557
> @@ -0,0 +1,31 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2022 Oracle.  All Rights Reserved.
> +#
> +# FS QA Test 557
> +#
> +# Test to verify xfs_spaceman fsuuid functionality
> +#
> +. ./common/preamble
> +_begin_fstest auto quick spaceman
> +
> +# real QA test starts here
> +_supported_fs xfs
> +_require_xfs_spaceman_command "fsuuid"
> +_require_scratch
> +
> +_scratch_mkfs >> $seqres.full
> +_scratch_mount >> $seqres.full
> +
> +expected_uuid="$(_scratch_xfs_admin -u)"
> +actual_uuid="$($XFS_SPACEMAN_PROG -c "fsuuid" $SCRATCH_MNT)"
> +
> +if [ "$expected_uuid" != "$actual_uuid" ]; then
> +        echo "expected UUID ($expected_uuid) != actual UUID ($actual_uuid)"
> +fi
> +
> +echo "Silence is golden"
> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/557.out b/tests/xfs/557.out
> new file mode 100644
> index 00000000..1f1ae1d4
> --- /dev/null
> +++ b/tests/xfs/557.out
> @@ -0,0 +1,2 @@
> +QA output created by 557
> +Silence is golden
> -- 
> 2.25.1
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux