lkml.org 
[lkml]   [2016]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] perf tests: Add is_printable_array test
Em Mon, Jul 18, 2016 at 02:14:09PM +0200, Jiri Olsa escreveu:
> On Mon, Jul 18, 2016 at 01:46:02PM +0200, Jiri Pirko wrote:
>
> SNIP
>
> > >diff --git a/tools/perf/tests/is_printable_array.c b/tools/perf/tests/is_printable_array.c
> > >new file mode 100644
> > >index 000000000000..42e13393e502
> > >--- /dev/null
> > >+++ b/tools/perf/tests/is_printable_array.c
> > >@@ -0,0 +1,36 @@
> > >+#include <linux/compiler.h>
> > >+#include "tests.h"
> > >+#include "debug.h"
> > >+#include "util.h"
> > >+
> > >+int test__is_printable_array(int subtest __maybe_unused)
> > >+{
> > >+ char buf1[] = { 'k', 'r', 4, 'v', 'a', 0 };
> > >+ char buf2[] = { 'k', 'r', 'a', 'v', 4, 0 };
> > >+ struct {
> > >+ char *buf;
> > >+ unsigned int len;
> > >+ int ret;
> > >+ } t[] = {
> > >+ { (char *) "krava", sizeof("krava"), 1 },
> > >+ { (char *) "krava", sizeof("krava") - 1, 0 },
> >
> > "a cow" ? Really? :))
>
> yea, trying to force it as 'perf animal' instead of that pony stuff ;-)
>
> http://www.brendangregg.com/blog/2015-07-08/choosing-a-linux-tracer.html

Yeah, a vaca! 8-)

- ARnaldo

\
 
 \ /
  Last update: 2016-07-19 01:21    [W:0.293 / U:2.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site