From patchwork Sat Apr 6 12:24:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 13619791 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5089F1EB48; Sat, 6 Apr 2024 12:25:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712406316; cv=none; b=EA/8j8iHGpH+7LvygnGRj93LpQgXBZ04lrn1NnWm3LFwg+YV/AAATDH08UwYoNX3z2QAiSCLZFYM6Ce/0vq4ZpUAcwU8/mLXl77li26HB9Kf0osYoWA8fJGFsF9pc+y0x1wAhCSTcBmPGXzZ/dzcha2sMn5G/J3o5w0K7VkXSxo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712406316; c=relaxed/simple; bh=Q+eBoy/MFKQuds7bZTpcG4/XovpckV3SPTeBQ3aXuYA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y1/Muzhd3PuH0aZSUuSVEfzX0KT6q+zwRVDv07RHivcW4E+omS8rTlK8/IvNM/KjKN1pbqSMLwH7jgDpZw1QV76o/ZYN8neEpQHfa9lyZ5oJj7JdJrAhQiBpF42HPQV+LIdJspVSAatQB+KjAuXvp1gF8cNhiKR4J1CU7On0SGA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hM4B1TxU; arc=none smtp.client-ip=209.85.210.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hM4B1TxU" Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6e9f3cff7bdso1442756a34.1; Sat, 06 Apr 2024 05:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712406314; x=1713011114; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GtrgcjAXxyl9IcRCUQpzTPmKOZ9sQrlIWm2leuvIbQ4=; b=hM4B1TxUyHuM2rywu+Nwy9ozakhe1p/BmPxsK9FTzOhOU/7G7mJBELflGD8K3KTAUE 4smyPmvnkgTiKXeuTA/g4X4j8psF1JuWeCAMNqaEciSkh/Rcp3Ho37wojbH1aYs93gve kJtaMbJrI/djjUv5bca9RITsssHKn84ec5YyjrQfuyUbT2fgF9y3N9pyVoZqv33CHvEH iiZ539xxJbvjiwvXTHKGNoPE8saIixizR/VdeqIMqnYQTWX4X3TQ/vDgYARJOLRpNO11 6n3GNKnNpsxFaTS4x6aJKpb68JEpKI+Q+CsuRI4LxyBQHofhUkLIblS+bSLpmBeacWWO M6QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712406314; x=1713011114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GtrgcjAXxyl9IcRCUQpzTPmKOZ9sQrlIWm2leuvIbQ4=; b=ueFq6Rrz+GrmJDp6DHvPpCbGB3h/hNox2gq5LZHA2J8gDD3r0uyeZpn5y3EADw5rgp JqBuhqLFs5TZN1bh3Fufr4rh90Smeuf9p3DVzeDJV4Upvh3DfJ0nX2+8sanfpvhesa2J OsKPWhc3Zt6157POi15sf/5Q3cW+Fk+yHdHZ6iToJhOvk2QSvlBn9sPFXqsMJfZEXyt+ z/4MJPKaKb7RB50p6AabsbGSXhOIvRKMiqrpqEe9UlIzCZ+z6FA08iH5br15FnMFlrSR A5eZgJ41uyrXQIBYp4ItgWHw1bLe7gx9YFRraki8iYScXrjUE8/aU3ECYq05d7hqXv/x 3zYQ== X-Forwarded-Encrypted: i=1; AJvYcCXGG/eOTaPL3sW6nv04bQ49nLG4tI+K7X2SJaUi5DGBDa+K4MGRqZah521vJpW/x2jv3es24i1m9qcND7NywkwG2qFpIoLuo1nlWjnPrHkfEzOPneeqVCSKkzwYUNcgWw== X-Gm-Message-State: AOJu0YwCYbY+CMLJkbkSmvFR+TWJgIrVBE6Xq5uQoMpwoNmfJfYjqO9o ATlXaWggi2p/eM308+b1BBHBW1i4SbWTle98em64H3+tL6a+QWRP X-Google-Smtp-Source: AGHT+IHE7+2OFtft9EyXmh1fPnN0myNepRSS8xrjXZnuY+TaYVaeFGrzs6ySqC69HvlgodJ9XcXorw== X-Received: by 2002:a05:6870:4724:b0:22e:df68:ebcf with SMTP id b36-20020a056870472400b0022edf68ebcfmr3838890oaq.56.1712406314211; Sat, 06 Apr 2024 05:25:14 -0700 (PDT) Received: from wheely.local0.net (124-169-104-130.tpgi.com.au. [124.169.104.130]) by smtp.gmail.com with ESMTPSA id g14-20020aa7874e000000b006e69a142458sm3091392pfo.213.2024.04.06.05.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 05:25:13 -0700 (PDT) From: Nicholas Piggin To: Thomas Huth Cc: Nicholas Piggin , Janosch Frank , Claudio Imbrenda , =?utf-8?q?Nico_B=C3=B6hr?= , David Hildenbrand , Andrew Jones , linux-s390@vger.kernel.org, kvm@vger.kernel.org Subject: [kvm-unit-tests PATCH 1/2] s390x: Fix misspelt variable name in func.bash Date: Sat, 6 Apr 2024 22:24:53 +1000 Message-ID: <20240406122456.405139-2-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240406122456.405139-1-npiggin@gmail.com> References: <20240406122456.405139-1-npiggin@gmail.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The if statement is intended to run non-migration tests with PV on KVM. With the misspelling, they are run on KVM or TCG. Reported-by: shellcheck SC2153 Reviewed-by: Andrew Jones Signed-off-by: Nicholas Piggin --- scripts/s390x/func.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/s390x/func.bash b/scripts/s390x/func.bash index 6c75e89ae..fa47d0191 100644 --- a/scripts/s390x/func.bash +++ b/scripts/s390x/func.bash @@ -21,7 +21,7 @@ function arch_cmd_s390x() "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" # run PV test case - if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; then + if [ "$accel" = 'tcg' ] || grep -q "migration" <<< "$groups"; then return fi kernel=${kernel%.elf}.pv.bin From patchwork Sat Apr 6 12:24:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 13619792 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9BFD1EB48; Sat, 6 Apr 2024 12:25:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712406321; cv=none; b=reoaqVj6ppNOtVfIJ1ln6sspgOgVQJ31lNiA4qEwXFb1Q6/CCkP2a+KVWPbOuQbwKMM0k27K5DM5YJFmFpZgo3dTnWWCCaJMF74LKRly4DWGTCG97dKflGnXSwdFW7CvjDwneRLh1ss4l5cqjThq4iuFHJ1e8OTr4fvZFbh9d+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712406321; c=relaxed/simple; bh=BxWK7NEwn5ck4UeEMX33/rVqqkBLkS9af6vrGYtg1oA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sWseJGLEIrM2Wnnokg9U1ii0u9MGQjYJRZZ07UUG2XD5I++Ig95s8FyVQjjoI1dhvVVFpiLW5WA2Dl2WYX4UbySrNQULEvMpaNZ8YlmEwzX0Bsfm+Dn5glzYoP+qMwuNVtxkna40K2CCwCIgv4QvGngwQHgbJUsXD42dXF00rDQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ilL4JOsm; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ilL4JOsm" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6ecee5c08e6so2784018b3a.3; Sat, 06 Apr 2024 05:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712406319; x=1713011119; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XSK5UQTlMV1ztZkWhZqfur2IVdnbon/itN8WGbHBLUI=; b=ilL4JOsmSMYi3vjJUMuiQDcNoOcEEuca4/Iw4oZFKyYx9pAEuQ2YazHbJlXqvO5bgt CLb1rIkmsbWlreU6STze1i2b23bvLaHJiMPeolGaa1YfNqTc6QKk2g8oi50G5tPWuDeW Y1NDGDA5FwEHA/UBJd8nqZVVLsvXBf8+Fik7YboSsSDDKJCdKsY7boPJJC++Y6LcbTrF q+PBkwMjbIDbxghTCZJrkVF5vophNazCEf7NIqHmYdYzycxYIwg7zPruekDHQ5hB7ytA RpEezFXzUJkTRXXngedZAddxT9Nso2OzErRbx8zxXQbwtmowRJbg8fUD5Q2ZG2fnpCDr GL1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712406319; x=1713011119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XSK5UQTlMV1ztZkWhZqfur2IVdnbon/itN8WGbHBLUI=; b=LzhXe+FknQpIY62rOIbIaF9tFq188EMGgiulgSwadwKKKERRt2Sk7fib5ovKmfYdbd UeUMNIjJW0bXMaf2N38U/VIp4rvQcIAi1oovc2YRjIMwkF2fPtDwBYymxL2icLKgUegg aJ/iB8iSztKv2lzG3kkifLRGSHy6r1RA8kVggmiAilIgdXM6h4PrjrTVqtWL2cPH61yD fl4t950E7W2rkDQaKiqQ05eL94K/ogHOaP8coEbxYfghVImZU/HGTX6rtNeMsCrbOIR7 vGxnxZOmZS+QBsI1LajqA9dqVwN778dKEDBGG6bUackq7raSh0GGmhYC8RPRnrwkMzkO gvOw== X-Forwarded-Encrypted: i=1; AJvYcCWcBHiRmiBbK/WUADAUokudtyaKFsapmKmqB4LMKArS61r5bI20S4YXHX/7ioe2e0N0wkudI23vwmCQ0KfKxncCFGDobK7jKKdtNKT/HtHNY18dZF78k3jaHdZqd8VNXA== X-Gm-Message-State: AOJu0Yxr+4QVoiILZiJA4ioogR3d4zo+mYltaCnZeyFj6sAFHUB6Oiij dmFOztGhP1asoGFKV1qTp43MTTccdmBB9DnjrW5YNQhmIrKhZOOx X-Google-Smtp-Source: AGHT+IHH9djoXOEB0pvV/E3DdN1MJ+EuiicIYZd2KCoHyCuZheUsRvIoq2ET5GfONXO6xOufxIcdyw== X-Received: by 2002:a05:6a00:2355:b0:6e6:9c79:87e9 with SMTP id j21-20020a056a00235500b006e69c7987e9mr4877242pfj.34.1712406318770; Sat, 06 Apr 2024 05:25:18 -0700 (PDT) Received: from wheely.local0.net (124-169-104-130.tpgi.com.au. [124.169.104.130]) by smtp.gmail.com with ESMTPSA id g14-20020aa7874e000000b006e69a142458sm3091392pfo.213.2024.04.06.05.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 05:25:18 -0700 (PDT) From: Nicholas Piggin To: Thomas Huth Cc: Nicholas Piggin , Janosch Frank , Claudio Imbrenda , =?utf-8?q?Nico_B=C3=B6hr?= , David Hildenbrand , Andrew Jones , linux-s390@vger.kernel.org, kvm@vger.kernel.org Subject: [kvm-unit-tests PATCH 2/2] s390x: Fix is_pv check in run script Date: Sat, 6 Apr 2024 22:24:54 +1000 Message-ID: <20240406122456.405139-3-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240406122456.405139-1-npiggin@gmail.com> References: <20240406122456.405139-1-npiggin@gmail.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Shellcheck reports "is_pv references arguments, but none are ever passed." and suggests "use is_pv "$@" if function's $1 should mean script's $1." The is_pv test does not evaluate to true for .pv.bin file names, only for _PV suffix test names. The arch_cmd_s390x() function appends .pv.bin to the file name AND _PV to the test name, so this does not affect run_tests.sh runs, but it might prevent PV tests from being run directly with the s390x-run command. Reported-by: shellcheck SC2119, SC2120 Reviewed-by: Andrew Jones Signed-off-by: Nicholas Piggin Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank --- s390x/run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/s390x/run b/s390x/run index e58fa4af9..34552c274 100755 --- a/s390x/run +++ b/s390x/run @@ -21,12 +21,12 @@ is_pv() { return 1 } -if is_pv && [ "$ACCEL" = "tcg" ]; then +if is_pv "$@" && [ "$ACCEL" = "tcg" ]; then echo "Protected Virtualization isn't supported under TCG" exit 2 fi -if is_pv && [ "$MIGRATION" = "yes" ]; then +if is_pv "$@" && [ "$MIGRATION" = "yes" ]; then echo "Migration isn't supported under Protected Virtualization" exit 2 fi @@ -34,12 +34,12 @@ fi M='-machine s390-ccw-virtio' M+=",accel=$ACCEL$ACCEL_PROPS" -if is_pv; then +if is_pv "$@"; then M+=",confidential-guest-support=pv0" fi command="$qemu -nodefaults -nographic $M" -if is_pv; then +if is_pv "$@"; then command+=" -object s390-pv-guest,id=pv0" fi command+=" -chardev stdio,id=con0 -device sclpconsole,chardev=con0"