[Libguestfs] [PATCH nbdkit v2 4/4] tests: Duplicate test-partitioning4.sh for MBR.

Eric Blake eblake at redhat.com
Tue Jan 22 21:22:03 UTC 2019


On 1/21/19 12:15 PM, Richard W.M. Jones wrote:
> Since both the partitioning plugin and partition filter now support
> MBR logical partitions, the original test for GPT
> (test-partitioning4.sh) can be duplicated and modified to test MBR.
> ---
>  tests/Makefile.am           |  4 +-
>  tests/test-partitioning4.sh |  2 +-
>  tests/test-partitioning6.sh | 92 +++++++++++++++++++++++++++++++++++++
>  3 files changed, 96 insertions(+), 2 deletions(-)

ACK


> @@ -0,0 +1,92 @@
> +#!/usr/bin/env bash

> +
> +# Check if the printf utility is available.  This is probably using
> +# the bash builtin (not the one from coreutils) which does not
> +# understand --flags, so we have to test it using a dummy format
> +# string.
> +if ! printf ""; then
> +    echo "$0: missing or broken printf"
> +    exit 77
> +fi

Pointless check - we KNOW we are running bash, so we KNOW printf is
available as the bash builtin.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190122/b5e1af2e/attachment.sig>


More information about the Libguestfs mailing list