linuxolator: amd64 Linux Test Project failures

Divacky Roman xdivac02 at stud.fit.vutbr.cz
Fri Dec 29 13:48:37 PST 2006


On Fri, Dec 29, 2006 at 11:11:00AM -0600, Scot Hetzel wrote:
> I'm seeing similar failures on these functions when running the
> ltp-20061222 tests on amd64:
> 
> linux_[access, chdir, chmod, chown, chroot, creat, lchown, link,
> lstat, mkdir, mkdirat, mknod, rename, rmdir, stat, statfs, symlink,
> truncate, unlink]
> 
> The problem is that the ltp tests are passing in a negative value for
> the path into the functions, and is expection a return value of
> EFAULT.  Instead they are returning with (i.e access03):
> 
> access((char *)-1,R_OK) failed with errno 2 : No such file or
> directory but expected 14 (EFAULT)
> 
> I added a printf before the LCONVPATHEXIST macro:
> 
>        printf(ARGS(access, "Checking if path [%p/%p] exists"), (char
> *) -1, &args->path);

you are not printing what the syscall is passed in but memory position
where syscall code copied the parameter.

just remove the & from there...

can you try this patch and tell me if it fixes it? I have flu and bloody
eyes and I dont dare to do anything with my computer these days :(

Index: linux_util.h
===================================================================
RCS file: /home/ncvs/src/sys/compat/linux/linux_util.h,v
retrieving revision 1.28
diff -u -r1.28 linux_util.h
--- linux_util.h        27 Jun 2006 18:30:49 -0000      1.28
+++ linux_util.h        29 Dec 2006 21:12:41 -0000
@@ -59,7 +59,7 @@
                                                                        \
                _error = linux_emul_convpath(td, upath, UIO_USERSPACE,  \
                    pathp, i);                                          \
-               if (*(pathp) == NULL)                                   \
+               if (*(pathp) == NULL || *pathp == NULL)                 \
                        return (_error);                                \
        } while (0)


roman


More information about the freebsd-emulation mailing list