[PATCH] tests: add chmod.test
Dmitry V. Levin
ldv at altlinux.org
Fri Mar 4 20:30:10 UTC 2016
On Sat, Mar 05, 2016 at 01:48:33AM +0530, Anchit Jain wrote:
[...]
> >> >> + if(syscall(__NR_chmod, "chmod_test_file", 0600) != 0)
> >> >> + perror_msg_and_fail("chmod -1");
> >> >
> >> > Let me repeat: chmod syscall can legitimately fail with ENOSYS.
> >>
> >> How can I check that?
> >
> > errno == ENOSYS?
>
> So in case if errno is ENOSYS test should be skipped rather than failing ?
Either skipper or (in this case it's easy) printed as failed with ENOSYS.
Of cause the second call that's expected to fail with ENOENT shouldn't be
made if the first one failed with ENOSYS.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160304/ea81f65c/attachment.bin>
More information about the Strace-devel
mailing list