summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-09-13 10:20:23 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-15 15:52:06 +0200
commitf6431b0a0c40772ea2bb745c11ee17e480182c8d (patch)
tree55813becd5823c0f198937d9348740af1d69d310 /.gitignore
parent8519ab031d8022999603a69ee9f18e8cfb06645d (diff)
tests/shell: export NFT_TEST_RANDOM_SEED variable for tests
Let "run-tests.sh" export a NFT_TEST_RANDOM_SEED variable, set to a decimal, random integer (in the range of 0 to 0x7FFFFFFF). The purpose is to provide a seed to tests for randomization. Randomizing tests is very useful to increase the coverage while not testing all combinations (which might not be practical). The point of NFT_TEST_RANDOM_SEED is that the user can set the environment variable so that the same series of random events is used. That is useful for reproducing an issue, that is known to happen with a certain seed. - by default, if the user leaves NFT_TEST_RANDOM_SEED unset or empty, the script generates a number using $SRANDOM. - if the user sets NFT_TEST_RANDOM_SEED to an integer it is taken as is (modulo 0x80000000). - otherwise, calculate a number by hashing the value of $NFT_TEST_RANDOM_SEED. Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions