chiark / gitweb /
Fix leak during tests.
authorDan Sheppard <dan.sheppard.circle@gmail.com>
Tue, 22 Apr 2025 23:15:31 +0000 (00:15 +0100)
committerDan Sheppard <dan.sheppard.circle@gmail.com>
Tue, 22 Apr 2025 23:15:31 +0000 (00:15 +0100)
Makefile
src/superblock.c

index 71a574d730e23d8f1f737b740df5f2b7f91c1590..a5b373f04ce1df7509afe7e578dd0e18995293fb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ LIBS =
 CC = gcc
 CFLAGS = -Wall --std=c99
 MAINCFLAGS = -O3
-TESTCFLAGS = -O3 # or -g
+TESTCFLAGS = -g
 
 .PHONY: default all clean test
 
index 45dd1d9a06f6356bfbc82414be03c4d114a45c0e..bb6bd8a6523d2ca91dbf7faf06912934311c7504 100644 (file)
@@ -423,6 +423,10 @@ void test_superblock_corruption() {
         pos = i<100 ?i : 100+i*9;
         make_superblock(&cq,1,2048+pos,12);
     }
+
+    testvfs_fakerandom(cq.vfs_data,-1);
+    r = coquet_finish(&cq);
+    test_bail(&cq,r);
 }
 
 void test_superblock() {