moonchen opened a new issue, #13750:
URL: https://github.com/apache/trafficserver/issues/13750
## Summary
`test_abuse_shield_config` "Config requires a registry for fingerprint
rules" failed once in the Rocky CI job and passed when the job was rerun on the
same code.
## Failure
Rocky build 10525 (PR #13747 merged onto master a2416f2826), `ctest -j4`:
```
test_config.cc:373: FAILED:
CHECK_FALSE( config->validate(error_msg) )
with expansion:
!true
test_config.cc:374: FAILED:
CHECK( error_msg == "global.fingerprint_registry is required when
fingerprint rules are configured" )
with expansion:
"" == "global.fingerprint_registry is required when fingerprint rules are
configured"
```
Rocky build 10527 merged the same two commits (PR head dc5d79579f, master
a2416f2826) and passed all 978 tests.
## Likely cause (not confirmed)
For `validate()` to pass, the parsed config must have no fingerprint rules
or must set `fingerprint_registry`. The file this case writes has a JA3 rule
and no registry, so the case most likely parsed another case's file.
ctest runs each Catch2 case as its own process. In the failing run, "Config
parses and canonicalizes ClientHello fingerprint filters" was running at the
same time. That case also writes `abuse_shield.yaml`, and its file sets
`fingerprint_registry`.
`TempConfig` names its directory `abuse_shield_config_test_<steady_clock
count>` under `temp_directory_path()`. Nothing else in the name is unique to
the process. Two cases that read the same clock value would share a directory
and overwrite each other's files. Six cases write `abuse_shield.yaml`. I have
not confirmed that the directories collided in the failing run.
## Suggested fix
Make the directory unique per process, for example with `mkdtemp()` or by
adding `getpid()` to the name.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]