* [PATCH] tests/qtest/qmp-cmd-test: Use inclusive language
@ 2020-09-12 7:49 Thomas Huth
2020-09-12 7:55 ` Philippe Mathieu-Daudé
2020-09-12 8:36 ` Paolo Bonzini
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Huth @ 2020-09-12 7:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Paolo Bonzini, philmd, Markus Armbruster
We simply want to ignore certain queries here, so let's rather
use the term 'ignore' to express this intention.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/qmp-cmd-test.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
index 3109a9fe96..18069a82fa 100644
--- a/tests/qtest/qmp-cmd-test.c
+++ b/tests/qtest/qmp-cmd-test.c
@@ -82,9 +82,9 @@ static void test_query(const void *data)
qtest_quit(qts);
}
-static bool query_is_blacklisted(const char *cmd)
+static bool ignore_query(const char *cmd)
{
- const char *blacklist[] = {
+ const char *ignorelist[] = {
/* Not actually queries: */
"add-fd",
/* Success depends on target arch: */
@@ -101,8 +101,8 @@ static bool query_is_blacklisted(const char *cmd)
};
int i;
- for (i = 0; blacklist[i]; i++) {
- if (!strcmp(cmd, blacklist[i])) {
+ for (i = 0; ignorelist[i]; i++) {
+ if (!strcmp(cmd, ignorelist[i])) {
return true;
}
}
@@ -179,7 +179,7 @@ static void add_query_tests(QmpSchema *schema)
continue;
}
- if (query_is_blacklisted(si->name)) {
+ if (ignore_query(si->name)) {
continue;
}
--
2.18.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/qtest/qmp-cmd-test: Use inclusive language
2020-09-12 7:49 [PATCH] tests/qtest/qmp-cmd-test: Use inclusive language Thomas Huth
@ 2020-09-12 7:55 ` Philippe Mathieu-Daudé
2020-09-12 8:36 ` Paolo Bonzini
1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-12 7:55 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: Laurent Vivier, Paolo Bonzini, Markus Armbruster
On 9/12/20 9:49 AM, Thomas Huth wrote:
> We simply want to ignore certain queries here, so let's rather
> use the term 'ignore' to express this intention.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> tests/qtest/qmp-cmd-test.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
> index 3109a9fe96..18069a82fa 100644
> --- a/tests/qtest/qmp-cmd-test.c
> +++ b/tests/qtest/qmp-cmd-test.c
> @@ -82,9 +82,9 @@ static void test_query(const void *data)
> qtest_quit(qts);
> }
>
> -static bool query_is_blacklisted(const char *cmd)
> +static bool ignore_query(const char *cmd)
> {
> - const char *blacklist[] = {
> + const char *ignorelist[] = {
> /* Not actually queries: */
> "add-fd",
> /* Success depends on target arch: */
> @@ -101,8 +101,8 @@ static bool query_is_blacklisted(const char *cmd)
> };
> int i;
>
> - for (i = 0; blacklist[i]; i++) {
> - if (!strcmp(cmd, blacklist[i])) {
> + for (i = 0; ignorelist[i]; i++) {
> + if (!strcmp(cmd, ignorelist[i])) {
> return true;
> }
> }
> @@ -179,7 +179,7 @@ static void add_query_tests(QmpSchema *schema)
> continue;
> }
>
> - if (query_is_blacklisted(si->name)) {
> + if (ignore_query(si->name)) {
> continue;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/qtest/qmp-cmd-test: Use inclusive language
2020-09-12 7:49 [PATCH] tests/qtest/qmp-cmd-test: Use inclusive language Thomas Huth
2020-09-12 7:55 ` Philippe Mathieu-Daudé
@ 2020-09-12 8:36 ` Paolo Bonzini
2020-09-14 7:20 ` Markus Armbruster
1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2020-09-12 8:36 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: Laurent Vivier, philmd, Markus Armbruster
On 12/09/20 09:49, Thomas Huth wrote:
> We simply want to ignore certain queries here, so let's rather
> use the term 'ignore' to express this intention.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/qtest/qmp-cmd-test.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
> index 3109a9fe96..18069a82fa 100644
> --- a/tests/qtest/qmp-cmd-test.c
> +++ b/tests/qtest/qmp-cmd-test.c
> @@ -82,9 +82,9 @@ static void test_query(const void *data)
> qtest_quit(qts);
> }
>
> -static bool query_is_blacklisted(const char *cmd)
> +static bool ignore_query(const char *cmd)
> {
> - const char *blacklist[] = {
> + const char *ignorelist[] = {
Just "ignored", it's obviously a list.
Paolo
> /* Not actually queries: */
> "add-fd",
> /* Success depends on target arch: */
> @@ -101,8 +101,8 @@ static bool query_is_blacklisted(const char *cmd)
> };
> int i;
>
> - for (i = 0; blacklist[i]; i++) {
> - if (!strcmp(cmd, blacklist[i])) {
> + for (i = 0; ignorelist[i]; i++) {
> + if (!strcmp(cmd, ignorelist[i])) {
> return true;
> }
> }
> @@ -179,7 +179,7 @@ static void add_query_tests(QmpSchema *schema)
> continue;
> }
>
> - if (query_is_blacklisted(si->name)) {
> + if (ignore_query(si->name)) {
> continue;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/qtest/qmp-cmd-test: Use inclusive language
2020-09-12 8:36 ` Paolo Bonzini
@ 2020-09-14 7:20 ` Markus Armbruster
0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2020-09-14 7:20 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Laurent Vivier, Thomas Huth, philmd, qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 12/09/20 09:49, Thomas Huth wrote:
>> We simply want to ignore certain queries here, so let's rather
>> use the term 'ignore' to express this intention.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> tests/qtest/qmp-cmd-test.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
>> index 3109a9fe96..18069a82fa 100644
>> --- a/tests/qtest/qmp-cmd-test.c
>> +++ b/tests/qtest/qmp-cmd-test.c
>> @@ -82,9 +82,9 @@ static void test_query(const void *data)
>> qtest_quit(qts);
>> }
>>
>> -static bool query_is_blacklisted(const char *cmd)
>> +static bool ignore_query(const char *cmd)
Okay, although I'd prefer query_is_ignored(), to signal "this is a
predicate", whereas ignore_query() suggests the function ignores
queries.
>> {
>> - const char *blacklist[] = {
>> + const char *ignorelist[] = {
>
> Just "ignored", it's obviously a list.
Yes, that's better.
"blacklist" contains "list" not because "list" is important, but because
it's an actual word that makes the variable's purpose immediately
obvious. "ignored" is an acceptable replacement, and is less clumsy
than "ignorelist".
>
> Paolo
>
>> /* Not actually queries: */
>> "add-fd",
>> /* Success depends on target arch: */
>> @@ -101,8 +101,8 @@ static bool query_is_blacklisted(const char *cmd)
>> };
>> int i;
>>
>> - for (i = 0; blacklist[i]; i++) {
>> - if (!strcmp(cmd, blacklist[i])) {
>> + for (i = 0; ignorelist[i]; i++) {
>> + if (!strcmp(cmd, ignorelist[i])) {
>> return true;
>> }
>> }
>> @@ -179,7 +179,7 @@ static void add_query_tests(QmpSchema *schema)
>> continue;
>> }
>>
>> - if (query_is_blacklisted(si->name)) {
>> + if (ignore_query(si->name)) {
>> continue;
>> }
>>
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-14 7:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-12 7:49 [PATCH] tests/qtest/qmp-cmd-test: Use inclusive language Thomas Huth
2020-09-12 7:55 ` Philippe Mathieu-Daudé
2020-09-12 8:36 ` Paolo Bonzini
2020-09-14 7:20 ` Markus Armbruster
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).