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 5/9] tests: Skip mkdtemp test for invalid template on Darwin. Date: Sat, 10 Aug 2024 00:54:31 +0200 Message-ID: <20240809225435.19028-5-~@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="22855"; 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:56:29 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 1scYX6-0005kS-Uy for guile-bugs@m.gmane-mx.org; Sat, 10 Aug 2024 00:56:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scYWI-00061r-Hc; Fri, 09 Aug 2024 18:55:38 -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 1scYWF-0005zg-Dn for bug-guile@gnu.org; Fri, 09 Aug 2024 18:55:35 -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 1scYWF-000211-4I for bug-guile@gnu.org; Fri, 09 Aug 2024 18:55:35 -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=6lC/USQ3Ga4jtD4/ISoVU1INUKPpB+mb4oTVBDnLBiY=; b=W95gsIamxf5I4LcgxDLFJNhktIby2NFLQDf8FAb9HFOc/UgDm0h0SWC4x05X+pl+hoD5ROq9L5b8hiqAS4YJyUURAgGCmAPD/rjuH1YUJWGry9VoweH9dbFzKGaX0gYHdPd9oGlGDybtoZXFXplaGypIA97PJp29j4S1GnzEIyUL4uEI/BXUYdQt+IA33oK0z772Sa2mNPO4m9nNxljiGFfyk7Kc9tSn9wAItJlr3G5W/669KBX/ugoWO1HPgfdMEitT2Aj392LaDmdp/ki0YLw7XgZvhJVTaMfeN7bHIVnZ9pXfUqNnq8twsNxCjABPF9Fb66Y1l+cm34Y4Q4ngag==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scYWh-00088I-IT for bug-guile@gnu.org; Fri, 09 Aug 2024 18:56:03 -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:03 +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.172324411831138 (code B ref 72547); Fri, 09 Aug 2024 22:56:03 +0000 Original-Received: (at 72547) by debbugs.gnu.org; 9 Aug 2024 22:55:18 +0000 Original-Received: from localhost ([127.0.0.1]:38739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scYVx-000864-Po for submit@debbugs.gnu.org; Fri, 09 Aug 2024 18:55:18 -0400 Original-Received: from wolfsden.cz ([37.205.8.62]:33540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1scYVs-00084t-Af for 72547@debbugs.gnu.org; Fri, 09 Aug 2024 18:55:12 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id 380812A819F; Fri, 9 Aug 2024 22:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723244083; bh=E73957PmOrjZ+M/Wd5j0gEzayfp1Gy7P0DJTS2LjeaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BGNg4wi7mtGe1SqJUXN5wFBKXL3T/JHH627IuWs7Bjmt6nSug4lwVdc6uve1kNRSA eBIg5SFtVZ0OAINiaGKcdSkEOSg1lktdv30/WeleMdk/cp8r92Y+ss6lvAV/UmDU3A 4XcO0+/j6KlaiZubuRfep/lMHqlbDu3VfubBQkDemCYKT1bfpys1LBbnKUeBZufM2A 3EbvDPQxAVBFuNJISpA1IGBXlnM0M1DhgKrZRL4LbvakTIx0CQMacESsgnC4oM1Py1 VNnPTMOPoAAMI7P/uEb/SizrX0A3O8nVnC2prMVLEF+lWxilDK352LK7dtjz9dNgoh 5WT1gmVJgr6Uk/3QmzO5fr3IP9T/clQBxcflUSaxoOChxcZK69uy+dYw6aVbx2/Q1d pW4QpOXtPrSUr+yUf26CJXa20+bsycBAngYF6OyYAXZC/MW5xesgZ4UrQcrQeEQF9n nHJmUxDZKNpMVgCrPLD8XJVfXije9qv9E3AjCKF+PbyqkfMi0gYSKWuIGaoGDi/ox1 MOHi+QvMvY5mNE447AtGvl8DVBP/9Ozf5BD48N6i/DihIP8htKQEx3MPXBpM8JhxqL QDV0693fteTNiIi5mh3A76+zpt7zOqYK9lfkwbEX7hT5EbLHPbi33YHQqlo+2jHkjg XEuy57GWn0+Yl9REj9BRC46Q= Original-Received: from localhost (unknown [146.70.134.146]) by wolfsden.cz (Postfix) with ESMTPSA id D75DE2A981C; Fri, 9 Aug 2024 22:54:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723244083; bh=E73957PmOrjZ+M/Wd5j0gEzayfp1Gy7P0DJTS2LjeaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BGNg4wi7mtGe1SqJUXN5wFBKXL3T/JHH627IuWs7Bjmt6nSug4lwVdc6uve1kNRSA eBIg5SFtVZ0OAINiaGKcdSkEOSg1lktdv30/WeleMdk/cp8r92Y+ss6lvAV/UmDU3A 4XcO0+/j6KlaiZubuRfep/lMHqlbDu3VfubBQkDemCYKT1bfpys1LBbnKUeBZufM2A 3EbvDPQxAVBFuNJISpA1IGBXlnM0M1DhgKrZRL4LbvakTIx0CQMacESsgnC4oM1Py1 VNnPTMOPoAAMI7P/uEb/SizrX0A3O8nVnC2prMVLEF+lWxilDK352LK7dtjz9dNgoh 5WT1gmVJgr6Uk/3QmzO5fr3IP9T/clQBxcflUSaxoOChxcZK69uy+dYw6aVbx2/Q1d pW4QpOXtPrSUr+yUf26CJXa20+bsycBAngYF6OyYAXZC/MW5xesgZ4UrQcrQeEQF9n nHJmUxDZKNpMVgCrPLD8XJVfXije9qv9E3AjCKF+PbyqkfMi0gYSKWuIGaoGDi/ox1 MOHi+QvMvY5mNE447AtGvl8DVBP/9Ozf5BD48N6i/DihIP8htKQEx3MPXBpM8JhxqL QDV0693fteTNiIi5mh3A76+zpt7zOqYK9lfkwbEX7hT5EbLHPbi33YHQqlo+2jHkjg XEuy57GWn0+Yl9REj9BRC46Q= 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:10946 Archived-At: Darwin accepts any template, as demonstrated here: #include #include int main(void) { char template[] = {'T', '-', 'A', 'A', 'A', 'A', 'A', 'A', '\0'}; char *res = mkdtemp(template); puts(res ? res : "(null)"); perror("mkdtemp"); } Outputs: T-AAAAAA mkdtemp: Undefined error: 0 This does not match prescribed POSIX behavior, but it is what it is. * test-suite/tests/filesys.test (skip-on-darwin): New procedure. ("mkdtemp")["invalid template"]: Skip on Darwin. --- test-suite/tests/filesys.test | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test-suite/tests/filesys.test b/test-suite/tests/filesys.test index fa8d6f797..72d778145 100644 --- a/test-suite/tests/filesys.test +++ b/test-suite/tests/filesys.test @@ -34,6 +34,9 @@ (define (test-directory2) (data-file-name "filesys-test-dir2.tmp")) +(define (skip-on-darwin) + (when (string-ci=? "darwin" (vector-ref (uname) 0)) + (throw 'untested))) ;;; ;;; copy-file @@ -345,6 +348,8 @@ (= (string-length name) 8))))) (pass-if-exception "invalid template" exception:system-error + ;; MacOS accepts any template and just does no replacements. + (skip-on-darwin) (if (not (defined? 'mkdtemp)) (throw 'unresolved) (mkdtemp "T-AAAAAA"))) -- 2.45.2