]> Zhao Yanbai Git Server - minix.git/commitdiff
test74: allow to be run from source directory 80/3380/1
authorDavid van Moolenbroek <david@minix3.org>
Wed, 28 Dec 2016 12:53:10 +0000 (12:53 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Wed, 28 Dec 2016 13:05:44 +0000 (13:05 +0000)
A small fix to allow this test to be run from its original source
directory location, in addition to its installed location.

Change-Id: I4b7afed14ba02b1bea8d9c5f65bc96698a279188

minix/tests/test74.c

index 8a3ab0a59dc5c2a02c0801b2a358ce4e293c8aff..e9733d29cd56b6defa26bba48e89706066141224 100644 (file)
@@ -395,7 +395,9 @@ static void basic_regression(void)
         */
 
        fd1 = open("../testsh1", O_RDONLY);
+       if (fd1 < 0) fd1 = open("../testsh1.sh", O_RDONLY);
        fd2 = open("../testsh2", O_RDONLY);
+       if (fd2 < 0) fd2 = open("../testsh2.sh", O_RDONLY);
        if(fd1 < 0 || fd2 < 0) { e(2); }
 
        /* just check that we can't mmap() a file writable */