Skip to contentSkip to conversation

allow files: Pass branch-specific allow file last to sg-report-flight

PATCH New Ian Jackson 1 participant 3 messages Mar 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 allow files: Pass branch-specific allow file last to sg-report-flight

We are going to make it possible for a branch-specific allow file to override general allow information from allow.all.

No functional change yet.

---
 cri-args-hostlists |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cri-args-hostlists +1 -1
index 57958d3..2ee0b7b 100644
@@ -112,7 +112,7 @@ start_email () {
 	  ./sg-report-job-history --html-dir=$job_html_dir --flight=$flight
 
 	./sg-report-flight --html-dir=$flight_html_dir/$flight/ \
-		--allow=allow.$branch --allow=allow.all \
+		--allow=allow.all --allow=allow.$branch \
 		$sgr_args $flight
 }
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/3 allow files: Support negation syntax

We now support !<pattern>, which undoes the effect of a <pattern> specified previously (perhaps in another file).

Note that the logic is a bit poor: !... only undoes the effect of an identical (or equivalent) earlier pattern; it doesn't provide a specific override.

Improving that would involve a more invasive change to sg-report-flight which I don't want to do right now.

---
 sg-report-flight |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
sg-report-flight +9 -2
index 062107a..7d804fa 100755
@@ -76,13 +76,20 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
                 next unless m/\S/;
                 next if m/^\#/;
                 s/\s+/ /g;
+		my $remove = s/^!\s*//;
                 die if m/ /g > 1;
                 $_ .= ' @@' unless m/ /;
                 s/\@\@/ '[^ ]*' /ge;
                 s/\@/ '[^ -\/]*' /ge;
                 $_= '^(?:'.$_.')$';
-                print DEBUG "ALLOW $_\n";
-                push @allows, $_;
+		my $entry = $_;
+                if (!$remove) {
+		    print DEBUG "ALLOW $entry\n";
+		    push @allows, $entry;
+		} else {
+		    print DEBUG "DEWALLOW $entry\n";
+		    @allows = grep { $_ ne $entry } @allows;
+		}
             }
             A->error and die "$allowfile $!";
             close A or die "$allowfile $!";
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/3 allow files: Allow all libvirt test failures on other branches

In reply to Ian Jackson

We have a problem where virtd crashes, and this is causing problems for other branches. So ignore libvirt test failures.

Use the new ability to override allowances to cause libvirt failures to still block libvirt pushes.

---
 allow.all     |    2 +-
 allow.libvirt |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 allow.libvirt
allow.all +1 -1
index fd2aa25..aab5721 100644
@@ -2,4 +2,4 @@ test-@@-sedf@@
 build-@@                        logs-capture@@
 test-@@-pcipt@@
 test-@@-qemuu-@@		guest-localmigrate
-test-@@-libvirt@@		guest-start
+test-@@-libvirt@@
allow.libvirt new file +1 -0
new file mode 100644
index 0000000..abc7669
@@ -0,0 +1 @@
+!test-@@-libvirt@@
Signature · 1 line
1.7.10.4