From owner-freebsd-emulation@FreeBSD.ORG Wed May 2 20:45:10 2007 Return-Path: X-Original-To: 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 EA24F16A403 for ; Wed, 2 May 2007 20:45:10 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by mx1.freebsd.org (Postfix) with ESMTP id A839F13C45A for ; Wed, 2 May 2007 20:45:10 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so284615ana for ; Wed, 02 May 2007 13:45:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=kRbicI3QEnLT+k+bmzRnVelw6La8o/PFUP5iXONLtgxRlxl0uhwJNguRzEzu/c3WhbemxgqYX+c6VL+mThcVHOwVGAVUIn+X4Q285H1DJ3P70cWn5ZjTdTe3D3sJ2m8EfagwUesObv80ZVyBOKLYDuD1IwsFXtCodLpthlXZqkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Qt5sY+69iFdWhYtSvBW+8DAmK/LwdqmHzTDXnB1qXBclbb3VQ80Pje1PtGwW/oKfJq7w46wspqRFT0LPQwcMUDIh9IcCw41yZJhdd73cTUjiO1G+UQ/ofxNsDTzAsJNoahU2EbkBDGdzJYBXmCjldX0Lxe7m+igNBIm+7kt35iU= Received: by 10.100.138.2 with SMTP id l2mr891658and.1178138709984; Wed, 02 May 2007 13:45:09 -0700 (PDT) Received: by 10.100.141.14 with HTTP; Wed, 2 May 2007 13:45:09 -0700 (PDT) Message-ID: <790a9fff0705021345j2ad9ae98o56aaf357d556fe27@mail.gmail.com> Date: Wed, 2 May 2007 15:45:09 -0500 From: "Scot Hetzel" To: emulation@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_18673_30011306.1178138709916" Cc: Subject: linuxolator: LTP lseek03 failure 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: Wed, 02 May 2007 20:45:11 -0000 ------=_Part_18673_30011306.1178138709916 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have investigated the new LTP test failure for lseek03, and the first test sets whence to 4 (SEEK_HOLE): test 1 lseek(tfile_1554, 1, 4) Failed, errno=25 Inappropriate ioctl for device, expected 22(EINVAL) I looked at linux lseek man page and it showed only the SEEK_SET, SEEK_CUR, SEEK_END as valid values for whence. I then did a search, and while I did find mailing list archives that did have programmers trying to implement the SEEK_HOLE, SEEK_DATA extentions to lseek. But it hasn't been commited to the latest linux kernel (linux-2.6.21.1 from kernel.org). I have created a patch for lseek and llseek that limits whence to SEEK_SET, SEEK_CUR, SEEK_END. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised. ------=_Part_18673_30011306.1178138709916 Content-Type: text/x-diff; name=lseek.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_f1837tf0 Content-Disposition: attachment; filename="lseek.patch" LS0tIGNvbXBhdC9saW51eC9saW51eF9maWxlLmMtb3JpZwlUdWUgQXByIDEwIDAwOjIwOjA4IDIw MDcKKysrIGNvbXBhdC9saW51eC9saW51eF9maWxlLmMJV2VkIE1heSAgMiAwOTo1NDoyMCAyMDA3 CkBAIC0yMzAsMjUgKzIzMCwzNiBAQAogaW50CiBsaW51eF9sc2VlayhzdHJ1Y3QgdGhyZWFkICp0 ZCwgc3RydWN0IGxpbnV4X2xzZWVrX2FyZ3MgKmFyZ3MpCiB7Ci0KLSAgICBzdHJ1Y3QgbH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lZmF1bHQ6CisJICAgIGVycm9yID0gRUlOVkFMOworCX0KKworCXJldHVybiBlcnJv cjsKIH0KIAogaW50CkBAIC0yNjksNyArMjgwLDE3IEBACiAJYnNkX2FyZ3Mub2Zmc2V0ID0gb2Zm OwogCWJzZF9hcmdzLndoZW5jZSA9IGFyZ3MtPndoZW5jZTsKIAotCWlmICgoZXJyb3IgPSBsc2Vl ayh0ZCwgJmJzZF9hcmdzKSkpCisJLyogbGludXggb25seSBzdXBwb3J0cyBTRUVLX1NFVCwgU0VF S19DVVIsIFNFRUtfRU5EICovCisJc3dpdGNoKGFyZ3MtPndoZW5jZSkgeworCWNhc2UgU0VFS19T RVQ6CisJY2FzZSBTRUVLX0NVUjoKKwljYXNlIFNFRUtfRU5EOgorCSAgICBlcnJvciA9IGxzZWVr KHRkLCAmYnNkX2FyZ3MpOworCSAgICBicmVhazsKKwlkZWZhdWx0OgorCSAgICBlcnJvciA9IEVJ TlZBTDsKKwl9CisJaWYgKGVycm9yKQogCQlyZXR1cm4gZXJyb3I7CiAKIAlpZiAoKGVycm9yID0g Y29weW91dCh0ZC0+dGRfcmV0dmFsLCBhcmdzLT5yZXMsIHNpemVvZiAob2ZmX3QpKSkpCg== ------=_Part_18673_30011306.1178138709916--