Blame SOURCES/0018-devices-file-don-t-write-in-test-mode.patch

b6fb8c
From 04770589b49effdb064c9b3790e8dd2fee2c3547 Mon Sep 17 00:00:00 2001
b6fb8c
From: David Teigland <teigland@redhat.com>
b6fb8c
Date: Wed, 1 Dec 2021 10:08:08 -0600
38b7b2
Subject: [PATCH 18/54] devices file: don't write in test mode
b6fb8c
b6fb8c
---
b6fb8c
 lib/device/device_id.c | 3 +++
b6fb8c
 1 file changed, 3 insertions(+)
b6fb8c
b6fb8c
diff --git a/lib/device/device_id.c b/lib/device/device_id.c
b6fb8c
index ce7ded154..4c2b5a3dd 100644
b6fb8c
--- a/lib/device/device_id.c
b6fb8c
+++ b/lib/device/device_id.c
b6fb8c
@@ -673,6 +673,9 @@ int device_ids_write(struct cmd_context *cmd)
b6fb8c
 		cmd->enable_devices_file = 1;
b6fb8c
 	}
b6fb8c
 
b6fb8c
+	if (test_mode())
b6fb8c
+		return 1;
b6fb8c
+
b6fb8c
 	if (_devices_file_version[0]) {
b6fb8c
 		if (sscanf(_devices_file_version, "%u.%u.%u", &df_major, &df_minor, &df_counter) != 3) {
b6fb8c
 			/* don't update a file we can't parse */
b6fb8c
-- 
38b7b2
2.34.3
b6fb8c