develooper Front page | perl.perl5.changes | Postings from January 2019

[perl.git] branch tonyc/test-leak-check updated.v5.29.7-25-gbfdff84cae

From:
Tony Cook
Date:
January 28, 2019 06:04
Subject:
[perl.git] branch tonyc/test-leak-check updated.v5.29.7-25-gbfdff84cae
Message ID:
E1gnvBv-0002tg-B0@git.dc.perl.space
In perl.git, the branch tonyc/test-leak-check has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/bfdff84cae8372d46bafdf3d53fd0a0c0d9c951f?hp=f46dcf8df76018a0d650a8bd06170aa9f00325e4>

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 t/harness | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/harness b/t/harness
index 981ccd655e..b9aa3c649f 100644
--- a/t/harness
+++ b/t/harness
@@ -409,7 +409,6 @@ if ($leak_check) {
 exit $agg->has_errors ? 1 : 0;
 
 sub gather_ipcs {
-    my @lines = `ipcs`;
     my $hprefix;
     my $hsuffix;
     if ($^O eq 'linux') {
@@ -423,6 +422,7 @@ sub gather_ipcs {
     else {
         return;
     }
+    my @lines = `ipcs`;
     my $type = '';
     my %result =
       (
@@ -436,7 +436,7 @@ sub gather_ipcs {
         elsif (/^${hprefix}Shared Memory(?: Segments)?${hsuffix}$/) {
             $type = "shm";
         }
-        elsif (/^${hprefix}Semaphore(?: Arrays)?${hsuffix}$/) {
+        elsif (/^${hprefix}Semaphore(?: Array)?s${hsuffix}$/) {
             $type = "sem";
         }
         elsif (/^IPC status/ || /^\s*$/
@@ -447,7 +447,7 @@ sub gather_ipcs {
         }
         else {
             # id is secon on both linux and darwin
-            push @{$result{$type}}, (split / /)[1];
+            push @{$result{$type}}, (split ' ')[1];
         }
     }
 

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About