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 <[email protected]> > --- [...] > 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 <[email protected]>
