From owner-freebsd-emulation@FreeBSD.ORG Fri Dec 29 21:48:37 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E5BA16A40F for ; Fri, 29 Dec 2006 21:48:37 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by mx1.freebsd.org (Postfix) with ESMTP id 901D113C45A for ; Fri, 29 Dec 2006 21:48:36 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.8/8.13.7) with ESMTP id kBTLCuVp086403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Dec 2006 22:12:56 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.8/8.13.3/Submit) id kBTLCu6D086402; Fri, 29 Dec 2006 22:12:56 +0100 (CET) Date: Fri, 29 Dec 2006 22:12:56 +0100 From: Divacky Roman To: Scot Hetzel Message-ID: <20061229211255.GA85791@stud.fit.vutbr.cz> References: <790a9fff0612290911t5ae69715gd2bf0dda0f9228f2@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <790a9fff0612290911t5ae69715gd2bf0dda0f9228f2@mail.gmail.com> User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.57 on 147.229.176.14 Cc: freebsd-emulation@freebsd.org Subject: Re: linuxolator: amd64 Linux Test Project failures X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 21:48:37 -0000 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