From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively Date: Fri, 13 May 2022 15:09:28 -0400 Message-ID: <20220513190928.676841-1-longman@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652468979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g2ByD6HON5FpzuaYZbt0zPasNhNKA4nJl1y1oOF2k0Q=; b=SjxoLXdpDFPhGi0ko2OGGuK8L1VN1p9i1rzFOnvWUcOVBIFi341y5A0tfwHGNYuRpClj/L G417bxGBWefitoQ2MsctqQvG0KMF5zpRr5VXwydUgOpRLKRk3ResbM18KoD4XZ6YywlYS+ +9jVLfnvmcHSi4IBnOFUQ3YAnhd4BFk= List-ID: Content-Type: text/plain; charset="us-ascii" To: Tejun Heo , Shuah Khan Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Phil Auld , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Waiman Long Commit 54de76c01239 ("kselftest/cgroup: fix test_stress.sh to use OUTPUT dir") changes the test_core command path from . to $OUTPUT. However, variable OUTPUT may not be defined if the command is run interactively. Fix that by using ${OUTPUT:-.} to cover both cases. Signed-off-by: Waiman Long --- tools/testing/selftests/cgroup/test_stress.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/test_stress.sh b/tools/testing/selftests/cgroup/test_stress.sh index 109c044f715f..3c9c4554d5f6 100755 --- a/tools/testing/selftests/cgroup/test_stress.sh +++ b/tools/testing/selftests/cgroup/test_stress.sh @@ -1,4 +1,4 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 -./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core +./with_stress.sh -s subsys -s fork ${OUTPUT:-.}/test_core -- 2.27.0