[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1212798986.4088.23.camel@dyn9047018139.beaverton.ibm.com>
Date: Fri, 06 Jun 2008 17:36:26 -0700
From: Jim Keniston <jkenisto@...ibm.com>
To: Masami Hiramatsu <mhiramat@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
David Miller <davem@...emloft.net>,
systemtap-ml <systemtap@...rces.redhat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -mm 2/2] kprobes: add tests for register_kprobes
On Fri, 2008-06-06 at 10:08 -0400, Masami Hiramatsu wrote:
> Add testcases for *probe batch registration (register_kprobes)
> to kprobes sanity tests.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@...hat.com>
> CC: Ananth N Mavinakayanahalli <ananth@...ibm.com>
> CC: Jim Keniston <jkenisto@...ibm.com>
> CC: David Miller <davem@...emloft.net>
> ---
> ...
> +
> +static int test_kprobes(void)
> +{
> + int ret;
> + struct kprobe *kps[2] = {&kp, &kp2};
preh_val and posth_val are being reused after test_kprobe(), which sets
them to non-zero values. Seems like you want to reinitialize them here
as well as below.
Ditto jph_val for jprobes and krph_val for kretprobes.
Ack otherwise.
Jim
+
> + ret = register_kprobes(kps, 2);
> + if (ret < 0) {
> + printk(KERN_ERR "Kprobe smoke test failed: "
> + "register_kprobes returned %d\n", ret);
> + return ret;
> + }
> +
> + ret = target(rand1);
> +
> + if (preh_val == 0) {
> + printk(KERN_ERR "Kprobe smoke test failed: "
> + "kprobe pre_handler not called\n");
> + handler_errors++;
> + }
> +
> + if (posth_val == 0) {
> + printk(KERN_ERR "Kprobe smoke test failed: "
> + "kprobe post_handler not called\n");
> + handler_errors++;
> + }
> +
> + preh_val = 0;
> + posth_val = 0;
> + ret = target2(rand1);
> ...
--
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