lkml.org 
[lkml]   [2012]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch 2/8] mqueue selftests: print failure status instead of cause make error
From
On Sat, Nov 24, 2012 at 10:29 AM,  <dyoung@redhat.com> wrote:
> Original behavior:
> bash-4.1$ make -C mqueue run_tests
> make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
> ./mq_open_tests /test1
> Not running as root, but almost all tests require root in order to modify
> system settings. Exiting.
> make: *** [run_tests] Error 1
> make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
>
> After applying the patch:
> bash-4.1$ make -C mqueue run_tests
> make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
> Not running as root, but almost all tests require root in order to modify
> system settings. Exiting.
> mq_open_tests: [FAIL]
> Not running as root, but almost all tests require root in order to modify
> system settings. Exiting.
> mq_perf_tests: [FAIL]
> make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
> tools/testing/selftests/mqueue/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-2.6.orig/tools/testing/selftests/mqueue/Makefile 2012-11-23 22:37:04.945724010 +0800
> +++ linux-2.6/tools/testing/selftests/mqueue/Makefile 2012-11-23 22:38:43.101858919 +0800
> @@ -3,8 +3,8 @@ all:
> gcc -O2 -lrt -lpthread -lpopt -o mq_perf_tests mq_perf_tests.c
>
> run_tests:
> - ./mq_open_tests /test1
> - ./mq_perf_tests
> + @./mq_open_tests /test1 || echo "mq_open_tests: [FAIL]"
> + @./mq_perf_tests || echo "mq_perf_tests: [FAIL]"

Reviewed-by: Pekka Enberg <penberg@kernel.org>

I wonder though if we can make this more generic at higher level.
Maybe use Python or something instead of Makefiles for test case
definition?


\
 
 \ /
  Last update: 2012-11-24 11:21    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog