Skip to content

Commit 1e11395

Browse files
committed
Clean up test/: Move configuration files and configs.yml into tests/configs/*
- This commit moves all configuration files to the newly added tests/configs/ directory and updates the corresponding include paths for each configuration header. Signed-off-by: willieyz <willie.zhao@chelpis.com>
1 parent 606e8dd commit 1e11395

19 files changed

+60
-60
lines changed

.github/actions/config-variations/action.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ runs:
3737
shell: bash
3838
run: |
3939
make clean
40-
CFLAGS='-Itest -DMLD_CONFIG_FILE=\"break_pct_config.h\"' make func -j4
40+
CFLAGS='-Itest -DMLD_CONFIG_FILE=\"configs/break_pct_config.h\"' make func -j4
4141
# PCT breakage is done at runtime via MLD_BREAK_PCT
4242
make run_func # Should be OK
4343
MLD_BREAK_PCT=0 make run_func # Should be OK
@@ -53,7 +53,7 @@ runs:
5353
with:
5454
gh_token: ${{ inputs.gh_token }}
5555
compile_mode: native
56-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_heap_alloc_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
56+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_heap_alloc_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
5757
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
5858
func: true
5959
kat: true
@@ -68,7 +68,7 @@ runs:
6868
with:
6969
gh_token: ${{ inputs.gh_token }}
7070
compile_mode: native
71-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_zeroize_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
71+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_zeroize_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
7272
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
7373
func: true
7474
kat: true
@@ -82,7 +82,7 @@ runs:
8282
with:
8383
gh_token: ${{ inputs.gh_token }}
8484
compile_mode: native
85-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
85+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
8686
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
8787
func: true
8888
kat: true
@@ -96,7 +96,7 @@ runs:
9696
with:
9797
gh_token: ${{ inputs.gh_token }}
9898
compile_mode: native
99-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_0.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
99+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_0.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
100100
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
101101
func: true
102102
kat: true
@@ -110,7 +110,7 @@ runs:
110110
with:
111111
gh_token: ${{ inputs.gh_token }}
112112
compile_mode: native
113-
cflags: "-std=c11 -march=armv8.4-a+sha3 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_ID_AA64PFR1_EL1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
113+
cflags: "-std=c11 -march=armv8.4-a+sha3 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_ID_AA64PFR1_EL1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
114114
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
115115
func: true
116116
kat: true
@@ -124,7 +124,7 @@ runs:
124124
with:
125125
gh_token: ${{ inputs.gh_token }}
126126
compile_mode: native
127-
cflags: "-std=c11 -mavx2 -mbmi2 -mpopcnt -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_CPUID_AVX2.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
127+
cflags: "-std=c11 -mavx2 -mbmi2 -mpopcnt -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_CPUID_AVX2.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
128128
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
129129
func: true
130130
kat: true
@@ -138,7 +138,7 @@ runs:
138138
with:
139139
gh_token: ${{ inputs.gh_token }}
140140
compile_mode: native
141-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"no_asm_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
141+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/no_asm_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
142142
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
143143
func: true
144144
kat: true
@@ -152,7 +152,7 @@ runs:
152152
with:
153153
gh_token: ${{ inputs.gh_token }}
154154
compile_mode: native
155-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"serial_fips202_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
155+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/serial_fips202_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
156156
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
157157
func: true
158158
kat: true
@@ -166,7 +166,7 @@ runs:
166166
with:
167167
gh_token: ${{ inputs.gh_token }}
168168
compile_mode: native
169-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_randombytes_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
169+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_randombytes_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
170170
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
171171
func: true
172172
kat: true
@@ -180,7 +180,7 @@ runs:
180180
with:
181181
gh_token: ${{ inputs.gh_token }}
182182
compile_mode: native
183-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_memcpy_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
183+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_memcpy_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
184184
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
185185
func: true
186186
kat: true
@@ -194,7 +194,7 @@ runs:
194194
with:
195195
gh_token: ${{ inputs.gh_token }}
196196
compile_mode: native
197-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_memset_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
197+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_memset_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
198198
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
199199
func: true
200200
kat: true
@@ -208,7 +208,7 @@ runs:
208208
with:
209209
gh_token: ${{ inputs.gh_token }}
210210
compile_mode: native
211-
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_stdlib_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
211+
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_stdlib_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
212212
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
213213
func: true
214214
kat: true

BIBLIOGRAPHY.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ source code and documentation.
3939
- [integration/liboqs/config_x86_64.h](integration/liboqs/config_x86_64.h)
4040
- [mldsa/mldsa_native_config.h](mldsa/mldsa_native_config.h)
4141
- [mldsa/src/sign.c](mldsa/src/sign.c)
42-
- [test/break_pct_config.h](test/break_pct_config.h)
43-
- [test/custom_heap_alloc_config.h](test/custom_heap_alloc_config.h)
44-
- [test/custom_memcpy_config.h](test/custom_memcpy_config.h)
45-
- [test/custom_memset_config.h](test/custom_memset_config.h)
46-
- [test/custom_native_capability_config_0.h](test/custom_native_capability_config_0.h)
47-
- [test/custom_native_capability_config_1.h](test/custom_native_capability_config_1.h)
48-
- [test/custom_native_capability_config_CPUID_AVX2.h](test/custom_native_capability_config_CPUID_AVX2.h)
49-
- [test/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/custom_native_capability_config_ID_AA64PFR1_EL1.h)
50-
- [test/custom_randombytes_config.h](test/custom_randombytes_config.h)
51-
- [test/custom_stdlib_config.h](test/custom_stdlib_config.h)
52-
- [test/custom_zeroize_config.h](test/custom_zeroize_config.h)
53-
- [test/no_asm_config.h](test/no_asm_config.h)
54-
- [test/serial_fips202_config.h](test/serial_fips202_config.h)
55-
- [test/test_alloc_config.h](test/test_alloc_config.h)
42+
- [test/configs/break_pct_config.h](test/configs/break_pct_config.h)
43+
- [test/configs/custom_heap_alloc_config.h](test/configs/custom_heap_alloc_config.h)
44+
- [test/configs/custom_memcpy_config.h](test/configs/custom_memcpy_config.h)
45+
- [test/configs/custom_memset_config.h](test/configs/custom_memset_config.h)
46+
- [test/configs/custom_native_capability_config_0.h](test/configs/custom_native_capability_config_0.h)
47+
- [test/configs/custom_native_capability_config_1.h](test/configs/custom_native_capability_config_1.h)
48+
- [test/configs/custom_native_capability_config_CPUID_AVX2.h](test/configs/custom_native_capability_config_CPUID_AVX2.h)
49+
- [test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h)
50+
- [test/configs/custom_randombytes_config.h](test/configs/custom_randombytes_config.h)
51+
- [test/configs/custom_stdlib_config.h](test/configs/custom_stdlib_config.h)
52+
- [test/configs/custom_zeroize_config.h](test/configs/custom_zeroize_config.h)
53+
- [test/configs/no_asm_config.h](test/configs/no_asm_config.h)
54+
- [test/configs/serial_fips202_config.h](test/configs/serial_fips202_config.h)
55+
- [test/configs/test_alloc_config.h](test/configs/test_alloc_config.h)
5656

5757
### `FIPS202`
5858

@@ -94,19 +94,19 @@ source code and documentation.
9494
- [mldsa/src/rounding.h](mldsa/src/rounding.h)
9595
- [mldsa/src/sign.c](mldsa/src/sign.c)
9696
- [mldsa/src/sign.h](mldsa/src/sign.h)
97-
- [test/break_pct_config.h](test/break_pct_config.h)
98-
- [test/custom_memcpy_config.h](test/custom_memcpy_config.h)
99-
- [test/custom_memset_config.h](test/custom_memset_config.h)
100-
- [test/custom_native_capability_config_0.h](test/custom_native_capability_config_0.h)
101-
- [test/custom_native_capability_config_1.h](test/custom_native_capability_config_1.h)
102-
- [test/custom_native_capability_config_CPUID_AVX2.h](test/custom_native_capability_config_CPUID_AVX2.h)
103-
- [test/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/custom_native_capability_config_ID_AA64PFR1_EL1.h)
104-
- [test/custom_randombytes_config.h](test/custom_randombytes_config.h)
105-
- [test/custom_stdlib_config.h](test/custom_stdlib_config.h)
106-
- [test/custom_zeroize_config.h](test/custom_zeroize_config.h)
107-
- [test/no_asm_config.h](test/no_asm_config.h)
108-
- [test/serial_fips202_config.h](test/serial_fips202_config.h)
109-
- [test/test_alloc_config.h](test/test_alloc_config.h)
97+
- [test/configs/break_pct_config.h](test/configs/break_pct_config.h)
98+
- [test/configs/custom_memcpy_config.h](test/configs/custom_memcpy_config.h)
99+
- [test/configs/custom_memset_config.h](test/configs/custom_memset_config.h)
100+
- [test/configs/custom_native_capability_config_0.h](test/configs/custom_native_capability_config_0.h)
101+
- [test/configs/custom_native_capability_config_1.h](test/configs/custom_native_capability_config_1.h)
102+
- [test/configs/custom_native_capability_config_CPUID_AVX2.h](test/configs/custom_native_capability_config_CPUID_AVX2.h)
103+
- [test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h)
104+
- [test/configs/custom_randombytes_config.h](test/configs/custom_randombytes_config.h)
105+
- [test/configs/custom_stdlib_config.h](test/configs/custom_stdlib_config.h)
106+
- [test/configs/custom_zeroize_config.h](test/configs/custom_zeroize_config.h)
107+
- [test/configs/no_asm_config.h](test/configs/no_asm_config.h)
108+
- [test/configs/serial_fips202_config.h](test/configs/serial_fips202_config.h)
109+
- [test/configs/test_alloc_config.h](test/configs/test_alloc_config.h)
110110

111111
### `HYBRID`
112112

scripts/autogen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3054,7 +3054,7 @@ def gen_test_config(config_path, config_spec, default_config_content):
30543054
def gen_test_configs():
30553055
"""Generate all test configuration files from metadata."""
30563056
# Load metadata
3057-
metadata = yaml.safe_load(read_file("test/configs.yml"))
3057+
metadata = yaml.safe_load(read_file("test/configs/configs.yml"))
30583058

30593059
# Load default config
30603060
default_config = read_file("mldsa/mldsa_native_config.h")
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Each entry describes how a test config differs from mldsa/mldsa_native_config.h
77

88
configs:
9-
- path: test/no_asm_config.h
9+
- path: test/configs/no_asm_config.h
1010
description: "Test configuration with no assembly code"
1111
defines:
1212
MLD_CONFIG_NO_ASM: true
@@ -23,12 +23,12 @@ configs:
2323
}
2424
#endif
2525
26-
- path: test/serial_fips202_config.h
26+
- path: test/configs/serial_fips202_config.h
2727
description: "Test configuration with serial FIPS202 only"
2828
defines:
2929
MLD_CONFIG_SERIAL_FIPS202_ONLY: true
3030

31-
- path: test/custom_randombytes_config.h
31+
- path: test/configs/custom_randombytes_config.h
3232
description: "Test configuration with custom randombytes"
3333
defines:
3434
MLD_CONFIG_CUSTOM_RANDOMBYTES:
@@ -44,7 +44,7 @@ configs:
4444
}
4545
#endif /* !__ASSEMBLER__ */
4646
47-
- path: test/custom_zeroize_config.h
47+
- path: test/configs/custom_zeroize_config.h
4848
description: "Test configuration with custom zeroize"
4949
defines:
5050
MLD_CONFIG_CUSTOM_ZEROIZE:
@@ -60,7 +60,7 @@ configs:
6060
}
6161
#endif
6262
63-
- path: test/custom_memcpy_config.h
63+
- path: test/configs/custom_memcpy_config.h
6464
description: "Test configuration with custom memcpy"
6565
defines:
6666
MLD_CONFIG_CUSTOM_MEMCPY:
@@ -83,7 +83,7 @@ configs:
8383
}
8484
#endif /* !__ASSEMBLER__ */
8585
86-
- path: test/custom_memset_config.h
86+
- path: test/configs/custom_memset_config.h
8787
description: "Test configuration with custom memset"
8888
defines:
8989
MLD_CONFIG_CUSTOM_MEMSET:
@@ -105,7 +105,7 @@ configs:
105105
}
106106
#endif
107107
108-
- path: test/custom_stdlib_config.h
108+
- path: test/configs/custom_stdlib_config.h
109109
description: "Test configuration with custom stdlib functions"
110110
defines:
111111
MLD_CONFIG_CUSTOM_MEMCPY:
@@ -146,7 +146,7 @@ configs:
146146
}
147147
#endif
148148
149-
- path: test/break_pct_config.h
149+
- path: test/configs/break_pct_config.h
150150
description: "Test configuration for PCT breakage testing"
151151
defines:
152152
MLD_CONFIG_KEYGEN_PCT: true
@@ -165,7 +165,7 @@ configs:
165165
}
166166
#endif
167167
168-
- path: test/custom_native_capability_config_0.h
168+
- path: test/configs/custom_native_capability_config_0.h
169169
description: "Test configuration with custom capability function returning 0"
170170
defines:
171171
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
@@ -182,7 +182,7 @@ configs:
182182
}
183183
#endif /* !__ASSEMBLER__ */
184184
185-
- path: test/custom_native_capability_config_1.h
185+
- path: test/configs/custom_native_capability_config_1.h
186186
description: "Test configuration with custom capability function returning 1"
187187
defines:
188188
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
@@ -198,7 +198,7 @@ configs:
198198
}
199199
#endif /* !__ASSEMBLER__ */
200200
201-
- path: test/custom_native_capability_config_CPUID_AVX2.h
201+
- path: test/configs/custom_native_capability_config_CPUID_AVX2.h
202202
description: "Test configuration with CPUID-based AVX2 capability detection"
203203
defines:
204204
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
@@ -246,7 +246,7 @@ configs:
246246
}
247247
#endif /* !__ASSEMBLER__ */
248248
249-
- path: test/custom_native_capability_config_ID_AA64PFR1_EL1.h
249+
- path: test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h
250250
description: "Test configuration with ARM system register capability detection"
251251
defines:
252252
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
@@ -405,7 +405,7 @@ configs:
405405
MLD_CONFIG_FILE:
406406
comment: "/* No need to set this -- we _are_ already in a custom config */"
407407

408-
- path: test/test_alloc_config.h
408+
- path: test/configs/test_alloc_config.h
409409
description: "Using custom allocation that can be made fail at specific invocation"
410410
defines:
411411
MLD_CONFIG_NAMESPACE_PREFIX: mld
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)