### Summary

When I run the unit test suite in ansible-core from the devel branch on Github (94c910), a single test fails in the `test/units/module_utils/basic/test_filesystem.py` module: `TestOtherFilesystem.test_module_utils_basic_ansible_module_set_directory_attributes_if_different`
```
    def _check_rc(rc):
        if rc < 0:
            errno = get_errno()
>           raise OSError(errno, os.strerror(errno))
E           FileNotFoundError: [Errno 2] No such file or directory

lib/ansible/module_utils/compat/selinux.py:23: FileNotFoundError
```

### Issue Type

Bug Report

### Component Name

selinux

### Ansible Version

```console
$ ansible --version

ansible [core 2.14.0.dev0] (devel 94c9106153) last updated 2022/04/15 15:03:57 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/rdiscala/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/rdiscala/src/ansible/lib/ansible
  ansible collection location = /home/rdiscala/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/rdiscala/src/ansible/bin/ansible
  python version = 3.10.0 (default, Oct  4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
  jinja version = 3.1.1
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed

<< NO OUTPUT >>
```


### OS / Environment

$ cat /etc/redhat-release 
Fedora release 35 (Thirty Five)

### Steps to Reproduce

$ ansible-test units --venv --python 3.10

<< OR>>

$ pytest -r a --cov=. --cov-report=html --fulltrace --color yes test/units/module_utils/basic/test_filesystem.py

### Expected Results

All tests pass

### Actual Results

