Date: Fri, 29 Dec 2006 22:12:56 +0100 From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: Scot Hetzel <swhetzel@gmail.com> Cc: freebsd-emulation@freebsd.org Subject: Re: linuxolator: amd64 Linux Test Project failures Message-ID: <20061229211255.GA85791@stud.fit.vutbr.cz> In-Reply-To: <790a9fff0612290911t5ae69715gd2bf0dda0f9228f2@mail.gmail.com> References: <790a9fff0612290911t5ae69715gd2bf0dda0f9228f2@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061229211255.GA85791>