debian-forge/test
Thomas Lavocat da11ef4eb0 loop: use LOOP_CONFIGURE instead of LOOP_SET_FD
LOOP_CONFIGURE allows to atomically configure the decive when opening
it. This avoid the possibility of a race condition where between set_fd
and set_status some operations are already accepted by the loopback
device. See https://lwn.net/Articles/820408/

This feature was included in the linux kernel 5.8 however it is safe to
not include any kind of fallback to the previous method as @obudai
points out that:

LOOP_CONFIGURE was backported into RHEL 8 kernel in RHEL 8.4 as a part
of https://bugzilla.redhat.com/show_bug.cgi?id=1881760 (block layer:
update to upstream v5.8).

Since RHEL 8.4 is currently the oldest supported release that we support
running osbuild on, it might be just fine implementing this without the
fallback.

From a centos stream 8 container:
kernel-4.18.0-448.el8.x86_64
- loop: Fix missing discard support when using LOOP_CONFIGURE (Ming Lei) [1997338]
- [block] loop: Set correct device size when using LOOP_CONFIGURE (Ming Lei) [1881760]
- [block] loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE (Ming Lei) [1881760]
- [block] loop: Add LOOP_CONFIGURE ioctl (Ming Lei) [1881760]
2023-05-05 15:42:47 +02:00
..
cases test/ostree-image: +fedora-ostree-native-container 2022-12-15 11:13:19 +01:00
data stages/yum.repo: add sslverify field 2023-05-03 20:53:52 +02:00
mod Test: some tests depending on rpm-ostree were not checking its presence 2023-04-28 22:02:35 +02:00
run loop: use LOOP_CONFIGURE instead of LOOP_SET_FD 2023-05-05 15:42:47 +02:00
src test/src: improve file enumeration 2022-09-23 12:08:10 +02:00
.gitignore introduce testing script 2019-07-09 10:29:48 +02:00
__init__.py osbuild: add description() methods 2019-08-07 10:01:17 +02:00
conftest.py Test: add ability to skip tests for unsupported file-systems 2023-04-21 17:13:10 +02:00
initrd.py test: explicit encodings for open() 2022-09-09 15:33:29 +02:00
test.py Test: add ability to skip tests for unsupported file-systems 2023-04-21 17:13:10 +02:00