pub fn addCases(cases: *tests.LibcContext) void {
    cases.addLibcTestCase("api/main.c", true, .{});

    cases.addLibcTestCase("functional/argv.c", true, .{});
    cases.addLibcTestCase("functional/basename.c", true, .{});
    cases.addLibcTestCase("functional/clocale_mbfuncs.c", true, .{});
    cases.addLibcTestCase("functional/clock_gettime.c", true, .{});
    cases.addLibcTestCase("functional/crypt.c", true, .{});
    cases.addLibcTestCase("functional/dirname.c", true, .{});
    cases.addLibcTestCase("functional/env.c", true, .{});
    cases.addLibcTestCase("functional/fcntl.c", false, .{});
    cases.addLibcTestCase("functional/fdopen.c", false, .{});
    cases.addLibcTestCase("functional/fnmatch.c", true, .{});
    cases.addLibcTestCase("functional/fscanf.c", false, .{});
    cases.addLibcTestCase("functional/fwscanf.c", false, .{});
    cases.addLibcTestCase("functional/iconv_open.c", true, .{});
    cases.addLibcTestCase("functional/inet_pton.c", false, .{});
    // "functional/ipc_msg.c": Probably a bug in qemu
    // "functional/ipc_sem.c": Probably a bug in qemu
    // "functional/ipc_shm.c": Probably a bug in qemu
    cases.addLibcTestCase("functional/mbc.c", true, .{});
    cases.addLibcTestCase("functional/memstream.c", true, .{});
    // "functional/mntent.c": https://www.openwall.com/lists/musl/2024/10/22/1
    cases.addLibcTestCase("functional/popen.c", false, .{});
    // cases.addLibcTestCase("functional/pthread_cancel-points.c", false, .{}); - racey if multiple instances of the test run concurrently.
    cases.addLibcTestCase("functional/pthread_cancel.c", false, .{});
    cases.addLibcTestCase("functional/pthread_cond.c", false, .{});
    cases.addLibcTestCase("functional/pthread_mutex.c", false, .{});
    // "functional/pthread_mutex_pi.c": Probably a bug in qemu (big/little endian FUTEX_LOCK_PI)
    // "functional/pthread_robust.c": https://gitlab.com/qemu-project/qemu/-/issues/2424
    cases.addLibcTestCase("functional/pthread_tsd.c", false, .{});
    cases.addLibcTestCase("functional/qsort.c", true, .{});
    cases.addLibcTestCase("functional/random.c", true, .{});
    cases.addLibcTestCase("functional/search_hsearch.c", true, .{});
    cases.addLibcTestCase("functional/search_insque.c", true, .{});
    cases.addLibcTestCase("functional/search_lsearch.c", true, .{});
    cases.addLibcTestCase("functional/search_tsearch.c", true, .{});
    cases.addLibcTestCase("functional/sem_init.c", false, .{});
    cases.addLibcTestCase("functional/sem_open.c", false, .{});
    cases.addLibcTestCase("functional/setjmp.c", false, .{});
    cases.addLibcTestCase("functional/snprintf.c", true, .{});
    cases.addLibcTestCase("functional/socket.c", false, .{});
    cases.addLibcTestCase("functional/spawn.c", false, .{});
    cases.addLibcTestCase("functional/sscanf.c", true, .{});
    cases.addLibcTestCase("functional/sscanf_long.c", false, .{});
    cases.addLibcTestCase("functional/stat.c", false, .{});
    cases.addLibcTestCase("functional/strftime.c", true, .{});
    cases.addLibcTestCase("functional/string.c", true, .{});
    cases.addLibcTestCase("functional/string_memcpy.c", true, .{});
    cases.addLibcTestCase("functional/string_memmem.c", true, .{});
    cases.addLibcTestCase("functional/string_memset.c", true, .{});
    cases.addLibcTestCase("functional/string_strchr.c", true, .{});
    cases.addLibcTestCase("functional/string_strcspn.c", true, .{});
    cases.addLibcTestCase("functional/string_strstr.c", true, .{});
    cases.addLibcTestCase("functional/strtod.c", true, .{});
    cases.addLibcTestCase("functional/strtod_long.c", true, .{});
    cases.addLibcTestCase("functional/strtod_simple.c", true, .{});
    cases.addLibcTestCase("functional/strtof.c", true, .{});
    cases.addLibcTestCase("functional/strtol.c", true, .{});
    cases.addLibcTestCase("functional/strtold.c", true, .{});
    cases.addLibcTestCase("functional/swprintf.c", true, .{});
    cases.addLibcTestCase("functional/tgmath.c", true, .{});
    cases.addLibcTestCase("functional/time.c", false, .{});
    cases.addLibcTestCase("functional/tls_align.c", true, .{ .additional_src_file = "functional/tls_align_dso.c" });
    cases.addLibcTestCase("functional/tls_init.c", false, .{});
    cases.addLibcTestCase("functional/tls_local_exec.c", false, .{});
    cases.addLibcTestCase("functional/udiv.c", true, .{});
    cases.addLibcTestCase("functional/ungetc.c", false, .{});
    // cases.addLibcTestCase("functional/utime.c", false, .{}); - fails under heavy load; futimens not reflected in subsequent fstat
    cases.addLibcTestCase("functional/vfork.c", false, .{});
    cases.addLibcTestCase("functional/wcsstr.c", true, .{});
    cases.addLibcTestCase("functional/wcstol.c", true, .{});

    // cases.addLibcTestCase("regression/daemon-failure.c", false, .{}); - unexpected ENOMEM with high FD limit
    cases.addLibcTestCase("regression/dn_expand-empty.c", false, .{});
    cases.addLibcTestCase("regression/dn_expand-ptr-0.c", false, .{});
    cases.addLibcTestCase("regression/execle-env.c", false, .{});
    cases.addLibcTestCase("regression/fflush-exit.c", false, .{});
    cases.addLibcTestCase("regression/fgets-eof.c", true, .{});
    cases.addLibcTestCase("regression/fgetwc-buffering.c", false, .{});
    cases.addLibcTestCase("regression/flockfile-list.c", false, .{});
    cases.addLibcTestCase("regression/fpclassify-invalid-ld80.c", true, .{});
    cases.addLibcTestCase("regression/ftello-unflushed-append.c", false, .{});
    cases.addLibcTestCase("regression/getpwnam_r-crash.c", false, .{});
    cases.addLibcTestCase("regression/getpwnam_r-errno.c", false, .{});
    cases.addLibcTestCase("regression/iconv-roundtrips.c", true, .{});
    cases.addLibcTestCase("regression/inet_ntop-v4mapped.c", true, .{});
    cases.addLibcTestCase("regression/inet_pton-empty-last-field.c", true, .{});
    cases.addLibcTestCase("regression/iswspace-null.c", true, .{});
    cases.addLibcTestCase("regression/lrand48-signextend.c", true, .{});
    cases.addLibcTestCase("regression/lseek-large.c", false, .{});
    cases.addLibcTestCase("regression/malloc-0.c", true, .{});
    // "regression/malloc-brk-fail.c": QEMU OOM
    // cases.addLibcTestCase("regression/malloc-oom.c", false, .{}); // wasi-libc: requires t_memfill; QEMU OOM
    cases.addLibcTestCase("regression/mbsrtowcs-overflow.c", true, .{});
    cases.addLibcTestCase("regression/memmem-oob-read.c", true, .{});
    cases.addLibcTestCase("regression/memmem-oob.c", true, .{});
    cases.addLibcTestCase("regression/mkdtemp-failure.c", false, .{});
    cases.addLibcTestCase("regression/mkstemp-failure.c", false, .{});
    cases.addLibcTestCase("regression/printf-1e9-oob.c", true, .{});
    cases.addLibcTestCase("regression/printf-fmt-g-round.c", true, .{});
    cases.addLibcTestCase("regression/printf-fmt-g-zeros.c", true, .{});
    cases.addLibcTestCase("regression/printf-fmt-n.c", true, .{});
    // "regression/pthread-robust-detach.c": https://gitlab.com/qemu-project/qemu/-/issues/2424
    cases.addLibcTestCase("regression/pthread_atfork-errno-clobber.c", false, .{});
    cases.addLibcTestCase("regression/pthread_cancel-sem_wait.c", false, .{});
    // Flaky under heavy load: cases.addLibcTestCase("regression/pthread_cond-smasher.c", false, .{});
    // Flaky under heavy load: cases.addLibcTestCase("regression/pthread_cond_wait-cancel_ignored.c", false, .{});
    cases.addLibcTestCase("regression/pthread_condattr_setclock.c", false, .{});
    // "regression/pthread_create-oom.c": QEMU OOM
    cases.addLibcTestCase("regression/pthread_exit-cancel.c", false, .{});
    cases.addLibcTestCase("regression/pthread_exit-dtor.c", false, .{});
    cases.addLibcTestCase("regression/pthread_once-deadlock.c", false, .{});
    cases.addLibcTestCase("regression/pthread_rwlock-ebusy.c", false, .{});
    cases.addLibcTestCase("regression/putenv-doublefree.c", true, .{});
    // cases.addLibcTestCase("regression/raise-race.c", false, .{}); - Sometimes hangs when run natively on x86_64-linux.
    cases.addLibcTestCase("regression/regex-backref-0.c", true, .{});
    cases.addLibcTestCase("regression/regex-bracket-icase.c", true, .{});
    cases.addLibcTestCase("regression/regex-ere-backref.c", true, .{});
    cases.addLibcTestCase("regression/regex-escaped-high-byte.c", true, .{});
    cases.addLibcTestCase("regression/regex-negated-range.c", true, .{});
    cases.addLibcTestCase("regression/regexec-nosub.c", true, .{});
    cases.addLibcTestCase("regression/rewind-clear-error.c", false, .{});
    // cases.addLibcTestCase("regression/rlimit-open-files.c", false, .{}); - fails when machine is under heavy load
    cases.addLibcTestCase("regression/scanf-bytes-consumed.c", true, .{});
    cases.addLibcTestCase("regression/scanf-match-literal-eof.c", true, .{});
    cases.addLibcTestCase("regression/scanf-nullbyte-char.c", true, .{});
    cases.addLibcTestCase("regression/sem_close-unmap.c", false, .{});
    // "regression/setenv-oom.c": QEMU OOM
    cases.addLibcTestCase("regression/setvbuf-unget.c", true, .{});
    cases.addLibcTestCase("regression/sigaltstack.c", false, .{});
    cases.addLibcTestCase("regression/sigprocmask-internal.c", false, .{});
    cases.addLibcTestCase("regression/sigreturn.c", true, .{});
    cases.addLibcTestCase("regression/sscanf-eof.c", true, .{});
    cases.addLibcTestCase("regression/strverscmp.c", true, .{});
    cases.addLibcTestCase("regression/syscall-sign-extend.c", false, .{});
    cases.addLibcTestCase("regression/uselocale-0.c", true, .{});
    cases.addLibcTestCase("regression/wcsncpy-read-overflow.c", true, .{});
    cases.addLibcTestCase("regression/wcsstr-false-negative.c", true, .{});

    cases.addLibcTestCase("math/acos.c", true, .{});
    cases.addLibcTestCase("math/acosf.c", true, .{});
    // cases.addLibcTestCase("math/acosh.c", true, .{});
    cases.addLibcTestCase("math/acoshf.c", true, .{});
    // cases.addLibcTestCase("math/acoshl.c", true, .{});
    // cases.addLibcTestCase("math/acosl.c", true, .{});
    cases.addLibcTestCase("math/asin.c", true, .{});
    cases.addLibcTestCase("math/asinf.c", true, .{});
    // cases.addLibcTestCase("math/asinh.c", true, .{});
    cases.addLibcTestCase("math/asinhf.c", true, .{});
    // cases.addLibcTestCase("math/asinhl.c", true, .{});
    cases.addLibcTestCase("math/asinl.c", true, .{});
    cases.addLibcTestCase("math/atan.c", true, .{});
    cases.addLibcTestCase("math/atan2.c", true, .{});
    cases.addLibcTestCase("math/atan2f.c", true, .{});
    cases.addLibcTestCase("math/atan2l.c", true, .{});
    cases.addLibcTestCase("math/atanf.c", true, .{});
    cases.addLibcTestCase("math/atanh.c", true, .{});
    cases.addLibcTestCase("math/atanhf.c", true, .{});
    cases.addLibcTestCase("math/atanhl.c", true, .{});
    cases.addLibcTestCase("math/atanl.c", true, .{});
    cases.addLibcTestCase("math/cbrt.c", true, .{});
    cases.addLibcTestCase("math/cbrtf.c", true, .{});
    cases.addLibcTestCase("math/cbrtl.c", true, .{});
    cases.addLibcTestCase("math/ceil.c", true, .{});
    cases.addLibcTestCase("math/ceilf.c", true, .{});
    cases.addLibcTestCase("math/ceill.c", true, .{});
    cases.addLibcTestCase("math/copysign.c", true, .{});
    cases.addLibcTestCase("math/copysignf.c", true, .{});
    cases.addLibcTestCase("math/copysignl.c", true, .{});
    cases.addLibcTestCase("math/cos.c", true, .{});
    cases.addLibcTestCase("math/cosf.c", true, .{});
    cases.addLibcTestCase("math/cosh.c", true, .{});
    cases.addLibcTestCase("math/coshf.c", true, .{});
    cases.addLibcTestCase("math/coshl.c", true, .{});
    cases.addLibcTestCase("math/cosl.c", true, .{});
    cases.addLibcTestCase("math/drem.c", true, .{});
    cases.addLibcTestCase("math/dremf.c", true, .{});
    cases.addLibcTestCase("math/erf.c", true, .{});
    cases.addLibcTestCase("math/erfc.c", true, .{});
    // cases.addLibcTestCase("math/erfcf.c", true, .{});
    cases.addLibcTestCase("math/erfcl.c", true, .{});
    cases.addLibcTestCase("math/erff.c", true, .{});
    cases.addLibcTestCase("math/erfl.c", true, .{});
    cases.addLibcTestCase("math/exp.c", true, .{});
    cases.addLibcTestCase("math/exp10.c", true, .{});
    cases.addLibcTestCase("math/exp10f.c", true, .{});
    cases.addLibcTestCase("math/exp10l.c", true, .{});
    cases.addLibcTestCase("math/exp2.c", true, .{});
    cases.addLibcTestCase("math/exp2f.c", true, .{});
    cases.addLibcTestCase("math/exp2l.c", true, .{});
    cases.addLibcTestCase("math/expf.c", true, .{});
    cases.addLibcTestCase("math/expl.c", true, .{});
    // cases.addLibcTestCase("math/expm1.c", true, .{});
    // cases.addLibcTestCase("math/expm1f.c", true, .{});
    // cases.addLibcTestCase("math/expm1l.c", true, .{});
    cases.addLibcTestCase("math/fabs.c", true, .{});
    cases.addLibcTestCase("math/fabsf.c", true, .{});
    cases.addLibcTestCase("math/fabsl.c", true, .{});
    cases.addLibcTestCase("math/fdim.c", true, .{});
    cases.addLibcTestCase("math/fdimf.c", true, .{});
    cases.addLibcTestCase("math/fdiml.c", true, .{});
    cases.addLibcTestCase("math/fenv.c", true, .{});
    cases.addLibcTestCase("math/floor.c", true, .{});
    cases.addLibcTestCase("math/floorf.c", true, .{});
    cases.addLibcTestCase("math/floorl.c", true, .{});
    // cases.addLibcTestCase("math/fma.c", true, .{});
    // cases.addLibcTestCase("math/fmaf.c", true, .{});
    // cases.addLibcTestCase("math/fmal.c", true, .{});
    cases.addLibcTestCase("math/fmax.c", true, .{});
    cases.addLibcTestCase("math/fmaxf.c", true, .{});
    cases.addLibcTestCase("math/fmaxl.c", true, .{});
    cases.addLibcTestCase("math/fmin.c", true, .{});
    cases.addLibcTestCase("math/fminf.c", true, .{});
    cases.addLibcTestCase("math/fminl.c", true, .{});
    cases.addLibcTestCase("math/fmod.c", true, .{});
    cases.addLibcTestCase("math/fmodf.c", true, .{});
    cases.addLibcTestCase("math/fmodl.c", true, .{});
    cases.addLibcTestCase("math/fpclassify.c", true, .{});
    cases.addLibcTestCase("math/frexp.c", true, .{});
    cases.addLibcTestCase("math/frexpf.c", true, .{});
    cases.addLibcTestCase("math/frexpl.c", true, .{});
    cases.addLibcTestCase("math/hypot.c", true, .{});
    cases.addLibcTestCase("math/hypotf.c", true, .{});
    cases.addLibcTestCase("math/hypotl.c", true, .{});
    // cases.addLibcTestCase("math/ilogb.c", true, .{});
    // cases.addLibcTestCase("math/ilogbf.c", true, .{});
    // cases.addLibcTestCase("math/ilogbl.c", true, .{});
    cases.addLibcTestCase("math/isless.c", true, .{});
    // cases.addLibcTestCase("math/j0.c", true, .{});
    cases.addLibcTestCase("math/j0f.c", true, .{});
    cases.addLibcTestCase("math/j1.c", true, .{});
    cases.addLibcTestCase("math/j1f.c", true, .{});
    // cases.addLibcTestCase("math/jn.c", true, .{});
    // cases.addLibcTestCase("math/jnf.c", true, .{});
    cases.addLibcTestCase("math/ldexp.c", true, .{});
    cases.addLibcTestCase("math/ldexpf.c", true, .{});
    cases.addLibcTestCase("math/ldexpl.c", true, .{});
    // cases.addLibcTestCase("math/lgamma.c", true, .{});
    cases.addLibcTestCase("math/lgamma_r.c", true, .{});
    // cases.addLibcTestCase("math/lgammaf.c", true, .{});
    // cases.addLibcTestCase("math/lgammaf_r.c", true, .{});
    // cases.addLibcTestCase("math/lgammal.c", true, .{});
    cases.addLibcTestCase("math/lgammal_r.c", true, .{});
    // cases.addLibcTestCase("math/llrint.c", true, .{});
    // cases.addLibcTestCase("math/llrintf.c", true, .{});
    // cases.addLibcTestCase("math/llrintl.c", true, .{});
    // cases.addLibcTestCase("math/llround.c", true, .{});
    // cases.addLibcTestCase("math/llroundf.c", true, .{});
    // cases.addLibcTestCase("math/llroundl.c", true, .{});
    cases.addLibcTestCase("math/log.c", true, .{});
    cases.addLibcTestCase("math/log10.c", true, .{});
    cases.addLibcTestCase("math/log10f.c", true, .{});
    cases.addLibcTestCase("math/log10l.c", true, .{});
    cases.addLibcTestCase("math/log1p.c", true, .{});
    cases.addLibcTestCase("math/log1pf.c", true, .{});
    // cases.addLibcTestCase("math/log1pl.c", true, .{});
    cases.addLibcTestCase("math/log2.c", true, .{});
    cases.addLibcTestCase("math/log2f.c", true, .{});
    cases.addLibcTestCase("math/log2l.c", true, .{});
    cases.addLibcTestCase("math/logb.c", true, .{});
    cases.addLibcTestCase("math/logbf.c", true, .{});
    cases.addLibcTestCase("math/logbl.c", true, .{});
    cases.addLibcTestCase("math/logf.c", true, .{});
    cases.addLibcTestCase("math/logl.c", true, .{});
    cases.addLibcTestCase("math/lrint.c", true, .{});
    cases.addLibcTestCase("math/lrintf.c", true, .{});
    cases.addLibcTestCase("math/lrintl.c", true, .{});
    cases.addLibcTestCase("math/lround.c", true, .{});
    cases.addLibcTestCase("math/lroundf.c", true, .{});
    cases.addLibcTestCase("math/lroundl.c", true, .{});
    cases.addLibcTestCase("math/modf.c", true, .{});
    cases.addLibcTestCase("math/modff.c", true, .{});
    cases.addLibcTestCase("math/modfl.c", true, .{});
    // cases.addLibcTestCase("math/nearbyint.c", true, .{});
    cases.addLibcTestCase("math/nearbyintf.c", true, .{});
    // cases.addLibcTestCase("math/nearbyintl.c", true, .{});
    cases.addLibcTestCase("math/nextafter.c", true, .{});
    cases.addLibcTestCase("math/nextafterf.c", true, .{});
    cases.addLibcTestCase("math/nextafterl.c", true, .{});
    cases.addLibcTestCase("math/nexttoward.c", true, .{});
    cases.addLibcTestCase("math/nexttowardf.c", true, .{});
    cases.addLibcTestCase("math/nexttowardl.c", true, .{});
    // cases.addLibcTestCase("math/pow.c", true, .{});
    cases.addLibcTestCase("math/pow10.c", true, .{});
    cases.addLibcTestCase("math/pow10f.c", true, .{});
    cases.addLibcTestCase("math/pow10l.c", true, .{});
    // cases.addLibcTestCase("math/powf.c", true, .{});
    // cases.addLibcTestCase("math/powl.c", true, .{});
    cases.addLibcTestCase("math/remainder.c", true, .{});
    cases.addLibcTestCase("math/remainderf.c", true, .{});
    cases.addLibcTestCase("math/remainderl.c", true, .{});
    cases.addLibcTestCase("math/remquo.c", true, .{});
    cases.addLibcTestCase("math/remquof.c", true, .{});
    cases.addLibcTestCase("math/remquol.c", true, .{});
    cases.addLibcTestCase("math/rint.c", true, .{});
    cases.addLibcTestCase("math/rintf.c", true, .{});
    cases.addLibcTestCase("math/rintl.c", true, .{});
    cases.addLibcTestCase("math/round.c", true, .{});
    cases.addLibcTestCase("math/roundf.c", true, .{});
    cases.addLibcTestCase("math/roundl.c", true, .{});
    cases.addLibcTestCase("math/scalb.c", true, .{});
    cases.addLibcTestCase("math/scalbf.c", true, .{});
    cases.addLibcTestCase("math/scalbln.c", true, .{});
    cases.addLibcTestCase("math/scalblnf.c", true, .{});
    cases.addLibcTestCase("math/scalblnl.c", true, .{});
    cases.addLibcTestCase("math/scalbn.c", true, .{});
    cases.addLibcTestCase("math/scalbnf.c", true, .{});
    cases.addLibcTestCase("math/scalbnl.c", true, .{});
    cases.addLibcTestCase("math/sin.c", true, .{});
    cases.addLibcTestCase("math/sincos.c", true, .{});
    cases.addLibcTestCase("math/sincosf.c", true, .{});
    cases.addLibcTestCase("math/sincosl.c", true, .{});
    cases.addLibcTestCase("math/sinf.c", true, .{});
    // cases.addLibcTestCase("math/sinh.c", true, .{});
    cases.addLibcTestCase("math/sinhf.c", true, .{});
    // cases.addLibcTestCase("math/sinhl.c", true, .{});
    cases.addLibcTestCase("math/sinl.c", true, .{});
    cases.addLibcTestCase("math/sqrt.c", true, .{});
    cases.addLibcTestCase("math/sqrtf.c", true, .{});
    cases.addLibcTestCase("math/sqrtl.c", true, .{});
    cases.addLibcTestCase("math/tan.c", true, .{});
    cases.addLibcTestCase("math/tanf.c", true, .{});
    cases.addLibcTestCase("math/tanh.c", true, .{});
    cases.addLibcTestCase("math/tanhf.c", true, .{});
    cases.addLibcTestCase("math/tanhl.c", true, .{});
    cases.addLibcTestCase("math/tanl.c", true, .{});
    // cases.addLibcTestCase("math/tgamma.c", true, .{});
    // cases.addLibcTestCase("math/tgammaf.c", true, .{});
    // cases.addLibcTestCase("math/tgammal.c", true, .{});
    cases.addLibcTestCase("math/trunc.c", true, .{});
    cases.addLibcTestCase("math/truncf.c", true, .{});
    cases.addLibcTestCase("math/truncl.c", true, .{});
    // cases.addLibcTestCase("math/y0.c", true, .{});
    // cases.addLibcTestCase("math/y0f.c", true, .{});
    // cases.addLibcTestCase("math/y1.c", true, .{});
    // cases.addLibcTestCase("math/y1f.c", true, .{});
    // cases.addLibcTestCase("math/yn.c", true, .{});
    // cases.addLibcTestCase("math/ynf.c", true, .{});
}

const std = @import("std");
const tests = @import("tests.zig");
