[PATCH] mtd-utils: tests: avoid using only one block in nandpagetest

Miquel RAYNAL miquel.raynal at free-electrons.com
Thu Aug 24 02:01:04 PDT 2017


Hi David,

> > The case 'first == last' leads to erasing the block before reading
> > it. Hence the test will fail with no actual reason.
> >   
> So if some existing automated test setup were to use this, it would
> (as of right now) *always* fail and terminate with EXIT_FAILURE.
> 
> > The patch does not forbid the use of -c1 as it could do it in
> > process_options() with a errmsg_die(). Instead, it warns the user
> > and uses a second block in order to avoid risking to break existing
> > scripts. 
> But wouldn't exactly that change the behavior of such a setup by
> suddenly having all tests succeed?
> 
> If this combination of options always fails anyway, wouldn't it be
> more appropriate to terminate with an error message in
> process_options instead?

I though you would prefer to do not exit with an error but I it is ok
for me, I will resend the patch, with an error thrown in
process_options().

Regards,
Miquèl



More information about the linux-mtd mailing list