chiark / gitweb /
Test more fully and simply now test is fast.
authorDan Sheppard <dan.sheppard.circle@gmail.com>
Wed, 23 Apr 2025 13:09:34 +0000 (14:09 +0100)
committerDan Sheppard <dan.sheppard.circle@gmail.com>
Wed, 23 Apr 2025 13:09:34 +0000 (14:09 +0100)
src/superblock.c

index d72b499a8931f6970af96b1087d9d3e749e41282..99c3e4ea5cc865438cffb1d049a848e3fb4591a5 100644 (file)
@@ -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);