Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2526749pxb; Sun, 23 Jan 2022 07:29:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJys+FQwj3+yFID5Jx6kOyuubEGX54TjL4oGPm2bZ9P2FNmriiw2Z51BdmlbWyhu4GVdcE4d X-Received: by 2002:a17:902:e546:b0:14b:4528:c9b0 with SMTP id n6-20020a170902e54600b0014b4528c9b0mr3359654plf.38.1642951740077; Sun, 23 Jan 2022 07:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642951740; cv=none; d=google.com; s=arc-20160816; b=FHLPeYaAXgiQ9Xadfm+0aiQxtL1BrdvoR+73e5VquBtIFHohipyccYPok83RhERi6Q IV1e2It+GbwnOMgA//cVDGi/+TKuftLtQLddi5aL5ovy5Smd/mOd/Uqq30HRrgecjmAE UQmh2168PmK0kXzl1Gc7deJNgDIUxthp31QPOaTmIRuKsmi9JWhQqr9R/fBFLLWRXe7t IBIkJVY6g97MLpobdzALLvYXc4AOpXTPPuqF0IhCdPDbmV5USeW0r4PuTVr5UPGvBya4 Ta7nKav3hWdeJXdfpR51qBuicLXPJG0+vOf9J/iinbTZl0E5U4j99wPzn+dGqnFlqfLG xNnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=joEcAm6FEppBk6vSXt/6xsL1pjGawWUzoE2Kp7Bgaj0=; b=PkOl+UqB3qRz+f6qhC0IUoJoyfiNYfVLdEPcGu4Ry6IJ+XdLXNmEkynvPM+CI3a/Kw 2Yn84XIdUHRV6f5/Ak3SmCZDnGO5uLsD0tBnuYmah9jRNCH7McqAfdqenwwRRfSd0byx Erb8LlNDPYYt9MsJ5rgvtR3eZNEh4vqsZnMjwWQrGlEBy8wVFH7tXbCKYklheQSECCrY /TOthVeqXrOVAM7//q5IQXp1QNT/d0rRRCq6W2VR9hiVFDLmdeRVPhr/o0iMxx1wWWGF Hq7iN1iXYfu+8JciIwEl7MaHODJVTT3+jU52AzlIt3FbwKwSo/Zcg8NArShY2Fu2XYLm mQkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a16vp1dV; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k68si9306905pgk.113.2022.01.23.07.28.47; Sun, 23 Jan 2022 07:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a16vp1dV; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234833AbiAVTuV (ORCPT + 99 others); Sat, 22 Jan 2022 14:50:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbiAVTuU (ORCPT ); Sat, 22 Jan 2022 14:50:20 -0500 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB7DBC06173B for ; Sat, 22 Jan 2022 11:50:19 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id z7so2531519ljj.4 for ; Sat, 22 Jan 2022 11:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=joEcAm6FEppBk6vSXt/6xsL1pjGawWUzoE2Kp7Bgaj0=; b=a16vp1dVqQtBMXJ/X4AfLFJDZJjkr1WEJrlJkBqoDbliRzQxlEPMmxZbcvliANiNNP YiQhlusGLXXRaRkheXm0pdoyestYgVwMiD+1AEB1ieEYBWf0sIy2PFWNBHzxg1wNu+v5 iwpeRTTTuPwssKUMNHM8ckE9qH+qInFQIiyi88B5kmQHCV/mOLw5zhBGTAJAyQbBBPXg jt+RvW/O7h4mcz/Th6TbvqYzbUklhI+Xi1k3AAwFLBG4/u4O/NzKKVjD8v2lNictNggx k60vjRbRpu7FiBWtHXAT0X5Fo4OAOAs6U5SXkeJhCRy/ojHyxeWfvXwW6WhPvUw8Ucjf SMOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=joEcAm6FEppBk6vSXt/6xsL1pjGawWUzoE2Kp7Bgaj0=; b=1jxRasYLusaC6UkE3VEJsES4zuZAH7LcECKJ/udMfxps+f8K9xUrQAiOUy1/W9rP/A 7e73cAeHavBxWF4uA2M26TKFGJloZdC48lNq3Rqy1BawJu5o4o52aGZOqxly6ZBvmQHJ lj7OtSyFkxAKbXcvKZkb70Gpuzv+byZthe6g62qZCRt1uHJwb7gr0VI3R0lVbU5mQSRC TrLQYSn78UUZLybDpVWPvV2lhXCSHKy237chtMnG6AXQ8DTkazrBZMxX7GK+2n3blFUM UUJuYvD+T0bkb2eoOgdbd1bvSl9ZbDKkgITl8jq6bmckZW3UaX6lhpE3WsV3qHlvVtuv HA8Q== X-Gm-Message-State: AOAM532M81VfsCGgYTqvkOzMfvf0iS01koVmDESwORd5bU+Mo2/5Ovig N3DbcFGsGPWLoRYWuxmUiO4= X-Received: by 2002:a2e:3c06:: with SMTP id j6mr6923600lja.484.1642881018146; Sat, 22 Jan 2022 11:50:18 -0800 (PST) Received: from elende (elende.valinor.li. [2a01:4f9:6a:1c47::2]) by smtp.gmail.com with ESMTPSA id x9sm78624lfn.282.2022.01.22.11.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 11:50:17 -0800 (PST) Sender: Salvatore Bonaccorso From: Salvatore Bonaccorso To: Steve Dickson Cc: linux-nfs@vger.kernel.org, Jeff Layton , Ben Hutchings , Salvatore Bonaccorso Subject: [PATCH] nfs-utils: tests: Skip test if /dev/log is missing Date: Sat, 22 Jan 2022 20:49:33 +0100 Message-Id: <20220122194932.118951-1-carnil@debian.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Ben Hutchings Some build environments don't have a /dev/log, without which the daemons will fail to run. * Add a check_dev_log function to skip a test if it's missing * Call it in t0001-statd-basic-mon-unmon.sh Signed-off-by: Ben Hutchings Signed-off-by: Salvatore Bonaccorso --- tests/t0001-statd-basic-mon-unmon.sh | 3 ++- tests/test-lib.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/t0001-statd-basic-mon-unmon.sh b/tests/t0001-statd-basic-mon-unmon.sh index 92517a144851..e1065e766ccc 100755 --- a/tests/t0001-statd-basic-mon-unmon.sh +++ b/tests/t0001-statd-basic-mon-unmon.sh @@ -21,8 +21,9 @@ . ./test-lib.sh -# This test needs root privileges +# This test needs root privileges and /dev/log check_root +check_dev_log start_statd if [ $? -ne 0 ]; then diff --git a/tests/test-lib.sh b/tests/test-lib.sh index e47ad13539ac..b62ac2a6db4d 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -37,6 +37,15 @@ check_root() { fi } +# Most tests require /dev/log. Skip the test if it doesn't exist in this +# environment. +check_dev_log() { + if ! [ -e /dev/log ]; then + echo "*** Skipping this tests as it requires /dev/log ***" + exit 77 + fi +} + # is lockd registered as a service? lockd_registered() { rpcinfo -p | grep -q nlockmgr -- 2.34.1