Improve tests/g-file-info-filesystem-readonly, and run it in CI.
Per #1590 (closed), if you have bindfs
and fusermount
installed, then (typically) this test runs successfully once (despite it launching subcommands which fail), then fails for subsequent runs until you manually clean up the mounts. This was not caught in CI because the build environments don't have bindfs or fuse installed.
The fix is fourfold:
- Add those packages to the image. I believe the image referenced in .gitlab-ci.yml is built from .gitlab-ci/Dockerfile, but I'm not sure, and even if so I'm not sure whether this MR will run against a Docker image built from this MR.
- Make the test fail if its subcommands fail.
- Unmount the bindfses lazily. In practice the reason the subcommands fail (on my system) is that the mount is busy when the test tries to unmount it. Nothing's actually using it, and
sleep(.1)
also works around the problem, but I think a lazy unmount is cleaner. - Remove a part of the test that masked this test bug.
Fixes #1590 (closed).