|SUCCESS| [v3,5/5] test: allow setting random seed for tests

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Nov 27 21:11:13 CET 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/173288

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-27

Info

Patch 5/5 (test: allow setting random seed for tests)

1. The documentation says the generator is reseeded before each test command, but interactive mode only reseeds once.
   In interactive mode the seed is applied a single time, before the prompt:
   ```
   +		if (use_test_seed)
   +			rte_srand(test_seed);
   +
   		cmdline_interact(cl);
   ```
   Commands typed at the prompt are not reseeded, so later tests depend on what ran before them.
   The added text in `unit_test_suite.rst` makes a broader claim: "seeds the generator with that value before each test command is run".
   Either limit that sentence to the `DPDK_TEST` and command-line argument paths, or note that interactive mode seeds only once at startup.

2. `strtoull()` accepts a leading minus sign, so `DPDK_TEST_SEED=-1` is silently accepted as `UINT64_MAX`:
   ```
   +	test_seed = strtoull(env, &end, 0);
   ```
   This is harmless for a seed value, but rejecting a leading `-` would make the input validation match what the error message implies.

Patch 3/5 (random: use all 64 bits of the seed)

3. This patch changes the sequence `rte_rand()` produces for a given `rte_srand()` seed.
   An application that recorded a seed to reproduce a run on an earlier release will get different values after upgrading.
   A short note in the release notes would make this visible to users.

Review-Result: CLEAN


More information about the test-report mailing list