[parted-devel] [PATCH 6/8] tests: t3310-flags.sh: Add test for mac table flags

Brian C. Lane bcl at redhat.com
Fri Sep 30 17:00:57 UTC 2016


On Tue, Aug 16, 2016 at 08:42:40PM +0100, Mike Fleetwood wrote:
> MAC partition table reserves partition 1 for the partition map
> partition, so the created test partition will be number 2.  Adapt
> accordingly.
> 
> Setting flags 'root' and 'swap' also sets the partition name to 'root'
> and 'swap' respectively, so no longer match the partition name in
> extract_flags().
> 
> Don't test lvm and raid flags as they fail to be cleared with a single
> set off command.  See FIXME comment in the test for more details.
> ---
>  tests/t3310-flags.sh |   22 ++++++++++++++++++----
>  1 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/t3310-flags.sh b/tests/t3310-flags.sh
> index d20d6d4..7f1f65b 100644
> --- a/tests/t3310-flags.sh
> +++ b/tests/t3310-flags.sh
> @@ -22,10 +22,11 @@ dev=dev-file
>  
>  extract_flags()
>  {
> -  perl -nle '/^1:2048s:4095s:2048s::(?:PTNNAME)?:(.+);$/ and print $1' "$@"
> +  perl -nle '/^[^:]*:2048s:4095s:2048s::[^:]*:(.+);$/ and print $1' "$@"
>  }

Isn't this going to drop setting $1 as the partition name?

-- 
Brian C. Lane | Port Orchard, WA (PST8PDT)



More information about the parted-devel mailing list