test: Change open() to openat() in specopen
PATCH 1/1 test: Change open() to openat() in specopen
From: Eugene Loh <[email protected]>
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 <[email protected]>
--- test/demo/spec/specopen.d | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
test/demo/spec/specopen.d +6 -6
@@ -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/ { /*
Signature · 1 line
2.43.5
Quoted 7 lines · On Tue, Nov 19, 2024 at 02:18:15PM -0500, [email protected] wrote:
From: Eugene Loh <[email protected]>
In commit
751f8f46dd29"test: Clean up tst.specopen.d", there was minor cleanup to make this example run. Actually, it should have converted toopenat()calls, sinceopen()is deprecated.Signed-off-by Eugene Loh <[email protected]>
Reviewed-by Kris Van Hees <[email protected]>
Quoted 62 lines
--- test/demo/spec/specopen.d | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)test/demo/spec/specopen.d +6
-6@@ -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/ { /*Signature · 1 line
2.43.5