Re: [RFC PATCH 0/3] ftrace: Add a ftrace test collection

2014-08-13 Thread Masami Hiramatsu
(2014/08/13 15:59), Namhyung Kim wrote:
> Hi Steve and Masami,
> 
> On Tue, 5 Aug 2014 17:37:52 -0400, Steven Rostedt wrote:
>> Hi Masami,
>>
>> This looks great. I'm a bit busy at the moment (just came back from
>> vacation, and digging myself out of the hole that left me). But I
>> definitely want this in. I have a bunch of tests too, that I can put on
>> top of this. My tests are rather hacky, and hard code a lot of stuff in
>> them, but they do test a bunch of features of ftrace. It shouldn't be
>> too hard to include them here.
>>
>>
>> On Tue, 05 Aug 2014 02:45:44 +
>> Masami Hiramatsu  wrote:
>>
>>> Hi,
>>>
>>> I'd like to introduce a collection of testcases for ftrace to
>>> avoid regressions.
>>>
>>> For a long time, we've tried to stabilize and extend ftrace
>>> tracing infrastructure. This small test framework is a kind of
>>> stabilizing work for ftrace. For the first step, this series
>>> just introduces a few basic testcases. However, it is easy to
>>> add additional tests. I'd like to ask you, ftrace developers,
>>> to add tests for your features to ensure it will not be broken
>>> by future works.
>>>
>>> ftracetest is a tiny bash script so that anyone can easily
>>> understand what it does. I think it is better to share and
>>> discuss this tests before growing it.
>>>
>>>  - Is it enough to support bash script? (of course you can
>>>invoke other commands from the script)
> 
> Btw, does it use any bash-specific feature?

Not much ("function" keyword is possible bashism). I usually
use bash and sometimes unintentionally use bash-specific features :)
Anyway, I guess bash is enough common now and sometimes its extensions
are good for short scripting.

>>>  - What's the good naming method of testcases?
> 
> I'm okay with the ftracetest, but tracing-test may be an option. :)

Ah, as you said, I meant its extensions *.tc.  :)

>>>  - Is any dependency check required?
> 
> I think we need to start from no/minimum external dependency.
> 
> 
>>>
>>> BTW, I decided to put this under tools/testing/ftrace instead
>>> of tools/testing/selftests/, because all tests requires root
>>> privilege. It will be one of discussion points. Anyway,
>>> it is easy to integrate this to the selftests.
>>
>> I agree. I think having its own directory is a good idea. Lets see what
>> other people think. When I get time, I'll see if I can start a branch
>> that pulls this in and start adding my own tests on top of it.
> 
> I also agree to have a separate directory and it's not a selftest :)
> 
> Steve, I think you already have a lot of testcases that I want to add,
> I'll take a look if you setup the branch and try to add my own if
> needed.

Great! That's so helpful for us :)

Thank you,

-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu...@hitachi.com


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC PATCH 0/3] ftrace: Add a ftrace test collection

2014-08-13 Thread Namhyung Kim
On Wed, 13 Aug 2014 15:59:04 +0900, Namhyung Kim wrote:
> On Tue, 5 Aug 2014 17:37:52 -0400, Steven Rostedt wrote:
>> Masami Hiramatsu  wrote:
>>>  - What's the good naming method of testcases?
>
> I'm okay with the ftracetest, but tracing-test may be an option. :)

Ouch, did you say about *.tc file name?  I have no problem with that too
anyway :)

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC PATCH 0/3] ftrace: Add a ftrace test collection

2014-08-12 Thread Namhyung Kim
Hi Steve and Masami,

