VSX-PCTS tests the errno returned from an unlink() call on a directory. Although Linux's setting of errno = EISDIR is *informative*, the Single Unix Specification requires errno to be set to EPERM for implementations that do not support unlink() operating on a directory. See SUS for more details. A simple test-case is set up below... #include <stdio.h> #include <errno.h> #define DIRNAME "./testdir" main() { if (mkdir(DIRNAME, 0755) < 0) { perror(DIRNAME); exit(1); } if (unlink(DIRNAME) < 0 && errno == EPERM) { exit(0); } perror("unlink"); fprintf(stderr, "Expected errno %d, received %d\n", EPERM, errno); exit(1); }
This probably wont be changing for 2.2 since it may break compatibility.