Skip to content

Commit b6de808

Browse files
kolyshkinpcmoore
authored andcommitted
TestFilterAttributeGettersAndSetters: fixup
Commit 23edf06 moved the SetBadArchAction(ActInvalid) check to the end of TestFilterAttributeGettersAndSetters. A few subsequent commits added more code before it, until finally commit 541420d added a conditional t.Skipf before it. As a result, this check is not performed with latest libseccomp. Move it back to where it belongs (before the API/version checks). Signed-off-by: Kir Kolyshkin <[email protected]> Acked-by: Tom Hromatka <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent 44257c3 commit b6de808

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

seccomp_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,11 @@ func TestFilterAttributeGettersAndSetters(t *testing.T) {
427427
t.Errorf("Bad arch action was not set correctly!")
428428
}
429429

430+
err = filter.SetBadArchAction(ActInvalid)
431+
if err == nil {
432+
t.Errorf("Setting bad arch action to an invalid action should error")
433+
}
434+
430435
err = filter.SetNoNewPrivsBit(false)
431436
if err != nil {
432437
t.Errorf("Error setting no new privileges bit")
@@ -502,11 +507,6 @@ func TestFilterAttributeGettersAndSetters(t *testing.T) {
502507
} else if ssb != true {
503508
t.Errorf("SSB bit was not set correctly")
504509
}
505-
506-
err = filter.SetBadArchAction(ActInvalid)
507-
if err == nil {
508-
t.Errorf("Setting bad arch action to an invalid action should error")
509-
}
510510
}
511511

512512
func TestMergeFilters(t *testing.T) {

0 commit comments

Comments
 (0)