From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.1 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.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 06A031F54E; Sat, 9 Jul 2022 08:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1657354138; bh=/MJ0wtDeofrSgcQPJZ59Ze7wSCBAcx0yPzTrtNkSsJw=; h=From:To:Subject:Date:From; b=It8crdN6NESIswId8hRPyX/e+9W4Dj5n6DEUYOTH24FX1ikhhuNbSsYFKKvGxeVvj 9QspHZ6NjWmIDf+zz4BqrEzc2+Cbjz9J4GZJDOcxK1UN5SdZkcmNfsr5fGHZrCsbsx vAiu18Tjoi0TBw44AZtJbCjuWW2ffsgVBCX8SvTU= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] test_common: avoid uninitialized warning on readlink Date: Sat, 9 Jul 2022 08:08:57 +0000 Message-Id: <20220709080857.1289271-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Of course, waiting for inotify to become active can't rely on inotify, so we need to do a busy loop here, instead... --- lib/PublicInbox/TestCommon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 943dd2fa..ecf7a261 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -378,7 +378,7 @@ sub wait_for_tail { my @ino; do { @ino = grep { - readlink($_) =~ /\binotify\b/ + (readlink($_) // '') =~ /\binotify\b/ } glob("/proc/$tail_pid/fd/*"); } while (!@ino && time <= $end and tick); return if !@ino;