New GitHub issue #110672 from vstinner:<br>

<hr>

<pre>
Test code:

```py
    def test_listmounts(self):
        for volume in os.listvolumes():
            try:
                mounts = os.listmounts(volume)
            except OSError as ex:
 if support.verbose:
                    print("Skipping", volume, "because of", ex)
            else:
 self.assertIsInstance(mounts, list)
 self.assertSetEqual(
                    set(mounts),
 self.known_mounts & set(mounts),
                )
```

AMD64 Windows11 Bigmem 3.x:

```
test_listmounts (test.test_os.Win32ListdriveTests.test_listmounts) ... FAIL

Stdout:
Skipping \\?\Volume{aa17e342-b529-11ed-8ce4-00155d016f00}\ because of [WinError 2] The system cannot find the file specified
Skipping \\?\Volume{235c93e8-64a0-11ee-8d04-00155d016f00}\ because of [WinError 2] The system cannot find the file specified

test_listvolumes (test.test_os.Win32ListdriveTests.test_listvolumes) ... ok
(...)

======================================================================
FAIL: test_listmounts (test.test_os.Win32ListdriveTests.test_listmounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\buildarea\3.x.ambv-bb-win11.bigmem\build\Lib\test\test_os.py", line 2713, in test_listmounts
    self.assertSetEqual(
AssertionError: Items in the first set but not the second:
'R:\\'

Stdout:
Skipping \\?\Volume{aa17e342-b529-11ed-8ce4-00155d016f00}\ because of [WinError 2] The system cannot find the file specified
Skipping \\?\Volume{235c93e8-64a0-11ee-8d04-00155d016f00}\ because of [WinError 2] The system cannot find the file specified

----------------------------------------------------------------------
Ran 220 tests in 7.734s

FAILED (failures=1, skipped=131)
test test_os failed
```

build: https://buildbot.python.org/all/#/builders/1079/builds/2483
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/110672">View on GitHub</a>
<p>Labels: tests</p>
<p>Assignee: </p>