diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-11-07 23:59:26 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-11-07 23:59:26 +0000 |
commit | 3fe8f44b9262838ad15840a353c152d1cc0a2ade (patch) | |
tree | ba544cd961ef4abb29d1a7984e52702f7a38eb72 | |
parent | 2001-11-07 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-3fe8f44b9262838ad15840a353c152d1cc0a2ade.tar.bz2 |
2001-11-07 Jennifer Averett <jennifer@OARcorp.com>
Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR63.
* psxstat/test.c: Fix test ENOTDIR to correspond to chdir() change.
Since we check permissions before evaluating enough to see if it
a regular file or directory, this hack is needed to make the regular
file executable.
-rw-r--r-- | c/src/tests/psxtests/psxstat/test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/c/src/tests/psxtests/psxstat/test.c b/c/src/tests/psxtests/psxstat/test.c index 995f33adb6..db1f7c71db 100644 --- a/c/src/tests/psxtests/psxstat/test.c +++ b/c/src/tests/psxtests/psxstat/test.c @@ -481,9 +481,12 @@ void Cause_faults() assert( errno == EPERM ); /* - * Try to chdir to a file. + * Change file to executable then try to chdir to it. */ + status = chmod( Files[0], S_IXUSR ); + assert( status != -1 ); + printf("chdir to a file should fail with ENOTDIR\n"); status = chdir( Files[0] ); assert( status == -1 ); |