[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5183D52D.7060303@gmail.com>
Date: Fri, 03 May 2013 09:18:05 -0600
From: David Ahern <dsahern@...il.com>
To: Jiri Olsa <jolsa@...hat.com>
CC: linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andi Kleen <andi@...stfloor.org>,
Ulrich Drepper <drepper@...il.com>,
Will Deacon <will.deacon@....com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 6/8] perf tests: Add automated tests for formula object
On 5/1/13 9:15 AM, Jiri Olsa wrote:
> +static int __test_basics(char *file)
> +{
> + struct perf_formula fml;
> + struct perf_formula_set *set;
> + struct perf_formula_counter *counter;
> + struct perf_evlist *evlist;
> + struct perf_evsel *evsel;
> + struct perf_counts *counts;
> + struct perf_formula_expr expr;
> + int ret;
> +
> + pr_debug("file %s\n", file);
> +
> + perf_formula__init(&fml);
> +
> + ret = perf_formula__load(&fml, file);
> + TEST_ASSERT_VAL("failed to load formula", !ret);
With all the asserts when something goes wrong you should delete the
file right after perf_formula__load. so maybe
file = file_get(data, sizeof(data));
ret = perf_formula__load(&fml, file);
file_put(file);
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists