From: Jim Keniston <jkenisto@us.ibm.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
David Miller <davem@davemloft.net>,
systemtap-ml <systemtap@sources.redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm 2/2] kprobes: add tests for register_kprobes
Date: Mon, 09 Jun 2008 11:37:00 -0000 [thread overview]
Message-ID: <1212798986.4088.23.camel@dyn9047018139.beaverton.ibm.com> (raw)
In-Reply-To: <484944CA.902@redhat.com>
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@redhat.com>
> CC: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> CC: Jim Keniston <jkenisto@us.ibm.com>
> CC: David Miller <davem@davemloft.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);
> ...
next prev parent reply other threads:[~2008-06-07 0:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 22:10 Masami Hiramatsu
2008-06-06 23:46 ` Ananth N Mavinakayanahalli
2008-06-09 11:37 ` Jim Keniston [this message]
2008-06-11 1:53 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1212798986.4088.23.camel@dyn9047018139.beaverton.ibm.com \
--to=jkenisto@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=ananth@in.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).