* [PATCH v2] tests/qemu-iotests/149: Use more inclusive language in this test
@ 2023-11-13 16:56 Thomas Huth
2023-11-13 17:00 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2023-11-13 16:56 UTC (permalink / raw)
To: Hanna Reitz, Kevin Wolf, qemu-block, qemu-devel; +Cc: Paolo Bonzini
Let's use 'unsupported_configs' and 'tested_configs' here instead
of non-inclusive words.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
v2: Use different wordings (suggested by Paolo)
tests/qemu-iotests/149 | 16 +++++++++-------
tests/qemu-iotests/149.out | 8 ++++----
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149
index 2ae318f16f..2a8bb5787f 100755
--- a/tests/qemu-iotests/149
+++ b/tests/qemu-iotests/149
@@ -518,7 +518,7 @@ configs = [
]
-blacklist = [
+unsupported_configs = [
# 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,19 @@ blacklist = [
"twofish-192-xts-plain64-sha1",
]
-whitelist = []
+# Optionally test only the configurations in the LUKS_CONFIG
+# environment variable
+tested_configs = None
if "LUKS_CONFIG" in os.environ:
- whitelist = os.environ["LUKS_CONFIG"].split(",")
+ tested_configs = 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 unsupported_configs:
+ iotests.log("Skipping %s (cipher not supported)" % config.name)
continue
- if len(whitelist) > 0 and config.name not in whitelist:
- iotests.log("Skipping %s not in whitelist" % config.name)
+ if tested_configs is not None and config.name not in tested_configs:
+ iotests.log("Skipping %s (not in LUKS_CONFIG)" % config.name)
continue
test_once(config, qemu_img=False)
diff --git a/tests/qemu-iotests/149.out b/tests/qemu-iotests/149.out
index 2cc5b82f7c..3c731bdf95 100644
--- a/tests/qemu-iotests/149.out
+++ b/tests/qemu-iotests/149.out
@@ -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 (cipher not supported)
# ================= 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 (cipher not supported)
# ================= 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 (cipher not supported)
+Skipping cast6-192-xts-plain64-sha1 (cipher not supported)
# ================= dm-crypt aes-256-xts-plain64-sha224 =================
# Create image
truncate TEST_DIR/luks-aes-256-xts-plain64-sha224.img --size 4194304MB
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] tests/qemu-iotests/149: Use more inclusive language in this test
2023-11-13 16:56 [PATCH v2] tests/qemu-iotests/149: Use more inclusive language in this test Thomas Huth
@ 2023-11-13 17:00 ` Daniel P. Berrangé
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrangé @ 2023-11-13 17:00 UTC (permalink / raw)
To: Thomas Huth
Cc: Hanna Reitz, Kevin Wolf, qemu-block, qemu-devel, Paolo Bonzini
On Mon, Nov 13, 2023 at 05:56:42PM +0100, Thomas Huth wrote:
> Let's use 'unsupported_configs' and 'tested_configs' here instead
> of non-inclusive words.
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> v2: Use different wordings (suggested by Paolo)
>
> tests/qemu-iotests/149 | 16 +++++++++-------
> tests/qemu-iotests/149.out | 8 ++++----
> 2 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149
> index 2ae318f16f..2a8bb5787f 100755
> --- a/tests/qemu-iotests/149
> +++ b/tests/qemu-iotests/149
> @@ -518,7 +518,7 @@ configs = [
>
> ]
>
> -blacklist = [
> +unsupported_configs = [
> # 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,19 @@ blacklist = [
> "twofish-192-xts-plain64-sha1",
> ]
>
> -whitelist = []
> +# Optionally test only the configurations in the LUKS_CONFIG
> +# environment variable
> +tested_configs = None
> if "LUKS_CONFIG" in os.environ:
> - whitelist = os.environ["LUKS_CONFIG"].split(",")
> + tested_configs = 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 unsupported_configs:
> + iotests.log("Skipping %s (cipher not supported)" % config.name)
s/cipher/config/ - this is about more than just ciphers - it is the
combination of algorithms (cipher, hash, ivgen).
> continue
>
> - if len(whitelist) > 0 and config.name not in whitelist:
> - iotests.log("Skipping %s not in whitelist" % config.name)
> + if tested_configs is not None and config.name not in tested_configs:
> + iotests.log("Skipping %s (not in LUKS_CONFIG)" % config.name)
This is essentially at the demand of the person invoking it, so I'd
say
s/not in LUKS_CONFIG/by user request/
> continue
>
> test_once(config, qemu_img=False)
> diff --git a/tests/qemu-iotests/149.out b/tests/qemu-iotests/149.out
> index 2cc5b82f7c..3c731bdf95 100644
> --- a/tests/qemu-iotests/149.out
> +++ b/tests/qemu-iotests/149.out
> @@ -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 (cipher not supported)
> # ================= 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 (cipher not supported)
> # ================= 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 (cipher not supported)
> +Skipping cast6-192-xts-plain64-sha1 (cipher not supported)
> # ================= dm-crypt aes-256-xts-plain64-sha224 =================
> # Create image
> truncate TEST_DIR/luks-aes-256-xts-plain64-sha224.img --size 4194304MB
> --
> 2.41.0
>
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-13 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 16:56 [PATCH v2] tests/qemu-iotests/149: Use more inclusive language in this test Thomas Huth
2023-11-13 17:00 ` Daniel P. Berrangé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).