[DTrace-devel] [PATCH 1/7] dtrace: update bogus-ioctl test to comply with prototype for open call

eugene.loh at oracle.com eugene.loh at oracle.com
Fri Aug 14 10:43:18 PDT 2020


From: "David P. Mc Lean" <david.mclean at oracle.com>

Found a test failing when running on kernel 5.2.2; Ubuntu 19.04
Running:
test/unittest/io/tst.fds.d: Running trigger test/triggers/bogus-ioctl with
delay 1
Results in:
FAIL: erroneous exitcode (1).

A compile error shows:
open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
The 3rd argument added is the mode of the "file" opened with flag O_CREAT.

Signed-off-by: David  Mc Lean <david.mclean at oracle.com>
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 test/triggers/bogus-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/triggers/bogus-ioctl.c b/test/triggers/bogus-ioctl.c
index 7882ef4a..778a1ee6 100644
--- a/test/triggers/bogus-ioctl.c
+++ b/test/triggers/bogus-ioctl.c
@@ -63,7 +63,7 @@ main(void)
 
 	fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC |
 	    O_LARGEFILE | O_NOCTTY | O_NONBLOCK | O_NDELAY | O_RSYNC |
-	    O_SYNC | O_TRUNC);
+	    O_SYNC | O_TRUNC, 0);
 
 	fds[n++] = open(file, O_RDWR);
 	(void) lseek(fds[n - 1], 123, SEEK_SET);
-- 
2.18.4




More information about the DTrace-devel mailing list