bookmarkfs/tests/lib_hashmap.at
CismonX ffa28a4091
test: fetch prng seed from environment variable
Tests that require PRNG are by default seeded from `/dev/urandom`.
However, the user should be able to override with a given seed
to reproduce a failing test.

Instead of messing with command-line arguments, a cleaner approach
is to fetch the seed from an environment variable.
2025-06-19 16:51:35 +08:00

30 lines
727 B
Text

dnl
dnl Copyright (C) 2025 CismonX <admin@cismon.net>
dnl
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty,
dnl provided the copyright notice and this notice are preserved.
dnl This file is offered as-is, without any warranty.
dnl
AT_SETUP([util lib: hashmap])
AT_KEYWORDS([lib hashmap])
ATX_CHECK_LIB([
size="${CHECK_HASHMAP_DATA_SIZE}"
if test -z "$size"; then
# Requires at least 128 MiB of memory on a 64-bit platform.
size=22
fi
rounds="${CHECK_HASHMAP_ROUNDS}"
if test -z "$rounds"; then
rounds=5
fi
ATX_RUN([
check-util-lib hashmap -n "$size" -r "$rounds"
])
])
AT_CLEANUP