summaryrefslogtreecommitdiffstats
path: root/tests/debuginfod-subr.sh
Commit message (Collapse)AuthorAgeFilesLines
* Use grep -E instead of egrep, use grep -F instead of fgrep.Mark Wielaard2022-10-271-2/+2
| | | | | | | GNU grep 3.8 gives a deprecation warning when using egrep or fgrep. Just use grep -E and grep -F. Signed-off-by: Mark Wielaard <[email protected]>
* PR28661: debuginfo connection thread pool supportFrank Ch. Eigler2021-12-101-0/+10
| | | | | | | | | | | | Add an option -C, which activates libmicrohttpd's thread-pool mode for handling incoming http connections. Add libmicrohttpd error-logging callback function so as to receive indication of its internal errors, and relay counts to our metrics. Some of these internal errors tipped us off to a microhttpd bug that thread pooling works around. Document in debuginfod.8 page. Hand-tested against "ulimit -u NNN" shells, and with a less strenuous new test case. Signed-off-by: Frank Ch. Eigler <[email protected]>
* tests: Don't fail run-debuginfod-fd-prefetch-caches.sh if grep -c failsMark Wielaard2021-09-091-0/+7
| | | | | | | | | | | | | | The set -o errtrace made run-debuginfod-fd-prefetch-caches.sh fail. On some systems. Add set -o functrace to make it fail consistently. The failure is because the grep -c for in the log file fails (it returns zero). Fix this by using || true. But this is only a workaround. It makes the test pass, but only because all values are always zero. The test doesn't currently test anything. Also make sure that err and cleanup are only executed once. Signed-off-by: Mark Wielaard <[email protected]>
* tests: Cleanup error handling and don't share cache between servers/clientMark Wielaard2021-09-091-5/+9
| | | | | | | | | | | | | There were still three tests that shared a cache between the servers and client that queried those servers. Give them all separate caches. Also the error handler for debuginfod tests wasn't called when a command inside a function failed. Since testrun is a function, there would be no metrics or error log files listed if the testrun command failed. Making it hard to see what went wrong. Fix this by using set -o errtrace Signed-off-by: Mark Wielaard <[email protected]>
* tests: Print metrics for both ports on error and fix port selectionMark Wielaard2021-09-061-4/+4
| | | | | | | On error we would only print the metrics of one port (twice) because of a typo. Also PORT1 and PORT2 could be equal because of a logic error. Fix the typo and simplify the port selection by using non-overlapping ranges to select PORT1 and PORT2.
* debuginfod: Fracture tests/run-debuginfod-find.sh into specific testsNoah Sanci2021-09-031-0/+149
tests/run-debuginfod-find.sh was a massive test script with many broadly varying tests. This caused the test script to fail when any number of things went wrong and because of its intertwined nature, detecting the source of a failure could be difficult. The size of the test script also meant many unrelated tests were run making the testing process unnecessarily lengthy. This patch fractures tests/run-debuginfod-find.sh into smaller, more manageable individual test script files. This ensures that when failure occurs, a programmer can easily determine where their patch went wrong. It also allows programmers to specify exactly which tests to run, making testing more efficient. Redundancies are also reduced by placing code in tests/debuginfod-subr.sh. Signed-off-by: Noah Sanci <[email protected]>