summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psxstat/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/tests/psxtests/psxstat/test.c')
-rw-r--r--c/src/tests/psxtests/psxstat/test.c5
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 901f48bd0a..04517de986 100644
--- a/c/src/tests/psxtests/psxstat/test.c
+++ b/c/src/tests/psxtests/psxstat/test.c
@@ -483,9 +483,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 );