svn commit: r219438 - in head/tools/regression/pjdfstest: .
tests/chmod
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Mar 9 22:50:15 UTC 2011
Author: pjd
Date: Wed Mar 9 22:50:15 2011
New Revision: 219438
URL: http://svn.freebsd.org/changeset/base/219438
Log:
Pass descriptor number to write(2), now that it is possible.
Modified:
head/tools/regression/pjdfstest/pjdfstest.c
head/tools/regression/pjdfstest/tests/chmod/12.t
Modified: head/tools/regression/pjdfstest/pjdfstest.c
==============================================================================
--- head/tools/regression/pjdfstest/pjdfstest.c Wed Mar 9 22:39:10 2011 (r219437)
+++ head/tools/regression/pjdfstest/pjdfstest.c Wed Mar 9 22:50:15 2011 (r219438)
@@ -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,
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");
Modified: head/tools/regression/pjdfstest/tests/chmod/12.t
==============================================================================
--- head/tools/regression/pjdfstest/tests/chmod/12.t Wed Mar 9 22:39:10 2011 (r219437)
+++ head/tools/regression/pjdfstest/tests/chmod/12.t Wed Mar 9 22:50:15 2011 (r219438)
@@ -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}
More information about the svn-src-head
mailing list