From: Dan Sheppard Date: Wed, 23 Apr 2025 13:09:34 +0000 (+0100) Subject: Test more fully and simply now test is fast. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~dans/git?a=commitdiff_plain;h=bbae0c9d3b1650e15370f9960dd5c31e311a6372;p=coquet.git Test more fully and simply now test is fast. --- diff --git a/src/superblock.c b/src/superblock.c index d72b499..99c3e4e 100644 --- a/src/superblock.c +++ b/src/superblock.c @@ -396,7 +396,7 @@ static void make_superblock(coquet_t *cq, bool also_b, void test_superblock_corruption() { coquet_t cq; - int i,r,pos; + int i,r; r = coquet_init(&cq,"tmp/test"); test_bail(&cq,r); @@ -409,21 +409,18 @@ void test_superblock_corruption() { make_superblock(&cq,0,-1,12); /* Corrupting A should lead us to default, ie n.s. = 10 */ - for(i=0;i<200;i++) { - pos = i<100 ?i : 100+i*9; - make_superblock(&cq,0,pos,10); + for(i=0;i<2048;i++) { + make_superblock(&cq,0,i,10); } /* Corrupting A should keep B, ie n.s. = 11 */ - for(i=0;i<200;i++) { - pos = i<100 ?i : 100+i*9; - make_superblock(&cq,1,pos,11); + for(i=0;i<2048;i++) { + make_superblock(&cq,1,i,11); } /* Corrupting B should give A, ie n.s. = 12 */ - for(i=0;i<200;i++) { - pos = i<100 ?i : 100+i*9; - make_superblock(&cq,1,2048+pos,12); + for(i=0;i<2048;i++) { + make_superblock(&cq,1,2048+i,12); } testvfs_virtual(cq.vfs_data,0);