From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B1A731F47A for ; Mon, 19 Aug 2024 20:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1724100406; bh=8W7ektM+gu9nF4lf8rNSeYPtBl+bjrQuKZRl8sw9Yqw=; h=From:To:Subject:Date:From; b=XDAh3MihtU/Xkpn1SfDn6Fq8foXiok0JtYJXCQrGJhRdrfxbkvPJETidHF+jvwhqU FNTmMJLsUQkwPS2B1MVsjAflFTWaczdYhruvxEMcdggnPNeTA73ppXUFBQvVU2HNs5 azuWPxbF/dFkSFVbArUum9IvLgluszp8f623KtsY= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/inotify3: fail gracefully on unsupported arches Date: Mon, 19 Aug 2024 20:46:36 +0000 Message-ID: <20240819204636.204484-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: New architectures will inevitably appear or lose support, so ensure we fail gracefully here with some hopefully helpful messages. --- t/inotify3.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/inotify3.t b/t/inotify3.t index c25c0f42..27875599 100644 --- a/t/inotify3.t +++ b/t/inotify3.t @@ -2,7 +2,18 @@ # Copyright (C) all contributors # License: AGPL-3.0+ use v5.12; use PublicInbox::TestCommon; +use Config; +use POSIX qw(uname); plan skip_all => 'inotify is Linux-only' if $^O ne 'linux'; +unless (eval { require PublicInbox::Inotify3 }) { + my (undef, undef, undef, undef, $machine) = uname(); + diag ''; + diag "\t$_" for (split /(?'; + diag "$_ => $Config{$_}" for qw(ptrsize sizesize); + plan skip_all => "inotify constants not defined on $machine"; +} + use_ok 'PublicInbox::Inotify3'; my $in = PublicInbox::Inotify3->new; my $tmpdir = tmpdir;