mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 17:30:53 +07:00
bb963e1650
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>
25 lines
463 B
C
25 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;
|
|
}
|