tests/qemu-iotests/149: Use more inclusive language in this test
PATCH 1/1 tests/qemu-iotests/149: Use more inclusive language in this test
Let's use 'allowlist' and 'ignorelist' here instead of problematic words.
--- tests/qemu-iotests/149 | 14 +++++++------- tests/qemu-iotests/149.out | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-)
tests/qemu-iotests/149 +7 -7
@@ -518,7 +518,7 @@ configs = [ ] -blacklist = [ +ignorelist = [ # We don't have a cast-6 cipher impl for QEMU yet "cast6-256-xts-plain64-sha1", "cast6-128-xts-plain64-sha1",
@@ -528,17 +528,17 @@ blacklist = [ "twofish-192-xts-plain64-sha1", ] -whitelist = [] +allowlist = [] if "LUKS_CONFIG" in os.environ: - whitelist = os.environ["LUKS_CONFIG"].split(",") + allowlist = os.environ["LUKS_CONFIG"].split(",") for config in configs: - if config.name in blacklist: - iotests.log("Skipping %s in blacklist" % config.name) + if config.name in ignorelist: + iotests.log("Skipping %s in ignorelist" % config.name) continue - if len(whitelist) > 0 and config.name not in whitelist: - iotests.log("Skipping %s not in whitelist" % config.name) + if len(allowlist) > 0 and config.name not in allowlist: + iotests.log("Skipping %s not in allowlist" % config.name) continue test_once(config, qemu_img=False)
tests/qemu-iotests/149.out +4 -4
@@ -470,7 +470,7 @@ sudo cryptsetup -q -v luksClose qiotest-145-cast5-128-cbc-plain64-sha1 # Delete image unlink TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img -Skipping cast6-256-xts-plain64-sha1 in blacklist +Skipping cast6-256-xts-plain64-sha1 in ignorelist # ================= dm-crypt aes-256-cbc-plain-sha1 ================= # Create image truncate TEST_DIR/luks-aes-256-cbc-plain-sha1.img --size 4194304MB
@@ -1297,7 +1297,7 @@ sudo cryptsetup -q -v luksClose qiotest-145-twofish-128-xts-plain64-sha1 # Delete image unlink TEST_DIR/luks-twofish-128-xts-plain64-sha1.img -Skipping twofish-192-xts-plain64-sha1 in blacklist +Skipping twofish-192-xts-plain64-sha1 in ignorelist # ================= dm-crypt serpent-128-xts-plain64-sha1 ================= # Create image truncate TEST_DIR/luks-serpent-128-xts-plain64-sha1.img --size 4194304MB
@@ -1534,8 +1534,8 @@ sudo cryptsetup -q -v luksClose qiotest-145-serpent-192-xts-plain64-sha1 # Delete image unlink TEST_DIR/luks-serpent-192-xts-plain64-sha1.img -Skipping cast6-128-xts-plain64-sha1 in blacklist -Skipping cast6-192-xts-plain64-sha1 in blacklist +Skipping cast6-128-xts-plain64-sha1 in ignorelist +Skipping cast6-192-xts-plain64-sha1 in ignorelist # ================= dm-crypt aes-256-xts-plain64-sha224 ================= # Create image truncate TEST_DIR/luks-aes-256-xts-plain64-sha224.img --size 4194304MB
Signature · 1 line
2.41.0
Quoted 14 lines · Thomas Huth
Let's use 'allowlist' and 'ignorelist' here instead of problematic words.
Signed-off-by Thomas Huth <[email protected]>--- tests/qemu-iotests/149 | 14 +++++++------- tests/qemu-iotests/149.out | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-)tests/qemu-iotests/149 +0
-0
tests/qemu-iotests/149 configs = [ · line 521
Quoted 5 lines
tests/qemu-iotests/149 +1
-1@@ -518,7 +518,7 @@ configs = [ ] -blacklist = [ +ignorelist = [
unsupported_configs
tests/qemu-iotests/149 blacklist = [ · line 533
Quoted 12 lines
tests/qemu-iotests/149 +2
-2# We don't have a cast-6 cipher impl for QEMU yet "cast6-256-xts-plain64-sha1", "cast6-128-xts-plain64-sha1",@@ -528,17 +528,17 @@ blacklist = [ "twofish-192-xts-plain64-sha1", ] -whitelist = [] +allowlist = [] if "LUKS_CONFIG" in os.environ: - whitelist = os.environ["LUKS_CONFIG"].split(",") + allowlist = os.environ["LUKS_CONFIG"].split(",")
tested_configs
While at it:
-whitelist = []
+# Optionally test only the configurations in the LUKS_CONFIG +# environment variable
+tested_configs = None
and below
-if len(whitelist) > 0 and config.name not in whitelist:
+if tested_configs is not None and config.name not in test_configs:
tests/qemu-iotests/149 blacklist = [ · line 537
Quoted 6 lines
tests/qemu-iotests/149 +2
-2for config in configs: - if config.name in blacklist: - iotests.log("Skipping %s in blacklist" % config.name) + if config.name in ignorelist: + iotests.log("Skipping %s in ignorelist" % config.name)
Skipping %s (cipher not supported)
Even better would be to change blacklist to a regular expression and make it just [ "^cast6-.*", "^twofish-.*" ], but I am not going to require that. :)
tests/qemu-iotests/149 blacklist = [ · line 541
Quoted 6 lines
tests/qemu-iotests/149 +2
-2continue - if len(whitelist) > 0 and config.name not in whitelist: - iotests.log("Skipping %s not in whitelist" % config.name) + if len(allowlist) > 0 and config.name not in allowlist: + iotests.log("Skipping %s not in allowlist" % config.name)
Skipping %s (not in LUKS_CONFIG)
Paolo