Address issue with permissions on utimesat_tests.
After investigation, I found that the following two parts
maybe have wrong RW parameter:
a) Testing read-only file, owned by nobody(self).
Since the perm is 400, the user `nobody' itself doesn't have
write permission to the testfile, thus, if program executes
./utimensat01 with -w param, `Permission deined' error will
occur. So we need to add -W in run_test param to avoid trying
writing test.
b) Testing read-only file, owned by root.
Since root owns the test file and the perm is still 400,
the user `nobody' has neither writing nor reading permission
to this file, so -RW param should be both set to run_test
function to avoid trying reading & writing test.
Signed-off-by: Caspar Zhang <czhang@redhat.com>
Acked-by: Garrett Cooper <yanegomi@gmail.com>
1 file changed