tests: We can no longer open /bin/sh r/w due to PM for flock

* Use /etc/passwd
This commit is contained in:
Alexander von Gluck IV
2015-02-02 15:47:23 +00:00
parent b8be4f7268
commit 0d5cfeec92
@@ -61,7 +61,7 @@ try_to_lock(void *_fd)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
intptr_t fd = open("/bin/sh", O_RDONLY); intptr_t fd = open("/etc/passwd", O_RDONLY);
if (fd < 0) { if (fd < 0) {
fprintf(stderr, "could not open file: %s\n", strerror(errno)); fprintf(stderr, "could not open file: %s\n", strerror(errno));
return -1; return -1;
@@ -92,7 +92,7 @@ main(int argc, char **argv)
close(fd); close(fd);
fd = open("/bin/sh", O_RDWR); fd = open("/etc/passwd", O_RDWR);
if (fd < 0) { if (fd < 0) {
fprintf(stderr, "could not open file: %s\n", strerror(errno)); fprintf(stderr, "could not open file: %s\n", strerror(errno));
return -1; return -1;