Re: [PATCH] Remove redhat'ism from ftrace selftests.
From: Michael Ellerman
Date: Wed Mar 04 2015 - 20:19:07 EST
On Wed, 2015-03-04 at 21:44 +0900, Namhyung Kim wrote:
>
> I think that there's no need to even call true or echo..
>
> From 0549544e8e982df6478f11e2b4fe419f94c22434 Mon Sep 17 00:00:00 2001
> From: Namhyung Kim <namhyung@xxxxxxxxxx>
> Date: Wed, 4 Mar 2015 21:26:38 +0900
> Subject: [PATCH] ftracetest: Do not use usleep
>
> The usleep is only provided on distros from Redhat so running ftracetest
> on other distro resulted in failures due to the missing usleep.
>
> The reason of using [u]sleep in the test was to generate (scheduler)
> events. But as we use 'cat trace | grep | wc -l' to read the events,
> the command themselves already generate some events before reading the
> trace file so no need to call [u]sleep explicitly.
>
> Reported-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Reported-by: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Thanks, this is working for me.
Tested-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
$ cat /etc/issue
Ubuntu 14.10 \n \l
$ git log -2 --pretty=oneline
385a914624fc9fb6d0ccc3d2fd3a12ebd1ece7dd ftracetest: Do not use usleep
a6c5170d1edea97c538c81e377e56c7b5c5b7e63 Merge branch 'for-4.0' of git://linux-nfs.org/~bfields/linux
$ sudo ./ftracetest
=== Ftrace unit tests ===
[1] Basic trace file check [PASS]
[2] Basic test for tracers [PASS]
[3] Basic trace clock test [PASS]
[4] Basic event tracing check [PASS]
[5] event tracing - enable/disable with event level files [PASS]
[6] event tracing - enable/disable with subsystem level files [PASS]
[7] event tracing - enable/disable with top level files [PASS]
[8] ftrace - function graph filters with stack tracer [PASS]
[9] ftrace - function graph filters [PASS]
[10] ftrace - function profiler with function tracing [PASS]
[11] Kprobe dynamic event - adding and removing [PASS]
[12] Kprobe dynamic event - busy event check [PASS]
[13] Kprobe dynamic event with arguments [PASS]
[14] Kprobe dynamic event with function tracer [PASS]
[15] Kretprobe dynamic event with arguments [PASS]
# of passed: 15
# of failed: 0
# of unresolved: 0
# of untested: 0
# of unsupported: 0
# of xfailed: 0
# of undefined(test bug): 0
cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/