qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v3 06/10] block/pflash_cfi02: Fix CFI in autosel


From: Thomas Huth
Subject: Re: [Qemu-block] [PATCH v3 06/10] block/pflash_cfi02: Fix CFI in autoselect mode
Date: Thu, 18 Apr 2019 06:28:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 18/04/2019 00.01, Stephen Checkoway wrote:
> After a flash device enters CFI mode from autoselect mode, the reset
> command returns the device to autoselect mode. An additional reset
> command is necessary to return to read array mode.
> 
> Signed-off-by: Stephen Checkoway <address@hidden>
> ---
[...]
> diff --git a/tests/pflash-cfi02-test.c b/tests/pflash-cfi02-test.c
> index 82bc5695e1..4039647604 100644
> --- a/tests/pflash-cfi02-test.c
> +++ b/tests/pflash-cfi02-test.c
> @@ -480,6 +480,42 @@ static void test_geometry(const void *opaque)
>      qtest_quit(qtest);
>  }
>  
> +/*
> + * Test that
> + * 1. enter autoselect mode;
> + * 2. enter CFI mode; and then
> + * 3. exit CFI mode
> + * leaves the flash device in autoselect mode.
> + */
> +static void test_cfi_in_autoselect(const void *opaque)
> +{
> +    const FlashConfig *config = opaque;
> +    QTestState *qtest = qtest_initf("-M musicpal,accel=qtest"
> +                                    " -drive if=pflash,file=%s,format=raw,"
> +                                    "copy-on-read",
> +                                    image_path);

Just a matter of taste, but I think here I'd declare the variable first,
and do the qtest_initf on a separate line, so you don't have to break
the string between "format=raw," and "copy-on-read".

Anyway, it's just a nit, so still:

Acked-by: Thomas Huth <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]