From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 24 12:01:40 2006 Return-Path: X-Original-To: emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F69E16A4C2 for ; Sun, 24 Sep 2006 12:01:40 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9297343D46 for ; Sun, 24 Sep 2006 12:01:38 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from Andro-Beta.Leidinger.net (p54A5CF73.dip.t-dialin.net [84.165.207.115]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k8OBbMMQ044251; Sun, 24 Sep 2006 13:37:23 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k8OC1VjU023512; Sun, 24 Sep 2006 14:01:32 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Date: Sun, 24 Sep 2006 14:02:13 +0200 From: Alexander Leidinger To: Bruce Evans Message-ID: <20060924140213.74043db0@Magellan.Leidinger.net> In-Reply-To: <20060924204648.Y74842@delplex.bde.org> References: <200609231906.k8NJ6smx010022@repoman.freebsd.org> <20060924204648.Y74842@delplex.bde.org> Organization: FreeBSD X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: emulation@FreeBSD.org Subject: Re: cvs commit: src/sys/compat/linux linux_file.c linux_socket.c 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: Sun, 24 Sep 2006 12:01:40 -0000 Quoting Bruce Evans (Sun, 24 Sep 2006 21:21:23 +1000 (EST)): emulation@ CCed. > > netchild 2006-09-23 19:06:54 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/compat/linux linux_file.c linux_socket.c > > Log: > > MFp4: > > ... > > - Return EISDIR in pread() when arg is a directory. > > Why do extra work to break pread() on directories? (The patch only > breaks cases where pread() succeeds. Cases where pread() fails > with an errno not expected by Linux, if any, are not affected.) Linux expects to get EISDIR here. We are using the linux test project testcases to check how compatible we are with linux. Have a look at http://wiki.freebsd.org/linux-kernel for more. So in your opinion we should not behave like linux programs expect it regarding such things which we allow in FreeBSD? For some parts I don't mind this, but on the other side we should be compatible if we tell our users that we are compatible (and we do this implicitly already). Where to draw the line? > Whether read(), pread() or lseek() works on directories should depend > on whether the underlying file supports it. ffs under FreeBSD supports > all these functions. I think linux_read() is just read(), so it doesn't > do extra work to be bug for bug compatible with Linux, and is now > incompatible with linux_pread(). linux_lseek() still just wraps > lseek(), so linux_pread() is now incompatible with it too. For linux_read() we have still some open issues (read02 in the LTP table in the wiki may test just this). Since not all of the LTP tests are as verbose as others, this may be one of the tests which fails. For linux_lseek() we need to investigate if this is already checked for in the LTP. If yes and the test doesn't fail, we're ok. If not we need to determine what linux does. Bye, Alexander. -- ...and that is how we know the Earth to be banana-shaped. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137