From fc150adaf3bff133da0e59d842f13b7b21297fc0 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 4 Oct 2024 12:21:17 +0200 Subject: Removed slow test This test generated a pruning table and it was too slow (around a minute). Now the whole test suite runs in 49s on my laptop, which is more reasonable. Pruning table generation should be tested with tools. They run in release mode and are much faster, but can be still run in debug mode optionally. --- test/120_gendata_h48h0k4/00_h_0.in | 2 - test/120_gendata_h48h0k4/00_h_0.out | 22 ------- test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c | 84 ------------------------ 3 files changed, 108 deletions(-) delete mode 100644 test/120_gendata_h48h0k4/00_h_0.in delete mode 100644 test/120_gendata_h48h0k4/00_h_0.out delete mode 100644 test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c (limited to 'test') diff --git a/test/120_gendata_h48h0k4/00_h_0.in b/test/120_gendata_h48h0k4/00_h_0.in deleted file mode 100644 index 661d826..0000000 --- a/test/120_gendata_h48h0k4/00_h_0.in +++ /dev/null @@ -1,2 +0,0 @@ -4 -0 diff --git a/test/120_gendata_h48h0k4/00_h_0.out b/test/120_gendata_h48h0k4/00_h_0.out deleted file mode 100644 index 6ca64de..0000000 --- a/test/120_gendata_h48h0k4/00_h_0.out +++ /dev/null @@ -1,22 +0,0 @@ -59904493 - -cocsepdata: -Classes: 3393 -Max value: 9 -0: 1 -1: 6 -2: 63 -3: 468 -4: 3068 -5: 15438 -6: 53814 -7: 71352 -8: 8784 -9: 96 - -h48: -0: 1 -1: 1 -2: 4 -3: 34 -4: 331 diff --git a/test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c b/test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c deleted file mode 100644 index 7c5b441..0000000 --- a/test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c +++ /dev/null @@ -1,84 +0,0 @@ -#include "../test.h" - -#define COCSEP_CLASSES 3393 -#define INFOSIZE 512 -#define INFO_SOLVER_STRLEN 100 -#define INFO_DISTRIBUTION_LEN 21 - -typedef struct { - uint64_t distribution[INFO_DISTRIBUTION_LEN]; - uint64_t type; - uint64_t infosize; - uint64_t fullsize; - uint64_t hash; - uint64_t entries; - uint64_t classes; /* Used only by cocsepdata, for now */ - uint64_t next; - char solver[INFO_SOLVER_STRLEN]; - uint8_t h48h; - uint8_t bits; - uint8_t base; - uint8_t maxvalue; -} tableinfo_t; - -typedef struct { - uint8_t h; - uint8_t k; - uint8_t base; - uint8_t maxdepth; - tableinfo_t info; - void *buf; - void *h48buf; - uint32_t *cocsepdata; - uint64_t selfsim[COCSEP_CLASSES]; - cube_t crep[COCSEP_CLASSES]; -} gendata_h48_arg_t; - -int64_t gendata_h48(gendata_h48_arg_t *); -bool readtableinfo(const void *, tableinfo_t *); - -void run(void) { - char str[STRLENMAX]; - uint8_t i; - gendata_h48_arg_t arg; - size_t result, sz; - tableinfo_t cinfo, hinfo; - void *h48buf; - - fgets(str, STRLENMAX, stdin); - arg.maxdepth = atoi(str); - fgets(str, STRLENMAX, stdin); - arg.h = atoi(str); - arg.k = 4; - - sz = gendata_h48(&arg); /* With buf = NULL returns data size */ - arg.buf = malloc(sz); - - result = gendata_h48(&arg); - - if (!readtableinfo(arg.buf, &cinfo)) { - printf("Error reading cocsep info\n"); - goto end; - } - - h48buf = (char *)arg.buf + cinfo.next; - if (!readtableinfo(h48buf, &hinfo)) { - printf("Error reading h48 info\n"); - goto end; - } - - printf("%zu\n\n", result); - - printf("cocsepdata:\n"); - printf("Classes: %" PRIu64 "\n", cinfo.classes); - printf("Max value: %" PRIu8 "\n", cinfo.maxvalue); - for (i = 0; i <= cinfo.maxvalue; i++) - printf("%" PRIu32 ": %" PRIu64 "\n", i, cinfo.distribution[i]); - - printf("\nh48:\n"); - for (i = 0; i <= hinfo.maxvalue; i++) - printf("%" PRIu32 ": %" PRIu64 "\n", i, hinfo.distribution[i]); - -end: - free(arg.buf); -} -- cgit v1.3