Skip to content

Commit

Permalink
Mark AVC check as expected when running AVC check test on localhost (#…
Browse files Browse the repository at this point in the history
…3328)

This is an unexpected consequence of checks being interpreted in 1.38:
tmt in TF runs a test, test runs another tmt which triggers an AVC
denial, on purpose, but thanks to all this happening on localhost, TF
tmt can notice the AVC denial, and report it as a failed check. Adding
`xfail` to prevent this.
  • Loading branch information
happz authored Oct 31, 2024
1 parent c1ac0ad commit add8fcf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plans/provision/connect.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ provision:
# key: /home/psss/.ssh/devel_rsa
# user: root
# password: secret

context+:
provision_how: connect
3 changes: 3 additions & 0 deletions plans/provision/container.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ prepare+:
summary: Fetch dnf cache to speed up the test execution
script: prepare/podman-images.sh

context+:
provision_how: container

environment:
PROVISION_HOW: container

Expand Down
3 changes: 3 additions & 0 deletions plans/provision/local.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ discover:
how: fmf
filter: 'tag:provision-local'

context+:
provision_how: local

environment:
PROVISION_HOW: local

Expand Down
3 changes: 3 additions & 0 deletions plans/provision/virtual.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ prepare+:
virt-customize --add $image --run-command 'dnf --refresh install -y beakerlib'
done

context+:
provision_how: virtual

environment:
PROVISION_HOW: virtual

Expand Down
6 changes: 6 additions & 0 deletions tests/test/check/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ tier: 2
- provision-local
- provision-virtual

adjust+:
- when: provision_how == local
check:
- how: avc
result: xfail

/watchdog:
test: ./test-watchdog.sh
duration: 15m
Expand Down

0 comments on commit add8fcf

Please sign in to comment.