```console
===================================================================== test session starts =====================================================================
platform linux -- Python 3.10.0, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
rootdir: /home/rdiscala/src/ansible
plugins: forked-1.4.0, xdist-1.34.0, mock-3.2.0, cov-3.0.0
collected 5 items                                                                                                                                             

test/units/module_utils/basic/test_filesystem.py .F...                                                                                                  [100%]

========================================================================== FAILURES ===========================================================================
______________________________ TestOtherFilesystem.test_module_utils_basic_ansible_module_set_directory_attributes_if_different _______________________________

self = <ansible.module_utils.basic.AnsibleModule object at 0x7fcabf50b0d0>, path = '/path/to/file'

    def selinux_context(self, path):
        context = self.selinux_initial_context()
        if not self.selinux_enabled():
            return context
        try:
>           ret = selinux.lgetfilecon_raw(to_native(path, errors='surrogate_or_strict'))

lib/ansible/module_utils/basic.py:687: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

path = '/path/to/file'

    def lgetfilecon_raw(path):
        con = c_char_p()
        try:
>           rc = _selinux_lib.lgetfilecon_raw(path, byref(con))

lib/ansible/module_utils/compat/selinux.py:95: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

rc = -1

    def _check_rc(rc):
        if rc < 0:
            errno = get_errno()
>           raise OSError(errno, os.strerror(errno))
E           FileNotFoundError: [Errno 2] No such file or directory

lib/ansible/module_utils/compat/selinux.py:23: FileNotFoundError

During handling of the above exception, another exception occurred:

self = <unittest.case._Outcome object at 0x7fcabf509810>
test_case = <units.module_utils.basic.test_filesystem.TestOtherFilesystem testMethod=test_module_utils_basic_ansible_module_set_directory_attributes_if_different>
isTest = True

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, isTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

/usr/lib64/python3.10/unittest/case.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <units.module_utils.basic.test_filesystem.TestOtherFilesystem testMethod=test_module_utils_basic_ansible_module_set_directory_attributes_if_different>
result = <TestCaseFunction test_module_utils_basic_ansible_module_set_directory_attributes_if_different>

    def run(self, result=None):
        if result is None:
            result = self.defaultTestResult()
            startTestRun = getattr(result, 'startTestRun', None)
            stopTestRun = getattr(result, 'stopTestRun', None)
            if startTestRun is not None:
                startTestRun()
        else:
            stopTestRun = None
    
        result.startTest(self)
        try:
            testMethod = getattr(self, self._testMethodName)
            if (getattr(self.__class__, "__unittest_skip__", False) or
                getattr(testMethod, "__unittest_skip__", False)):
                # If the class or method was skipped.
                skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
                            or getattr(testMethod, '__unittest_skip_why__', ''))
                self._addSkip(result, self, skip_why)
                return result
    
            expecting_failure = (
                getattr(self, "__unittest_expecting_failure__", False) or
                getattr(testMethod, "__unittest_expecting_failure__", False)
            )
            outcome = _Outcome(result)
            try:
                self._outcome = outcome
    
                with outcome.testPartExecutor(self):
                    self._callSetUp()
                if outcome.success:
                    outcome.expecting_failure = expecting_failure
                    with outcome.testPartExecutor(self, isTest=True):
>                       self._callTestMethod(testMethod)

/usr/lib64/python3.10/unittest/case.py:591: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <units.module_utils.basic.test_filesystem.TestOtherFilesystem testMethod=test_module_utils_basic_ansible_module_set_directory_attributes_if_different>
method = <bound method TestOtherFilesystem.test_module_utils_basic_ansible_module_set_directory_attributes_if_different of <uni...ilesystem.TestOtherFilesystem testMethod=test_module_utils_basic_ansible_module_set_directory_attributes_if_different>>

    def _callTestMethod(self, method):
>       method()

/usr/lib64/python3.10/unittest/case.py:549: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <units.module_utils.basic.test_filesystem.TestOtherFilesystem testMethod=test_module_utils_basic_ansible_module_set_directory_attributes_if_different>

    def test_module_utils_basic_ansible_module_set_directory_attributes_if_different(self):
        from ansible.module_utils import basic
        basic._ANSIBLE_ARGS = None
    
        am = basic.AnsibleModule(
            argument_spec=dict(),
        )
    
        file_args = {
            'path': '/path/to/file',
            'mode': None,
            'owner': None,
            'group': None,
            'seuser': None,
            'serole': None,
            'setype': None,
            'selevel': None,
            'secontext': [None, None, None],
            'attributes': None,
        }
    
>       self.assertEqual(am.set_directory_attributes_if_different(file_args, True), True)

test/units/module_utils/basic/test_filesystem.py:159: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ansible.module_utils.basic.AnsibleModule object at 0x7fcabf50b0d0>, file_args = {'attributes': None, 'group': None, 'mode': None, 'owner': None, ...}
changed = True, diff = None, expand = True

    def set_directory_attributes_if_different(self, file_args, changed, diff=None, expand=True):
>       return self.set_fs_attributes_if_different(file_args, changed, diff, expand)

lib/ansible/module_utils/basic.py:1184: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ansible.module_utils.basic.AnsibleModule object at 0x7fcabf50b0d0>, file_args = {'attributes': None, 'group': None, 'mode': None, 'owner': None, ...}
changed = True, diff = None, expand = True

    def set_fs_attributes_if_different(self, file_args, changed, diff=None, expand=True):
        # set modes owners and context as needed
>       changed = self.set_context_if_different(
            file_args['path'], file_args['secontext'], changed, diff
        )

lib/ansible/module_utils/basic.py:1163: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ansible.module_utils.basic.AnsibleModule object at 0x7fcabf50b0d0>, path = '/path/to/file', context = [None, None, None], changed = True, diff = None

    def set_context_if_different(self, path, context, changed, diff=None):
    
        if not self.selinux_enabled():
            return changed
    
        if self.check_file_absent_if_check_mode(path):
            return True
    
>       cur_context = self.selinux_context(path)

lib/ansible/module_utils/basic.py:761: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ansible.module_utils.basic.AnsibleModule object at 0x7fcabf50b0d0>, path = '/path/to/file'

    def selinux_context(self, path):
        context = self.selinux_initial_context()
        if not self.selinux_enabled():
            return context
        try:
            ret = selinux.lgetfilecon_raw(to_native(path, errors='surrogate_or_strict'))
        except OSError as e:
            if e.errno == errno.ENOENT:
>               self.fail_json(path=path, msg='path %s does not exist' % path)

lib/ansible/module_utils/basic.py:690: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ansible.module_utils.basic.AnsibleModule object at 0x7fcabf50b0d0>, msg = 'path /path/to/file does not exist'
kwargs = {'failed': True, 'invocation': {'module_args': {}}, 'msg': 'path /path/to/file does not exist', 'path': '/path/to/file'}

    def fail_json(self, msg, **kwargs):
        ''' return from the module, with an error message '''
    
        kwargs['failed'] = True
        kwargs['msg'] = msg
    
        # Add traceback if debug or high verbosity and it is missing
        # NOTE: Badly named as exception, it really always has been a traceback
        if 'exception' not in kwargs and sys.exc_info()[2] and (self._debug or self._verbosity >= 3):
            if PY2:
                # On Python 2 this is the last (stack frame) exception and as such may be unrelated to the failure
                kwargs['exception'] = 'WARNING: The below traceback may *not* be related to the actual failure.\n' +\
                                      ''.join(traceback.format_tb(sys.exc_info()[2]))
            else:
                kwargs['exception'] = ''.join(traceback.format_tb(sys.exc_info()[2]))
    
        self.do_cleanup_files()
        self._return_formatted(kwargs)
>       sys.exit(1)
E       SystemExit: 1

lib/ansible/module_utils/basic.py:1533: SystemExit
-------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------

{"path": "/path/to/file", "failed": true, "msg": "path /path/to/file does not exist", "invocation": {"module_args": {}}}
=================================================================== short test summary info ===================================================================
FAILED test/units/module_utils/basic/test_filesystem.py::TestOtherFilesystem::test_module_utils_basic_ansible_module_set_directory_attributes_if_different
================================================================= 1 failed, 4 passed in 0.19s =================================================================
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
from ansible.module_utils import basic
        basic._ANSIBLE_ARGS = None
        am = basic.AnsibleModule(
            argument_spec=dict(),
        )
        file_args = {
            'path': '/path/to/file',
            'mode': None,
            'owner': None,
            'group': None,
            'seuser': None,
            'serole': None,
            'setype': None,
            'selevel': None,
            'secontext': [None, None, None],
            'attributes': None,
        }
        self.assertEqual(am.set_directory_attributes_if_different(file_args, True), True)
        self.assertEqual(am.set_directory_attributes_if_different(file_args, False), False)