--- ansible_core-2.15.12/test/units/module_utils/basic/test_selinux.py.orig +++ ansible_core-2.15.12/test/units/module_utils/basic/test_selinux.py @@ -37,6 +37,7 @@ # test AnsibleModule selinux wrapper methods @pytest.mark.usefixtures('no_args_module_exec') class TestSELinuxMU: + @pytest.mark.skip(reason="always fails: https://github.com/ansible/ansible/issues/80436") def test_selinux_enabled(self): # test selinux unavailable # selinux unavailable, should return false @@ -56,6 +57,7 @@ # ensure value is cached (same answer after unpatching) assert enabled_mod.selinux_enabled() is True + @pytest.mark.skip(reason="always fails: https://github.com/ansible/ansible/issues/80436") def test_selinux_mls_enabled(self): # selinux unavailable, should return false with patch.object(basic, 'HAVE_SELINUX', False): @@ -74,6 +76,7 @@ # selinux enabled with MLS is 4-element None assert no_args_module(selinux_enabled=True, selinux_mls_enabled=True).selinux_initial_context() == [None, None, None, None] + @pytest.mark.skip(reason="always fails: https://github.com/ansible/ansible/issues/80436") def test_selinux_default_context(self): # selinux unavailable with patch.object(basic, 'HAVE_SELINUX', False): @@ -92,6 +95,7 @@ with patch('ansible.module_utils.compat.selinux.matchpathcon', side_effect=OSError): assert am.selinux_default_context(path='/foo/bar') == [None, None, None, None] + @pytest.mark.skip(reason="always fails: https://github.com/ansible/ansible/issues/80436") def test_selinux_context(self): # selinux unavailable with patch.object(basic, 'HAVE_SELINUX', False): @@ -157,6 +161,7 @@ assert am.is_special_selinux_path('/some/path/that/should/be/nfs') == (True, ['foo_u', 'foo_r', 'foo_t', 's0']) assert am.is_special_selinux_path('/weird/random/fstype/path') == (True, ['foo_u', 'foo_r', 'foo_t', 's0']) + @pytest.mark.skip(reason="always fails: https://github.com/ansible/ansible/issues/80436") def test_set_context_if_different(self): am = no_args_module(selinux_enabled=False) assert am.set_context_if_different('/path/to/file', ['foo_u', 'foo_r', 'foo_t', 's0'], True) is True