From patchwork Thu Apr 21 10:11:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821426 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 7F55CC4332F for ; Thu, 21 Apr 2022 10:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382731AbiDUKQj (ORCPT ); Thu, 21 Apr 2022 06:16:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388197AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B68DA1A6; Thu, 21 Apr 2022 03:13:35 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9dTmg017475; Thu, 21 Apr 2022 10:13:34 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=gTgsdvisl+iE2+03jRWfj/3Yz27I9S9qn+6js90/ncg=; b=ljwbJXN+ebnRj+X3dTg8WPF33wm0w/YzWPNz3ioptwDMw8+UQ11YHolYctBF8pDIdH5G UxSFCIK3tn1mswj7otIWXDTsOaksxZ24cVWbsBbxMyzY3yzk3E8DtTXfwVPKTA77Y5Wy UCMmOgJsE09JoVzNtMP+SC8veQfsBnJu8yVXlO6gcKMUXS9eajWqD9J+HsLvgdRoli81 +s7hFUHGO/kAKg8Oe2SdqUei7kO/qARg4l779R+nHyMqgIwhLfx17Te3Yw0d/MKsLN/w YFXbPXTAYKTQJj3VKOsF1Z+eRrA7RxyaiCZMm0QckIbmbnJot1/A06BeftBcNfrjoGbF Hw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjm2hv2yv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:34 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L9n184007592; Thu, 21 Apr 2022 10:13:34 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjm2hv2xy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:33 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3MKL026794; Thu, 21 Apr 2022 10:13:31 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma05fra.de.ibm.com with ESMTP id 3ffne8x2vg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:31 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADdd754001954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:39 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2560CAE056; Thu, 21 Apr 2022 10:13:28 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59725AE045; Thu, 21 Apr 2022 10:13:27 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:27 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 02/11] s390x: css: Skip if we're not run by qemu Date: Thu, 21 Apr 2022 10:11:21 +0000 Message-Id: <20220421101130.23107-3-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: BKPn__yE6Z32VqvuBFgZADwZSbRr5vSn X-Proofpoint-ORIG-GUID: JrxKJT9nPrSzaKMKMXqr_QZGla4ML32F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxlogscore=890 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 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 Reviewed-by: Claudio Imbrenda Reviewed-by: Nico Boehr --- s390x/css.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/s390x/css.c b/s390x/css.c index a333e55a..13a1509f 100644 --- a/s390x/css.c +++ b/s390x/css.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -642,13 +643,21 @@ int main(int argc, char *argv[]) int i; report_prefix_push("Channel Subsystem"); + + /* There's no guarantee where our devices are without qemu */ + if (!host_is_qemu()) { + report_skip("Not running under QEMU"); + goto done; + } + enable_io_isc(0x80 >> IO_SCH_ISC); for (i = 0; tests[i].name; i++) { report_prefix_push(tests[i].name); tests[i].func(); report_prefix_pop(); } - report_prefix_pop(); +done: + report_prefix_pop(); return report_summary(); }