Skip to content

Commit

Permalink
fmf: Don't disable SELinux message check globally
Browse files Browse the repository at this point in the history
It's useful to run cockpit-machines tests to gate changes to
selinux-policy. But we can only do that if we actually pay attention to
its messages.

The point of this is to not break cockpit-machines tests when they run
as gating for other packages in Fedora/RHEL. But let's rather do that in
the downstream dist-git test plan. We can inject an environment variable
there [1], so just pass it on from the top-level entry point browser.sh
to run-test.sh.

[1] https://tmt.readthedocs.io/en/latest/spec/tests.html#environment
  • Loading branch information
martinpitt committed Aug 2, 2023
1 parent fdd7616 commit a27153c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- fedora-development
- centos-stream-8
- centos-stream-9

- job: tests
trigger: pull_request
targets:
Expand Down
2 changes: 1 addition & 1 deletion test/browser/browser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if [ "$ID" = fedora ]; then
fi

# Run tests as unprivileged user
su - -c "env TEST_BROWSER=firefox SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh $PLAN" runtest
su - -c "env TEST_AUDIT_NO_SELINUX=${TEST_AUDIT_NO_SELINUX:-} TEST_BROWSER=firefox SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh $PLAN" runtest

RC=$(cat $LOGS/exitcode)
exit ${RC:-1}
2 changes: 0 additions & 2 deletions test/browser/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ if [ "${TEST_OS#centos-}" != "$TEST_OS" ]; then
TEST_OS="${TEST_OS}-stream"
fi

export TEST_AUDIT_NO_SELINUX=1

#
# exclude known-broken tests
#
Expand Down

0 comments on commit a27153c

Please sign in to comment.