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

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