public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [debuginfod] Minor run-debuginfod-find.sh test fixes
@ 2021-07-21 19:06 Noah Sanci
  2021-07-21 19:26 ` Noah Sanci
  0 siblings, 1 reply; 3+ messages in thread
From: Noah Sanci @ 2021-07-21 19:06 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 68 bytes --]

Hello,

Here are some small fixes for run-debuginfod-find.sh.

Noah

[-- Attachment #2: 0001-debuginfod-Minor-run-debuginfod-find.sh-test-fixes.patch --]
[-- Type: text/x-patch, Size: 1714 bytes --]

From 0d9c3adf48626d03ea34f03e7bc5f3f9513e64fe Mon Sep 17 00:00:00 2001
From: Noah Sanci <nsanci@redhat.com>
Date: Wed, 21 Jul 2021 14:52:07 -0400
Subject: [PATCH] debuginfod: Minor run-debuginfod-find.sh test fixes

$PORT3 was left open on error and $PID4 was not properly killed. This
patch addresses both of those issues by closing $PORT3 as $PORT1 and
$PORT2 were in err() and waiting for $PID4 to terminate before
continuing with the test.

Signed-off-by: Noah Sanci <nsanci@redhat.com>
---
 tests/ChangeLog              | 5 +++++
 tests/run-debuginfod-find.sh | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 1196d6b2..597e9dbe 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-21  Noah Sanci <nsanci@redhat.com>
+
+	* run-debuginfod-find.sh: Properly kill $PID4 by waiting for it to
+	finish. Close $PORT3 in err().
+
 2021-06-28  Noah Sanci <nsanci@redhat.com>
 
 	PR25978
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 1d664be9..b65f3580 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -54,7 +54,7 @@ trap cleanup 0 1 2 3 5 9 15
 errfiles_list=
 err() {
     echo ERROR REPORTS
-    for ports in $PORT1 $PORT2
+    for ports in $PORT1 $PORT2 $PORT3
     do
         echo ERROR REPORT $port metrics
         curl -s http://127.0.0.1:$port/metrics
@@ -754,6 +754,8 @@ wait_ready $PORT3 'groom{statistic="files scanned (#)"}' 0
 wait_ready $PORT3 'groom{statistic="files scanned (mb)"}' 0
 
 kill $PID4
+wait $PID4
+PID4=0
 
 ########################################################################
 # set up tests for retrying failed queries.
-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [debuginfod] Minor run-debuginfod-find.sh test fixes
  2021-07-21 19:06 [debuginfod] Minor run-debuginfod-find.sh test fixes Noah Sanci
@ 2021-07-21 19:26 ` Noah Sanci
  2021-07-22 12:02   ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Noah Sanci @ 2021-07-21 19:26 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

Updated ChangeLog


On Wed, Jul 21, 2021 at 3:06 PM Noah Sanci <nsanci@redhat.com> wrote:
>
> Hello,
>
> Here are some small fixes for run-debuginfod-find.sh.
>
> Noah

[-- Attachment #2: 0001-debuginfod-Minor-run-debuginfod-find.sh-test-fixes.patch --]
[-- Type: text/x-patch, Size: 1755 bytes --]

From 494db032911889c404c59391031554377fa9ee55 Mon Sep 17 00:00:00 2001
From: Noah Sanci <nsanci@redhat.com>
Date: Wed, 21 Jul 2021 14:52:07 -0400
Subject: [PATCH] debuginfod: Minor run-debuginfod-find.sh test fixes

$PORT3's metrics are not reported on error and $PID4 was not properly
killed. This patch addresses both of those issues by reporting the
metrics of $PORT3 as $PORT1 and $PORT2 were in err() and waiting for
$PID4 to terminate before continuing with the test.

Signed-off-by: Noah Sanci <nsanci@redhat.com>
---
 tests/ChangeLog              | 5 +++++
 tests/run-debuginfod-find.sh | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 1196d6b2..51ae44eb 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-21  Noah Sanci <nsanci@redhat.com>
+
+	* run-debuginfod-find.sh: Properly kill $PID4 by waiting for it to
+	finish. Report $PORT3's metrics in err().
+
 2021-06-28  Noah Sanci <nsanci@redhat.com>
 
 	PR25978
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 1d664be9..b65f3580 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -54,7 +54,7 @@ trap cleanup 0 1 2 3 5 9 15
 errfiles_list=
 err() {
     echo ERROR REPORTS
-    for ports in $PORT1 $PORT2
+    for ports in $PORT1 $PORT2 $PORT3
     do
         echo ERROR REPORT $port metrics
         curl -s http://127.0.0.1:$port/metrics
@@ -754,6 +754,8 @@ wait_ready $PORT3 'groom{statistic="files scanned (#)"}' 0
 wait_ready $PORT3 'groom{statistic="files scanned (mb)"}' 0
 
 kill $PID4
+wait $PID4
+PID4=0
 
 ########################################################################
 # set up tests for retrying failed queries.
-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [debuginfod] Minor run-debuginfod-find.sh test fixes
  2021-07-21 19:26 ` Noah Sanci
@ 2021-07-22 12:02   ` Mark Wielaard
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2021-07-22 12:02 UTC (permalink / raw)
  To: Noah Sanci, elfutils-devel

Hi Noah,

On Wed, 2021-07-21 at 15:26 -0400, Noah Sanci via Elfutils-devel wrote:
> Updated ChangeLog
> On Wed, Jul 21, 2021 at 3:06 PM Noah Sanci <nsanci@redhat.com> wrote:
> > Here are some small fixes for run-debuginfod-find.sh.

Looks good. Pushed.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-22 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 19:06 [debuginfod] Minor run-debuginfod-find.sh test fixes Noah Sanci
2021-07-21 19:26 ` Noah Sanci
2021-07-22 12:02   ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).