From: Thomas Veerman Date: Wed, 7 Dec 2011 15:17:38 +0000 (+0000) Subject: Fix test43 for GCC/Clang X-Git-Tag: v3.2.0~194 X-Git-Url: http://zhaoyanbai.com/repos/nsupdate.html?a=commitdiff_plain;h=1adb3b60be67ae4563f8e598799a5b50c973d5fe;p=minix.git Fix test43 for GCC/Clang --- diff --git a/test/test43.c b/test/test43.c index f32a2bc4d..91d78d5ec 100644 --- a/test/test43.c +++ b/test/test43.c @@ -188,6 +188,7 @@ static void check_realpath_recurse(const char *path, int depth) DIR *dir; struct dirent *dirent; char pathsub[PATH_MAX + 1]; + struct stat st; /* check with the path itself */ check_realpath_step_by_step(path, 0); @@ -196,6 +197,15 @@ static void check_realpath_recurse(const char *path, int depth) if (depth < 1) return; + /* don't bother with non-directories. Due to timeouts in drivers we + * might not get expected results and takes way too long */ + if (stat(path, &st) != 0) { + ERR; + return; + } + if (!S_ISDIR(st.st_mode)) + return; + /* loop through subdirectories (including . and ..) */ if (!(dir = opendir(path))) {