]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: Limit the number of concurrent requests in debuginfod-federation
authorMark Wielaard <mark@klomp.org>
Fri, 14 Apr 2023 16:10:48 +0000 (18:10 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 17 Apr 2023 12:17:53 +0000 (14:17 +0200)
It seems doing 100 parallel requests can crash some versions of
libmicrohttpd so limit the number a little to the number of processors
times 4, with a max of 64.

      * tests/run-debuginfod-federation-metrics.sh: Use nproc * 4, or 64
      for seq curl requests.
      * tests/run-debuginfod-federation-sqlite.sh: Likewise.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tests/run-debuginfod-federation-metrics.sh
tests/run-debuginfod-federation-sqlite.sh

index 3d7162466e532cb4dfd9f355de46875565aac388..0692e4fb6c958e2c5bbc2f0e7fdc9d11cfba0d78 100755 (executable)
@@ -191,7 +191,9 @@ curl -s http://127.0.0.1:$PORT2/metrics | grep 'dc_pool_op.*reuse'
 # Use a file that hasn't been previously extracted in to make it
 # likely that even this test debuginfod will experience concurrency
 # and impose some "after-you" delays.
-(for i in `seq 100`; do
+maxreq=$[$(nproc) * 4]
+maxreq=$(( $maxreq > 64 ? 64 : $maxreq ))
+(for i in `seq $maxreq`; do
     curl -s http://127.0.0.1:$PORT1/buildid/87c08d12c78174f1082b7c888b3238219b0eb265/executable >/dev/null &
  done;
  wait)
index d93215266d33d63401642e46b3c50189e637823e..6b090074da0def056dd66a5fa952e1887e5e5577 100755 (executable)
@@ -157,7 +157,9 @@ testrun ${abs_top_builddir}/debuginfod/debuginfod-find debuginfo $BUILDID
 # Use a file that hasn't been previously extracted in to make it
 # likely that even this test debuginfod will experience concurrency
 # and impose some "after-you" delays.
-(for i in `seq 100`; do
+maxreq=$[$(nproc) * 4]
+maxreq=$(( $maxreq > 64 ? 64 : $maxreq ))
+(for i in `seq $maxreq`; do
     curl -s http://127.0.0.1:$PORT1/buildid/87c08d12c78174f1082b7c888b3238219b0eb265/executable >/dev/null &
  done;
  wait)