From: Kris Van Hees <kris.van.hees@oracle.com>
To: eugene.loh@oracle.com
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH] test: Change open() to openat() in specopen
Date: Tue, 19 Nov 2024 14:30:00 -0500 [thread overview]
Message-ID: <ZzznOMekRZ6CDNGV@oracle.com> (raw)
In-Reply-To: <20241119191815.17767-1-eugene.loh@oracle.com>
On Tue, Nov 19, 2024 at 02:18:15PM -0500, eugene.loh@oracle.com wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> In commit 751f8f46dd29 "test: Clean up tst.specopen.d", there was
> minor cleanup to make this example run. Actually, it should have
> converted to openat() calls, since open() is deprecated.
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oraacle.com>
> ---
> test/demo/spec/specopen.d | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/test/demo/spec/specopen.d b/test/demo/spec/specopen.d
> index 700bdd9ff..e7dbc3b25 100644
> --- a/test/demo/spec/specopen.d
> +++ b/test/demo/spec/specopen.d
> @@ -7,7 +7,7 @@
> * http://oss.oracle.com/licenses/upl.
> */
>
> -syscall::open:entry
> +syscall::openat:entry
> {
> /*
> * The call to speculation() creates a new speculation. If this fails,
> @@ -23,7 +23,7 @@ syscall::open:entry
> * speculatively traced; it will only appear in the data buffer if the
> * speculation is subsequently commited.
> */
> - printf("%s", stringof(copyinstr(arg0)));
> + printf("%s", stringof(copyinstr(arg1)));
> }
>
> fbt:::
> @@ -35,20 +35,20 @@ fbt:::
> speculate(self->spec);
> }
>
> -syscall::open:return
> +syscall::openat:return
> /self->spec/
> {
> /*
> * To balance the output with the -F option, we want to be sure that
> * every entry has a matching return. Because we speculated the
> - * open entry above, we want to also speculate the open return.
> + * openat entry above, we want to also speculate the openat return.
> * This is also a convenient time to trace the errno value.
> */
> speculate(self->spec);
> trace(errno);
> }
>
> -syscall::open:return
> +syscall::openat:return
> /self->spec && errno != 0/
> {
> /*
> @@ -58,7 +58,7 @@ syscall::open:return
> self->spec = 0;
> }
>
> -syscall::open:return
> +syscall::openat:return
> /self->spec && errno == 0/
> {
> /*
> --
> 2.43.5
>
prev parent reply other threads:[~2024-11-19 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 19:18 [PATCH] test: Change open() to openat() in specopen eugene.loh
2024-11-19 19:30 ` Kris Van Hees [this message]
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=ZzznOMekRZ6CDNGV@oracle.com \
--to=kris.van.hees@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.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