From patchwork Tue Apr 5 07:52:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12801197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86968C433F5 for ; Tue, 5 Apr 2022 08:03:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232986AbiDEIEx (ORCPT ); Tue, 5 Apr 2022 04:04:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235573AbiDEH7v (ORCPT ); Tue, 5 Apr 2022 03:59:51 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F13A040E7D; Tue, 5 Apr 2022 00:55:44 -0700 (PDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2357RYH7021346; Tue, 5 Apr 2022 07:55:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=PfnptPpQ7BG3PrwQg2j8SGjdDEm+bSFa0faG4SSKNBg=; b=ixn0HsGfIxHNrN4rYoYqZEWWbz4qGDWlfjjekfWnHTK4FZVsBl66/g1AuALL+lC+H8xP WjAFSGl+xjcaAzy5SfGOHwjXOftV2HyARCRZYm8aLV0mY9NwXx6tE2alDkBhFRN54Phs YG+OXTWtnA0AnrFXgkyXh0t2z5nsGHsGbUom+prEn3IKGsIMQz19YJ+Ut/XvFPwCrkQH ElTCoha5+yjpNCWxRA49LNty61VESB7LL/nvNXsGCN+X8hhnH54lRcD2XNhbOU/mpbmX f3bTNm775xyvVBVg2db6Nx5mbLaDMQP8gU9CNLEDiFFnDFO8Lbtt2Az5JRmSbWYM/9Ce fA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f8e5dky02-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Apr 2022 07:55:43 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 2357Te2s011108; Tue, 5 Apr 2022 07:55:43 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f8e5dkxyr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Apr 2022 07:55:43 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2357hJjW020539; Tue, 5 Apr 2022 07:55:41 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04fra.de.ibm.com with ESMTP id 3f6e48v9yp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Apr 2022 07:55:41 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2357hPF752101572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Apr 2022 07:43:25 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A30D42042; Tue, 5 Apr 2022 07:55:38 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E98F4203F; Tue, 5 Apr 2022 07:55:37 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 5 Apr 2022 07:55:37 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, david@redhat.com, thuth@redhat.com, nrb@linux.ibm.com, seiden@linux.ibm.com Subject: [kvm-unit-tests PATCH 1/8] s390x: css: Skip if we're not run by qemu Date: Tue, 5 Apr 2022 07:52:18 +0000 Message-Id: <20220405075225.15903-2-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220405075225.15903-1-frankja@linux.ibm.com> References: <20220405075225.15903-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: cOcOpqddLCvj-KeRP0M4lEA6EswUa21y X-Proofpoint-GUID: 8XI_r9_EdpNd-fEu7Ufjo3EDGysY-Qaz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-04_09,2022-03-31_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 spamscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 impostorscore=0 phishscore=0 malwarescore=0 mlxlogscore=779 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204050044 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org There's no guarantee that we even find a device at the address we're testing for if we're not running under QEMU. Signed-off-by: Janosch Frank --- s390x/css.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/s390x/css.c b/s390x/css.c index a333e55a..52d35f49 100644 --- a/s390x/css.c +++ b/s390x/css.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -641,6 +642,12 @@ int main(int argc, char *argv[]) { int i; + /* There's no guarantee where our devices are without qemu */ + if (detect_host() != HOST_IS_KVM && detect_host() != HOST_IS_TCG) { + report_skip("Not running under QEMU"); + goto done; + } + report_prefix_push("Channel Subsystem"); enable_io_isc(0x80 >> IO_SCH_ISC); for (i = 0; tests[i].name; i++) { @@ -648,7 +655,8 @@ int main(int argc, char *argv[]) tests[i].func(); report_prefix_pop(); } - report_prefix_pop(); +done: + report_prefix_pop(); return report_summary(); }