--- test/zdtm/lib/fs.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/test/zdtm/lib/fs.c b/test/zdtm/lib/fs.c index e82011e..f026f22 100644 --- a/test/zdtm/lib/fs.c +++ b/test/zdtm/lib/fs.c @@ -4,6 +4,7 @@ #include <errno.h> #include <unistd.h> #include <limits.h> +#include <sys/stat.h>
#include "zdtmtst.h" #include "fs.h" @@ -106,11 +107,15 @@ int get_cwd_check_perm(char **result) }
if (access(cwd, X_OK)) { - pr_err("access check for bit X for current dir path '%s' " - "failed for uid:%d,gid:%d, error: %d(%s). " + struct stat sb; + + stat(cwd, &sb); + pr_err("access check for bit X for current dir path '%s'(uid:%d,gid:%d,mode:%o) " + "failed for uid:%d,gid:%d,euid:%d, error: %d(%s). " "Bit 'x' should be set in all path components of " "this directory\n", - cwd, getuid(), getgid(), errno, strerror(errno) + cwd, sb.st_uid, sb.st_gid, sb.st_mode, getuid(), getgid(), geteuid(), + errno, strerror(errno) ); return -1; }