mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
![Namhyung Kim](/assets/img/avatar_default.png)
It now can have negative value to suppress the message entirely. So it needs to check it being positive. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-3-namhyung@kernel.org [ Adjust fuzz on tools/perf/util/pmu.c, add > 0 checks in many other places ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
24 lines
463 B
C
24 lines
463 B
C
/*
|
|
* Just test if we can load the python binding.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <linux/compiler.h>
|
|
#include "tests.h"
|
|
|
|
extern int verbose;
|
|
|
|
int test__python_use(int subtest __maybe_unused)
|
|
{
|
|
char *cmd;
|
|
int ret;
|
|
|
|
if (asprintf(&cmd, "echo \"import sys ; sys.path.append('%s'); import perf\" | %s %s",
|
|
PYTHONPATH, PYTHON, verbose > 0 ? "" : "2> /dev/null") < 0)
|
|
return -1;
|
|
|
|
ret = system(cmd) ? -1 : 0;
|
|
free(cmd);
|
|
return ret;
|
|
}
|