bryancall opened a new pull request, #13686: URL: https://github.com/apache/trafficserver/pull/13686
Trivial Coverity cleanups in test code: unnecessary copies, dead null checks, and one umask narrowing. No behavior change. Part of #13682. Ordered first deliberately — this is the least interesting of the five test-code PRs and should be the cheapest to approve. | CID | Fix | |---|---| | 1658828, 1658836 | `test_ConfigRegistry.cc`: take `ConfigContext` by const reference in the test handler | | 1660033, 1660037 | `test_rpcserver.cc`: bind the path strings without copying | | 1685355 | `test_Metrics.cc`: move the pointer vector into the aliasing check instead of copying | | 1644209 | `test_PluginFactory.cc`: move instead of copy the plugin name in its last use | | 1644222 | `test_XPACK.cc`: annotate the dynamic-table stress test's `rand()` with the project's existing `// coverity[dont_call]` idiom | | 1644287 | `InkAPITest.cc`: drop the dead null check in `synserver_vc_accept` (the pointer is already dereferenced by the preceding `TSAssert`) | | 1022106 | `InkAPITest.cc`: drop the dead null check on the append string | | 1022101 | `InkAPITest.cc`: narrow the umask across `mkstemp` for the `TSfopen` scratch file | ### One thing worth a reviewer's attention The umask change (CID 1022101) mutates **process-wide** state inside a running `traffic_server`. The window is two calls around `mkstemp`, the effect is one-directional (stricter, never looser), and POSIX already requires `mkstemp` to create with `0600`, so it is belt-and-braces for the checker. Regression tests also only run on explicit invocation. If that trade is unwanted, the race-free alternative is `fchmod(fd, S_IRUSR | S_IWUSR)` after `mkstemp`, which may not clear the checker; dropping the commit entirely is also reasonable. ### Verification `test_records`, `test_tsutil`, `test_proxy_hdrs`, `test_proxy_hdrs_xpack`, `test_cache`, `test_hostdb`, `test_tscore`, `test_tsconfig` — 321 tests, all passing. Every touched file compiles independently on this branch. -- 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]
