aboutsummaryrefslogtreecommitdiff
path: root/tools/regression
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2011-03-09 22:50:15 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2011-03-09 22:50:15 +0000
commit7535f6533cf76770bc3cc3fc86554e7c18b36c95 (patch)
treefea30cb1a0574ee0b798d36c9e39df01620a9d99 /tools/regression
parent446727a7a4ea6625372ed525c1875573052b9315 (diff)
downloadsrc-7535f6533cf76770bc3cc3fc86554e7c18b36c95.tar.gz
src-7535f6533cf76770bc3cc3fc86554e7c18b36c95.zip
Pass descriptor number to write(2), now that it is possible.
Notes
Notes: svn path=/head/; revision=219438
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/pjdfstest/pjdfstest.c4
-rw-r--r--tools/regression/pjdfstest/tests/chmod/12.t4
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/regression/pjdfstest/pjdfstest.c b/tools/regression/pjdfstest/pjdfstest.c
index 9c4ec1de866e..db3bc553b237 100644
--- a/tools/regression/pjdfstest/pjdfstest.c
+++ b/tools/regression/pjdfstest/pjdfstest.c
@@ -163,7 +163,7 @@ static struct syscall_desc syscalls[] = {
{ "prependacl", ACTION_PREPENDACL, { TYPE_STRING, TYPE_STRING, TYPE_NONE } },
{ "readacl", ACTION_READACL, { TYPE_STRING, TYPE_NONE } },
#endif
- { "write", ACTION_WRITE, { TYPE_NUMBER, TYPE_NONE } },
+ { "write", ACTION_WRITE, { TYPE_NUMBER, TYPE_STRING, TYPE_NONE } },
{ NULL, -1, { TYPE_NONE } }
};
@@ -745,7 +745,7 @@ call_syscall(struct syscall_desc *scall, char *argv[])
break;
#endif
case ACTION_WRITE:
- rval = write(DESC(0), "x", 1);
+ rval = write(DESC(0), STR(1), strlen(STR(1)));
break;
default:
fprintf(stderr, "unsupported syscall\n");
diff --git a/tools/regression/pjdfstest/tests/chmod/12.t b/tools/regression/pjdfstest/tests/chmod/12.t
index 0c72bd76f750..4b5c58cd5275 100644
--- a/tools/regression/pjdfstest/tests/chmod/12.t
+++ b/tools/regression/pjdfstest/tests/chmod/12.t
@@ -18,13 +18,13 @@ cd ${n2}
# Check whether writing to the file by non-owner clears the SUID.
expect 0 create ${n0} 04777
-expect 0 -u 65534 -g 65534 write ${n0} x
+expect 0 -u 65534 -g 65534 open ${n0} O_WRONLY : write 0 x
expect 0777 stat ${n0} mode
expect 0 unlink ${n0}
# Check whether writing to the file by non-owner clears the SGID.
expect 0 create ${n0} 02777
-expect 0 -u 65534 -g 65534 write ${n0} x
+expect 0 -u 65534 -g 65534 open ${n0} O_RDWR : write 0 x
expect 0777 stat ${n0} mode
expect 0 unlink ${n0}