Message ID | 20170420015639.4274-3-cyril.bur@au1.ibm.com |
---|---|
State | Rejected |
Headers | show |
On Thu, 2017-04-20 at 11:56 +1000, Cyril Bur wrote: > Because the only thing better than x tests is x+1 tests. Please write useful commit messages. Added test for <something> Mikey > > Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> > --- > libflash/test/test-blocklevel.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/libflash/test/test-blocklevel.c b/libflash/test/test-blocklevel.c > index 4dbbb091..c394c824 100644 > --- a/libflash/test/test-blocklevel.c > +++ b/libflash/test/test-blocklevel.c > @@ -432,5 +432,20 @@ int main(void) > return 1; > } > > + reset_buf(buf); > + /* Test 9: Erase a biger section, not aligned */ biger > + if (blocklevel_smart_erase(bl, 0x20, 0xa00)) { > + ERR("Failed to blocklevel_smart_erase(0x20, 0xa00)\n"); > + return 1; > + } > + miss = check_buf(buf, 0x20, 0xa20); > + if (miss) { > + ERR("Buffer mismatch after blocklevel_smart_erase(0x20, > 0xa00) at 0x%x\n", > + miss == -1 ? 0 : miss); > + dump_buf(buf, 0x1c, 0x25, miss == -1 ? 0 : miss); > + dump_buf(buf, 0xa1c, 0xa25, miss == -1 ? 0 : miss); > + return 1; > + } > + > return 0; > }
diff --git a/libflash/test/test-blocklevel.c b/libflash/test/test-blocklevel.c index 4dbbb091..c394c824 100644 --- a/libflash/test/test-blocklevel.c +++ b/libflash/test/test-blocklevel.c @@ -432,5 +432,20 @@ int main(void) return 1; } + reset_buf(buf); + /* Test 9: Erase a biger section, not aligned */ + if (blocklevel_smart_erase(bl, 0x20, 0xa00)) { + ERR("Failed to blocklevel_smart_erase(0x20, 0xa00)\n"); + return 1; + } + miss = check_buf(buf, 0x20, 0xa20); + if (miss) { + ERR("Buffer mismatch after blocklevel_smart_erase(0x20, 0xa00) at 0x%x\n", + miss == -1 ? 0 : miss); + dump_buf(buf, 0x1c, 0x25, miss == -1 ? 0 : miss); + dump_buf(buf, 0xa1c, 0xa25, miss == -1 ? 0 : miss); + return 1; + } + return 0; }
Because the only thing better than x tests is x+1 tests. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> --- libflash/test/test-blocklevel.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)