From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Volf <~@wolfsden.cz> Newsgroups: gmane.lisp.guile.bugs Subject: bug#72547: [PATCH 3/9] tests: Skip hole-related port tests on Darwin. Date: Sat, 10 Aug 2024 00:54:29 +0200 Message-ID: <20240809225435.19028-3-~@wolfsden.cz> References: <20240809225435.19028-1-~@wolfsden.cz> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20556"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tomas Volf <~@wolfsden.cz> To: 72547@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Aug 10 00:55:59 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1scYWd-0005BL-1R for guile-bugs@m.gmane-mx.org; Sat, 10 Aug 2024 00:55:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scYWF-0005zP-6V; Fri, 09 Aug 2024 18:55:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scYWE-0005zF-Ds for bug-guile@gnu.org; Fri, 09 Aug 2024 18:55:34 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1scYWE-00020e-4Z for bug-guile@gnu.org; Fri, 09 Aug 2024 18:55:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=NQ2W+gOj/d290RctOfOY7GGXsLcLUV8kpxvKYggrKmA=; b=W5eTFE+5sb+356Ti6/s/gLJc2eD1XzzWjPoQTV1Ci+pgWIEla6ZcOVl7f6XgkeW1Gw24RvuV5odwMAdT49GrtRxAtBN4fVPqe+lQuWlzthCyQyIYVEPJQfzJzvGdUXKMJgwiX6khgXVHitph2FCRW6lGLk8V8BRVvi9igavGu6YlrWam2rQKx8XJwGIZmgTfinu5W7U0cxP0w4Ya3Qg5QD44/44JX/xmWo0hOj6YzEn/hL1WP2PIKuvq/UCvP7HJyM3dc7gXGQZGr0GsOWuKxLRT+xlV5bbZ0txuKfOxfFYLfUxRz/k8gId9Mrqjs/UwlI8x2qVqe0pMo/irnCGn5Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scYWg-000883-H6 for bug-guile@gnu.org; Fri, 09 Aug 2024 18:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 09 Aug 2024 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72547 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 72547-submit@debbugs.gnu.org id=B72547.172324411431098 (code B ref 72547); Fri, 09 Aug 2024 22:56:02 +0000 Original-Received: (at 72547) by debbugs.gnu.org; 9 Aug 2024 22:55:14 +0000 Original-Received: from localhost ([127.0.0.1]:38723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scYVt-00085R-O3 for submit@debbugs.gnu.org; Fri, 09 Aug 2024 18:55:14 -0400 Original-Received: from wolfsden.cz ([37.205.8.62]:33528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1scYVq-00084p-Oa for 72547@debbugs.gnu.org; Fri, 09 Aug 2024 18:55:12 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id A398E2A93CC; Fri, 9 Aug 2024 22:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723244081; bh=0+tf9YYzuSXQBqJaej4g3iDPCw1cjHI2zz8gG+bV1BM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K9NNNNnZG1OJl95tFK5GVoM+hoa9NYmC0VCpTDfssf3NDqAn/Hx+TyS/Z3GufR/gO atC6Vk/2Gnc19OqaBQGxmfF3losrnDCobEIeniErzfza1nMctBlgiI6ci03bpoLT7A QNoKkvUi4E/BwauDJTdGQVh1fHZqNKjACrWhEiNu6L7KJ3yT2jUH15zkB6TMvko0Qo 5SMyn8FG/k4FM2iLL9id2zDDcGSZFSMO/oNvCmKljDdyz0COVyeWVIOaWJNDBXtMq2 CrZgNOWmfdkJkjCtplpgsOrQUT1zOdp2c/OyTR0vVAIqnulSQk/vzqUTqvxYLKo4+p OseZAfP/esQBWn76Sh+e7r7rpXDuVQUdHsZc4a9alMifdvOvq2f95sZdeBsbzWXyqE 5fg4nYiMVQSkHIr2/NEYUCBE8MH8cDUiCsqyQZCze/Lc4xdRc1r9ra4HqET0B8/2av h77xjvq4XNYd/8ohO9KARuFsmK7R0TNnq+JhevKkEUBVVVzdvaauW9lKrjt3zhl4Lv qxz8veAUYMN8BwdY/HSMxSVl/vM0H9e2YZX3nkO//cfMK9jNLf/o96FmMzOUvDDv3K y/U1l3+Naaasj9g9r9TSeBYDc4uUJsTc/5LRhjxl1YbJRIoeq3c6t1Vq0AuF6SJEk+ YoH4P8ulmXZSOqiBUJB2m9Mo= Original-Received: from localhost (unknown [146.70.134.146]) by wolfsden.cz (Postfix) with ESMTPSA id 567642A9219; Fri, 9 Aug 2024 22:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723244081; bh=0+tf9YYzuSXQBqJaej4g3iDPCw1cjHI2zz8gG+bV1BM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K9NNNNnZG1OJl95tFK5GVoM+hoa9NYmC0VCpTDfssf3NDqAn/Hx+TyS/Z3GufR/gO atC6Vk/2Gnc19OqaBQGxmfF3losrnDCobEIeniErzfza1nMctBlgiI6ci03bpoLT7A QNoKkvUi4E/BwauDJTdGQVh1fHZqNKjACrWhEiNu6L7KJ3yT2jUH15zkB6TMvko0Qo 5SMyn8FG/k4FM2iLL9id2zDDcGSZFSMO/oNvCmKljDdyz0COVyeWVIOaWJNDBXtMq2 CrZgNOWmfdkJkjCtplpgsOrQUT1zOdp2c/OyTR0vVAIqnulSQk/vzqUTqvxYLKo4+p OseZAfP/esQBWn76Sh+e7r7rpXDuVQUdHsZc4a9alMifdvOvq2f95sZdeBsbzWXyqE 5fg4nYiMVQSkHIr2/NEYUCBE8MH8cDUiCsqyQZCze/Lc4xdRc1r9ra4HqET0B8/2av h77xjvq4XNYd/8ohO9KARuFsmK7R0TNnq+JhevKkEUBVVVzdvaauW9lKrjt3zhl4Lv qxz8veAUYMN8BwdY/HSMxSVl/vM0H9e2YZX3nkO//cfMK9jNLf/o96FmMzOUvDDv3K y/U1l3+Naaasj9g9r9TSeBYDc4uUJsTc/5LRhjxl1YbJRIoeq3c6t1Vq0AuF6SJEk+ YoH4P8ulmXZSOqiBUJB2m9Mo= X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240809225435.19028-1-~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10940 Archived-At: Hole are itself a file-system specific feature and they are not mandated. While APFS does support sparse files, they do not behave like on Linux. I did not discover exact rules, but the file needs to be large (100s of kB at least) and the holes are not aligned as the test code expects. So just disable them. * test-suite/tests/ports.test (skip-on-darwin): New procedure. ("size of sparse file", "SEEK_DATA while on data") ("SEEK_DATA while in hole", "SEEK_HOLE while in hole"): Skip on Darwin. --- test-suite/tests/ports.test | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test index 7b5b535e7..3fde402b4 100644 --- a/test-suite/tests/ports.test +++ b/test-suite/tests/ports.test @@ -39,6 +39,10 @@ (define (test-file) (data-file-name "ports-test.tmp")) +(define (skip-on-darwin) + (when (string-ci=? "darwin" (vector-ref (uname) 0)) + (throw 'untested))) + ;;;; Some general utilities for testing ports. @@ -185,6 +189,7 @@ (close-port iport)) (delete-file filename)) +;;; Note: Holes are weird on Darwin. (let* ((file (test-file)) (port (open-output-file file))) (seek port 4096 SEEK_SET) @@ -193,10 +198,12 @@ (pass-if-equal "size of sparse file" 4100 + (skip-on-darwin) (stat:size (stat file))) (pass-if-equal "SEEK_DATA while on data" 4096 + (skip-on-darwin) (if (defined? 'SEEK_DATA) (call-with-input-file file (lambda (port) @@ -209,6 +216,7 @@ (pass-if-equal "SEEK_DATA while in hole" 4096 + (skip-on-darwin) (if (defined? 'SEEK_DATA) (call-with-input-file file (lambda (port) @@ -221,6 +229,7 @@ (pass-if-equal "SEEK_HOLE while in hole" 10 + (skip-on-darwin) (if (defined? 'SEEK_HOLE) (call-with-input-file file (lambda (port) -- 2.45.2