On Tue, 5 Aug 2014 17:37:52 -0400, Steven Rostedt wrote:
> Hi Masami,
>
> This looks great. I'm a bit busy at the moment (just came back from
> vacation, and digging myself out of the hole that left me). But I
> definitely want this in. I have a bunch of tests too, that I can put on
> top of this. My tests are rather hacky, and hard code a lot of stuff in
> them, but they do test a bunch of features of ftrace. It shouldn't be
> too hard to include them here.
>
>
> On Tue, 05 Aug 2014 02:45:44 +
> Masami Hiramatsu  wrote:
>
>> Hi,
>> 
>> I'd like to introduce a collection of testcases for ftrace to
>> avoid regressions.
>> 
>> For a long time, we've tried to stabilize and extend ftrace
>> tracing infrastructure. This small test framework is a kind of
>> stabilizing work for ftrace. For the first step, this series
>> just introduces a few basic testcases. However, it is easy to
>> add additional tests. I'd like to ask you, ftrace developers,
>> to add tests for your features to ensure it will not be broken
>> by future works.
>> 
>> ftracetest is a tiny bash script so that anyone can easily
>> understand what it does. I think it is better to share and
>> discuss this tests before growing it.
>> 
>>  - Is it enough to support bash script? (of course you can
>>invoke other commands from the script)

Btw, does it use any bash-specific feature?


>>  - What's the good naming method of testcases?

I'm okay with the ftracetest, but tracing-test may be an option. :)


>>  - Is any dependency check required?

I think we need to start from no/minimum external dependency.


>> 
>> BTW, I decided to put this under tools/testing/ftrace instead
>> of tools/testing/selftests/, because all tests requires root
>> privilege. It will be one of discussion points. Anyway,
>> it is easy to integrate this to the selftests.
>
> I agree. I think having its own directory is a good idea. Lets see what
> other people think. When I get time, I'll see if I can start a branch
> that pulls this in and start adding my own tests on top of it.

I also agree to have a separate directory and it's not a selftest :)

Steve, I think you already have a lot of testcases that I want to add,
I'll take a look if you setup the branch and try to add my own if
needed.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC PATCH 0/3] ftrace: Add a ftrace test collection

2014-08-06 Thread Masami Hiramatsu
(2014/08/06 6:37), Steven Rostedt wrote:
> Hi Masami,
> 
> This looks great. I'm a bit busy at the moment (just came back from
> vacation, and digging myself out of the hole that left me). But I
> definitely want this in. I have a bunch of tests too, that I can put on
> top of this. My tests are rather hacky, and hard code a lot of stuff in
> them, but they do test a bunch of features of ftrace. It shouldn't be
> too hard to include them here.

Thanks! and I found some ftrace testcases in LTP,

https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress

Most of them are for stress test, but basic ideas are good for
unit test. And IMHO, ftrace unit test should be within the kernel
tree.

> 
> 
> On Tue, 05 Aug 2014 02:45:44 +
> Masami Hiramatsu  wrote:
> 
>> Hi,
>>
>> I'd like to introduce a collection of testcases for ftrace to
>> avoid regressions.
>>
>> For a long time, we've tried to stabilize and extend ftrace
>> tracing infrastructure. This small test framework is a kind of
>> stabilizing work for ftrace. For the first step, this series
>> just introduces a few basic testcases. However, it is easy to
>> add additional tests. I'd like to ask you, ftrace developers,
>> to add tests for your features to ensure it will not be broken
>> by future works.
>>
>> ftracetest is a tiny bash script so that anyone can easily
>> understand what it does. I think it is better to share and
>> discuss this tests before growing it.
>>
>>  - Is it enough to support bash script? (of course you can
>>invoke other commands from the script)
>>  - What's the good naming method of testcases?
>>  - Is any dependency check required?
>>
>> BTW, I decided to put this under tools/testing/ftrace instead
>> of tools/testing/selftests/, because all tests requires root
>> privilege. It will be one of discussion points. Anyway,
>> it is easy to integrate this to the selftests.
> 
> I agree. I think having its own directory is a good idea. Lets see what
> other people think.

Actually, current sefltests provides just a space, not minimal
functions, like log management, test statistics, etc. which ftracetest
has. And I doubt that Make-based test framework is good for providing
such functions.
I think it is also another option to generalize the ftracetest script
for selftests :)

> When I get time, I'll see if I can start a branch
> that pulls this in and start adding my own tests on top of it.

I look forward to see your tests :)

Thank you,

-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu...@hitachi.com


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC PATCH 0/3] ftrace: Add a ftrace test collection

