Date: Wed, 9 Mar 2011 22:39:10 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/tools/regression/pjdfstest Makefile pjdfstest.c src/tools/regression/pjdfstest/tests/chmod 12.t Message-ID: <201103092239.p29MdNJg058835@repoman.freebsd.org>
index | next in thread | raw e-mail
pjd 2011-03-09 22:39:10 UTC
FreeBSD src repository
Modified files:
tools/regression/pjdfstest Makefile pjdfstest.c
tools/regression/pjdfstest/tests/chmod 12.t
Log:
SVN rev 219437 on 2011-03-09 22:39:10Z by pjd
Add support for the following syscalls:
- fchmod(2),
- fchown(2),
- fchflags(2),
- fstat(2),
- ftruncate(2),
- fpathconf(2),
- lpathconf(2).
Make write(2) syscall to take descriptor instead of file name.
We implement descriptors by keeping track of open files and allowing to
reference them by the following syscalls. Because pjdfstest already supports
executing multiple syscalls from one command it works pretty well.
For example, the following command:
pjdfstest open foo "O_CREAT,O_RDWR" 0 : open bar "O_CREAT,O_RDONLY" 640 : fchmod 0 0666 : fchown 0 -1 20 : fchmod 1 0444
is equivalent of (error checking omitted):
int fd[2];
fd[0] = open("foo", O_CREAT | O_RDWR, 0);
fd[1] = open("bar", O_CREAT | O_RDONLY, 0640);
fchmod(fd[0], 0666);
fchown(fd[0], -1, 20);
fchmod(fd[1], 0444);
Revision Changes Path
1.3 +1 -1 src/tools/regression/pjdfstest/Makefile
1.2 +91 -10 src/tools/regression/pjdfstest/pjdfstest.c
1.2 +2 -2 src/tools/regression/pjdfstest/tests/chmod/12.t
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103092239.p29MdNJg058835>
