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
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

jirka

\
 
 \ /
  Last update: 2016-07-18 14:41    [W:0.060 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site