* [Qemu-devel] [PATCH] tests: Rename qtests which have names ending "error"
@ 2016-08-04 10:39 Peter Maydell
2016-08-04 11:31 ` Daniel P. Berrange
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2016-08-04 10:39 UTC (permalink / raw)
To: qemu-devel; +Cc: patches, Daniel P. Berrange
We have three qtest tests which have test names ending with "error".
This is awkward because the output of verbose test runs looks like
/crypto/task/error: OK
/crypto/task/thread_error: OK
which gives false positives if you are grepping build logs for
errors by looking for "error:". Since there are only three tests
with this problem, just rename them all to 'failure' instead.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Per discussion on IRC yesterday. I might throw this one into 2.7,
I dunno.
In particular the grep rune I run over build logs for merges
looks for "error:" among other things, so these false positives
are irritating.
---
tests/test-io-task.c | 8 ++++----
tests/test-qmp-commands.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test-io-task.c b/tests/test-io-task.c
index a36cb82..e091c12 100644
--- a/tests/test-io-task.c
+++ b/tests/test-io-task.c
@@ -110,7 +110,7 @@ static void test_task_data_free(void)
}
-static void test_task_error(void)
+static void test_task_failure(void)
{
QIOTask *task;
Object *obj = object_new(TYPE_DUMMY);
@@ -214,7 +214,7 @@ static void test_task_thread_complete(void)
}
-static void test_task_thread_error(void)
+static void test_task_thread_failure(void)
{
QIOTask *task;
Object *obj = object_new(TYPE_DUMMY);
@@ -262,8 +262,8 @@ int main(int argc, char **argv)
type_register_static(&dummy_info);
g_test_add_func("/crypto/task/complete", test_task_complete);
g_test_add_func("/crypto/task/datafree", test_task_data_free);
- g_test_add_func("/crypto/task/error", test_task_error);
+ g_test_add_func("/crypto/task/failure", test_task_failure);
g_test_add_func("/crypto/task/thread_complete", test_task_thread_complete);
- g_test_add_func("/crypto/task/thread_error", test_task_thread_error);
+ g_test_add_func("/crypto/task/thread_failure", test_task_thread_failure);
return g_test_run();
}
diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
index 5af1a46..261fd9e 100644
--- a/tests/test-qmp-commands.c
+++ b/tests/test-qmp-commands.c
@@ -103,7 +103,7 @@ static void test_dispatch_cmd(void)
}
/* test commands that return an error due to invalid parameters */
-static void test_dispatch_cmd_error(void)
+static void test_dispatch_cmd_failure(void)
{
QDict *req = qdict_new();
QObject *resp;
@@ -253,7 +253,7 @@ int main(int argc, char **argv)
g_test_init(&argc, &argv, NULL);
g_test_add_func("/0.15/dispatch_cmd", test_dispatch_cmd);
- g_test_add_func("/0.15/dispatch_cmd_error", test_dispatch_cmd_error);
+ g_test_add_func("/0.15/dispatch_cmd_failure", test_dispatch_cmd_failure);
g_test_add_func("/0.15/dispatch_cmd_io", test_dispatch_cmd_io);
g_test_add_func("/0.15/dealloc_types", test_dealloc_types);
g_test_add_func("/0.15/dealloc_partial", test_dealloc_partial);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] tests: Rename qtests which have names ending "error"
2016-08-04 10:39 [Qemu-devel] [PATCH] tests: Rename qtests which have names ending "error" Peter Maydell
@ 2016-08-04 11:31 ` Daniel P. Berrange
2016-08-05 15:39 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2016-08-04 11:31 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, patches
On Thu, Aug 04, 2016 at 11:39:38AM +0100, Peter Maydell wrote:
> We have three qtest tests which have test names ending with "error".
> This is awkward because the output of verbose test runs looks like
> /crypto/task/error: OK
> /crypto/task/thread_error: OK
>
> which gives false positives if you are grepping build logs for
> errors by looking for "error:". Since there are only three tests
> with this problem, just rename them all to 'failure' instead.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> Per discussion on IRC yesterday. I might throw this one into 2.7,
> I dunno.
It has no functional change, so low risk & thus fine to put in 2.7 IMHO
>
> In particular the grep rune I run over build logs for merges
> looks for "error:" among other things, so these false positives
> are irritating.
> ---
> tests/test-io-task.c | 8 ++++----
> tests/test-qmp-commands.c | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/test-io-task.c b/tests/test-io-task.c
> index a36cb82..e091c12 100644
> --- a/tests/test-io-task.c
> +++ b/tests/test-io-task.c
> @@ -110,7 +110,7 @@ static void test_task_data_free(void)
> }
>
>
> -static void test_task_error(void)
> +static void test_task_failure(void)
> {
> QIOTask *task;
> Object *obj = object_new(TYPE_DUMMY);
> @@ -214,7 +214,7 @@ static void test_task_thread_complete(void)
> }
>
>
> -static void test_task_thread_error(void)
> +static void test_task_thread_failure(void)
> {
> QIOTask *task;
> Object *obj = object_new(TYPE_DUMMY);
> @@ -262,8 +262,8 @@ int main(int argc, char **argv)
> type_register_static(&dummy_info);
> g_test_add_func("/crypto/task/complete", test_task_complete);
> g_test_add_func("/crypto/task/datafree", test_task_data_free);
> - g_test_add_func("/crypto/task/error", test_task_error);
> + g_test_add_func("/crypto/task/failure", test_task_failure);
> g_test_add_func("/crypto/task/thread_complete", test_task_thread_complete);
> - g_test_add_func("/crypto/task/thread_error", test_task_thread_error);
> + g_test_add_func("/crypto/task/thread_failure", test_task_thread_failure);
> return g_test_run();
> }
> diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
> index 5af1a46..261fd9e 100644
> --- a/tests/test-qmp-commands.c
> +++ b/tests/test-qmp-commands.c
> @@ -103,7 +103,7 @@ static void test_dispatch_cmd(void)
> }
>
> /* test commands that return an error due to invalid parameters */
> -static void test_dispatch_cmd_error(void)
> +static void test_dispatch_cmd_failure(void)
> {
> QDict *req = qdict_new();
> QObject *resp;
> @@ -253,7 +253,7 @@ int main(int argc, char **argv)
> g_test_init(&argc, &argv, NULL);
>
> g_test_add_func("/0.15/dispatch_cmd", test_dispatch_cmd);
> - g_test_add_func("/0.15/dispatch_cmd_error", test_dispatch_cmd_error);
> + g_test_add_func("/0.15/dispatch_cmd_failure", test_dispatch_cmd_failure);
> g_test_add_func("/0.15/dispatch_cmd_io", test_dispatch_cmd_io);
> g_test_add_func("/0.15/dealloc_types", test_dealloc_types);
> g_test_add_func("/0.15/dealloc_partial", test_dealloc_partial);
> --
> 1.9.1
>
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] tests: Rename qtests which have names ending "error"
2016-08-04 11:31 ` Daniel P. Berrange
@ 2016-08-05 15:39 ` Peter Maydell
0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2016-08-05 15:39 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: QEMU Developers, Patch Tracking
On 4 August 2016 at 12:31, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Thu, Aug 04, 2016 at 11:39:38AM +0100, Peter Maydell wrote:
>> We have three qtest tests which have test names ending with "error".
>> This is awkward because the output of verbose test runs looks like
>> /crypto/task/error: OK
>> /crypto/task/thread_error: OK
>>
>> which gives false positives if you are grepping build logs for
>> errors by looking for "error:". Since there are only three tests
>> with this problem, just rename them all to 'failure' instead.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
>
>> ---
>> Per discussion on IRC yesterday. I might throw this one into 2.7,
>> I dunno.
>
> It has no functional change, so low risk & thus fine to put in 2.7 IMHO
Applied to master, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-05 15:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 10:39 [Qemu-devel] [PATCH] tests: Rename qtests which have names ending "error" Peter Maydell
2016-08-04 11:31 ` Daniel P. Berrange
2016-08-05 15:39 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.