2014-08-05 Thread Steven Rostedt
Hi Masami,

This looks great. I'm a bit busy at the moment (just came back from
vacation, and digging myself out of the hole that left me). But I
definitely want this in. I have a bunch of tests too, that I can put on
top of this. My tests are rather hacky, and hard code a lot of stuff in
them, but they do test a bunch of features of ftrace. It shouldn't be
too hard to include them here.


On Tue, 05 Aug 2014 02:45:44 +
Masami Hiramatsu  wrote:

> Hi,
> 
> I'd like to introduce a collection of testcases for ftrace to
> avoid regressions.
> 
> For a long time, we've tried to stabilize and extend ftrace
> tracing infrastructure. This small test framework is a kind of
> stabilizing work for ftrace. For the first step, this series
> just introduces a few basic testcases. However, it is easy to
> add additional tests. I'd like to ask you, ftrace developers,
> to add tests for your features to ensure it will not be broken
> by future works.
> 
> ftracetest is a tiny bash script so that anyone can easily
> understand what it does. I think it is better to share and
> discuss this tests before growing it.
> 
>  - Is it enough to support bash script? (of course you can
>invoke other commands from the script)
>  - What's the good naming method of testcases?
>  - Is any dependency check required?
> 
> BTW, I decided to put this under tools/testing/ftrace instead
> of tools/testing/selftests/, because all tests requires root
> privilege. It will be one of discussion points. Anyway,
> it is easy to integrate this to the selftests.

I agree. I think having its own directory is a good idea. Lets see what
other people think. When I get time, I'll see if I can start a branch
that pulls this in and start adding my own tests on top of it.

Thanks!

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC PATCH 0/3] ftrace: Add a ftrace test collection

2014-08-04 Thread Masami Hiramatsu
Hi,

I'd like to introduce a collection of testcases for ftrace to
avoid regressions.

For a long time, we've tried to stabilize and extend ftrace
tracing infrastructure. This small test framework is a kind of
stabilizing work for ftrace. For the first step, this series
just introduces a few basic testcases. However, it is easy to
add additional tests. I'd like to ask you, ftrace developers,
to add tests for your features to ensure it will not be broken
by future works.

ftracetest is a tiny bash script so that anyone can easily
understand what it does. I think it is better to share and
discuss this tests before growing it.

 - Is it enough to support bash script? (of course you can
   invoke other commands from the script)
 - What's the good naming method of testcases?
 - Is any dependency check required?

BTW, I decided to put this under tools/testing/ftrace instead
of tools/testing/selftests/, because all tests requires root
privilege. It will be one of discussion points. Anyway,
it is easy to integrate this to the selftests.

Thank you,

---

Masami Hiramatsu (3):
  ftracetest: Initial commit for ftracetest
  ftracetest: Add ftrace basic testcases
  ftracetest: Add kprobe basic testcases


 tools/testing/ftrace/README|   38 ++
 tools/testing/ftrace/ftracetest|  133 
 tools/testing/ftrace/test.d/basic1.tc  |3 
 tools/testing/ftrace/test.d/basic2.tc  |6 +
 tools/testing/ftrace/test.d/basic3.tc  |8 +
 .../testing/ftrace/test.d/kprobe/add_and_remove.tc |   11 ++
 tools/testing/ftrace/test.d/kprobe/busy_check.tc   |   14 ++
 tools/testing/ftrace/test.d/template   |4 +
 8 files changed, 217 insertions(+)
 create mode 100644 tools/testing/ftrace/README
 create mode 100755 tools/testing/ftrace/ftracetest
 create mode 100644 tools/testing/ftrace/test.d/basic1.tc
 create mode 100644 tools/testing/ftrace/test.d/basic2.tc
 create mode 100644 tools/testing/ftrace/test.d/basic3.tc
 create mode 100644 tools/testing/ftrace/test.d/kprobe/add_and_remove.tc
 create mode 100644 tools/testing/ftrace/test.d/kprobe/busy_check.tc
 create mode 100644 tools/testing/ftrace/test.d/template

--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/