Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp533107lqh; Sat, 4 May 2024 10:42:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWk0m/hCmPVZuVwSuaSMPLkOmXCwcDFLS3pw8LAmXJkUwM3rJLAviDrqjgPv+nHZk1M42Ls1a6cbzbP5PgVVUS6p6Omo1cEPKd9MgFAKg== X-Google-Smtp-Source: AGHT+IHWsM+nxSrzQgewF7A891zjHHSVy9pDpcwasAuOoyWyPnEkX+UJwUsIpdg4swfSk99f5GJk X-Received: by 2002:a05:6a21:3e02:b0:1ae:42f1:7e52 with SMTP id bk2-20020a056a213e0200b001ae42f17e52mr7191149pzc.6.1714844571719; Sat, 04 May 2024 10:42:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714844571; cv=pass; d=google.com; s=arc-20160816; b=UQst2kHanUCF3lIbgI7NSEO7ee9jL4iJwgW6VtA0K/pfpRjc+3mrfuwydewUplHu9v p9kcjlHDsQVl7ojYnrd+PxPGkZuWqs092MyXzZbz8eVD1F59w4RQA9lKHDcK0lYNqHy6 ncddjtonqA4UIVslD2yKQRV5ym+HuVylM7hNegNGJC786k/9lzpUoIJzZDrDBjd1F35W oiGqYbbe81ANSUlUJeVCtd+GxAvyTY1y8vWol0lKfEw3hLwbhNigdaulJXl+P9lsfJ19 73Mtsu3XNj6zfOJiE6ZuTOoGSEFG/5frbKLpwoUoMp469SfY28CagpXeExY2Wt3tzase s8QA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=jpE/T4reKNN0TjZjzma3pJGD7oQ/y6KQNVR18TE2jYU=; fh=K2JdjepNxnYEp+0K8P5NrG551St9rqv5yGV8PT17ZGo=; b=ITIEoDGBgKUS5bUXK9J0Qg27b3hPuS8VlJY7LMVahlYIsaGlaw8kE6LwXlfFwNrY8Y JqBdPe2734CtYjxQMrMNEYHig8yTINXt6RkAh4+iHOldEUPyssdUvMld5xVBmOrcUAMF e1HfFsYEW50SHLBktrq5F6E8nWtI5gseULSGC3Uu1HPnpLTyKV5uhoWDRo/6PoGkQBPH EkCqvuCUpBEDwPXoiFhdmUfCNwdnT5YKLzUIulcqCg1cGQnN7A4V1rYSC1I9r2WSFC4q cR8B/hm9s8qlvyWnVVwUUqizGk97dL3rJ+Sre/00Uu+0+XWhwL3Rn7IXWKqh+nZaABEG cW8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=exordes.com); spf=pass (google.com: domain of linux-kernel+bounces-168771-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168771-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c66-20020a633545000000b0061c2f4c8265si4071290pga.784.2024.05.04.10.42.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 10:42:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168771-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=exordes.com); spf=pass (google.com: domain of linux-kernel+bounces-168771-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168771-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E39C228288E for ; Sat, 4 May 2024 17:42:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5BFE60BB6; Sat, 4 May 2024 17:42:44 +0000 (UTC) Received: from sxb1plsmtpa01-03.prod.sxb1.secureserver.net (sxb1plsmtpa01-03.prod.sxb1.secureserver.net [188.121.53.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0F2E4500E for ; Sat, 4 May 2024 17:42:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.121.53.29 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714844564; cv=none; b=vBUI2neL5AWLWSU9pL+b8iqM+ejxzMZBDLMzCgsVCZJ/ZTdI0GZ4MUWf4121Gya5J4F77PNBJfafT4ASTda5W2AllVkhnepypoBAp69d/n3KRn3Wj+cbbdxK4s80SxaCgGjQ736dHs8oRocWbYv14DuwwoFus8ZvwSTwK+2c6ec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714844564; c=relaxed/simple; bh=Gh536ipTsa3kSRdp4xPrYVoj6w/+qTJK/5whOeeBdfU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bo3MpjlcK1IYjuX1/VQx1VDUx/mOUXTwduu/wtmC5kFFCCrKPxWmH4qmxND+SxDrS9vhySzy8VZp+r6OjGVQAXufLQvQJjjf/AOOzKDhzd/TAj0IfvfLhAQxbPZyjnEbvZQ20AAjSb8vwaLTX4rJaUgt2cDMWZOkjJWYkUoq1nM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=exordes.com; spf=pass smtp.mailfrom=exordes.com; arc=none smtp.client-ip=188.121.53.29 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=exordes.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=exordes.com Received: from exordes.com ([87.92.66.153]) by :SMTPAUTH: with ESMTPSA id 3GrzshGfI169Z3Gs2sJEKg; Sat, 04 May 2024 08:00:15 -0700 X-CMAE-Analysis: v=2.4 cv=R+jIGsRX c=1 sm=1 tr=0 ts=66364d80 a=13ZijDARommhillvnyM9pA==:117 a=13ZijDARommhillvnyM9pA==:17 a=eCYXQZmkAAAA:8 a=C8WjyCjYx6-4fln_c68A:9 a=77AlN4CNbnqoG63BkLSu:22 X-SECURESERVER-ACCT: dai.lu@exordes.com From: Lu Dai To: shuah@kernel.org Cc: Lu Dai , javier.carrasco.cruz@gmail.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests: kselftest_deps: fix l5_test() empty variable Date: Sat, 4 May 2024 18:01:06 +0300 Message-Id: <20240504150106.265481-1-dai.lu@exordes.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfKNzjYfLitl7aiLQuyIPRXt3TG++PfnQYp46/ZUycYkdDdafQqAxrYU5sMiaxukYtGuSvBEstHJekNDmJ8QHE4LkPwviwLSsVc5SkJiy3DJ0oJcQxp0j PkL7qoRCYzlSC7jIvDC9tdDUCraZXZ8MEtgP0ndjHhAkhJ44/QVOI8uQ21FN0SFJCBAVKGJOU/gAKhX1/UuRKjisSJ+Jh1fZmylVFg2up2/CGQSuUjVBuIIX SqRMHm4mCeF7DiHAxu9vrTLG+eYeODXMr7QkzokvgTY27jWBNCJfKePyBoO3UD0lY2XYZPcece9bB3feWBsC//Y0pvHACyg+8uH01vmHarQ= In the function l5_test(), variable $tests is empty when there is no .mk file in the subsystem to be tested. It causes the following grep operation stuck. This fix check the variable $tests, return when it is empty. Signed-off-by: Lu Dai --- tools/testing/selftests/kselftest_deps.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kselftest_deps.sh b/tools/testing/selftests/kselftest_deps.sh index de59cc8f03c3..487e49fdf2a6 100755 --- a/tools/testing/selftests/kselftest_deps.sh +++ b/tools/testing/selftests/kselftest_deps.sh @@ -244,6 +244,7 @@ l4_test() l5_test() { tests=$(find $(dirname "$test") -type f -name "*.mk") + [[ -z "${tests// }" ]] && return test_libs=$(grep "^IOURING_EXTRA_LIBS +\?=" $tests | \ cut -d "=" -f 2) -- 2.39.2