From patchwork Thu Feb 28 08:35:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 10832677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5114139A for ; Thu, 28 Feb 2019 08:36:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5E942DBFB for ; Thu, 28 Feb 2019 08:36:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA5152E074; Thu, 28 Feb 2019 08:36:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26E652DBFB for ; Thu, 28 Feb 2019 08:36:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731975AbfB1IgL (ORCPT ); Thu, 28 Feb 2019 03:36:11 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46460 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731026AbfB1IgL (ORCPT ); Thu, 28 Feb 2019 03:36:11 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1S8Y2wo171032 for ; Thu, 28 Feb 2019 03:36:09 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qxaejw68h-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 28 Feb 2019 03:36:09 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Feb 2019 08:36:07 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 28 Feb 2019 08:36:04 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1S8a3MK30408812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Feb 2019 08:36:03 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B12A7A405C; Thu, 28 Feb 2019 08:36:03 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74908A405B; Thu, 28 Feb 2019 08:36:03 +0000 (GMT) Received: from s38lp20.lnxne.boe (unknown [9.152.224.63]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 28 Feb 2019 08:36:03 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, david@redhat.com, thuth@redhat.co Subject: [kvm-unit-tests PATCH v2 1/3] s390x: Beautify sthyi report strings Date: Thu, 28 Feb 2019 09:35:37 +0100 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20190228083539.146516-1-frankja@linux.ibm.com> References: <20190228083539.146516-1-frankja@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19022808-0008-0000-0000-000002C5EE4A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022808-0009-0000-0000-000022323ED0 Message-Id: <20190228083539.146516-2-frankja@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-28_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=711 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902280061 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Tests like the register odd check in r1 and r2 were not distinguishable and the reports were hard to read in total. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- s390x/sthyi.c | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/s390x/sthyi.c b/s390x/sthyi.c index 16b8c14..04a7b4f 100644 --- a/s390x/sthyi.c +++ b/s390x/sthyi.c @@ -52,10 +52,12 @@ static void test_exception_addr(void) static void test_exception_reg_odd(void) { - report_prefix_push("Register check odd"); + report_prefix_push("Register check odd R1"); expect_pgm_int(); sthyi((uint64_t)pagebuf, 0, NULL, 1, 2); check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); + report_prefix_pop(); + report_prefix_push("Register check odd R2"); expect_pgm_int(); sthyi((uint64_t)pagebuf, 0, NULL, 0, 3); check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); @@ -76,52 +78,58 @@ static void test_function_code(uint64_t addr) uint64_t urc = 0; int cc = sthyi((uint64_t)pagebuf, 42, &urc, 0, 2); - report("Ill. fcode", cc == 3 && urc == CODE_UNSUPP); + report("Illegal fcode", cc == 3 && urc == CODE_UNSUPP); } static void test_fcode0_hdr(struct sthyi_hdr_sctn *hdr) { - report("HDR length", (hdr->INFHDLN >= sizeof(*hdr) - && !(hdr->INFHDLN % 8))); - report("MACH sctn length", (hdr->INFMLEN >= sizeof(struct sthyi_mach_sctn) - && !(hdr->INFMLEN % 8))); - report("PAR sctn length", (hdr->INFPLEN >= sizeof(struct sthyi_par_sctn) - && !(hdr->INFPLEN % 8))); + report_prefix_push("Header"); - report("MACH offset", hdr->INFMOFF >= hdr->INFHDLN); - report("PAR offset", hdr->INFPOFF >= hdr->INFHDLN); + report("length", hdr->INFHDLN >= sizeof(*hdr) && !(hdr->INFHDLN % 8)); + report("Machine sctn length", (hdr->INFMLEN >= sizeof(struct sthyi_mach_sctn) + && !(hdr->INFMLEN % 8))); + report("Partition section length", (hdr->INFPLEN >= sizeof(struct sthyi_par_sctn) + && !(hdr->INFPLEN % 8))); + + report("Machine offset", hdr->INFMOFF >= hdr->INFHDLN); + report("Partition offset", hdr->INFPOFF >= hdr->INFHDLN); + report_prefix_pop(); } static void test_fcode0_mach(struct sthyi_mach_sctn *mach) { int sum = mach->INFMSCPS + mach->INFMDCPS + mach->INFMSIFL + mach->INFMDIFL; + report_prefix_push("Machine"); if (mach->INFMVAL1 & MACH_ID_VLD) { - report("MACH type", memcmp(mach->INFMTYPE, null_buf, sizeof(mach->INFMTYPE))); - report("MACH manu", memcmp(mach->INFMMANU, null_buf, sizeof(mach->INFMMANU))); - report("MACH seq", memcmp(mach->INFMSEQ, null_buf, sizeof(mach->INFMSEQ))); - report("MACH plant", memcmp(mach->INFMPMAN, null_buf, sizeof(mach->INFMPMAN))); + report("type", memcmp(mach->INFMTYPE, null_buf, sizeof(mach->INFMTYPE))); + report("manufacturer", memcmp(mach->INFMMANU, null_buf, sizeof(mach->INFMMANU))); + report("sequence", memcmp(mach->INFMSEQ, null_buf, sizeof(mach->INFMSEQ))); + report("plant", memcmp(mach->INFMPMAN, null_buf, sizeof(mach->INFMPMAN))); } if (mach->INFMVAL1 & MACH_NAME_VLD) - report("MACH name", memcmp(mach->INFMNAME, null_buf, - sizeof(mach->INFMNAME))); + report("name", memcmp(mach->INFMNAME, null_buf, + sizeof(mach->INFMNAME))); if (mach->INFMVAL1 & MACH_CNT_VLD) - report("MACH core counts", sum); + report("core counts", sum); + report_prefix_pop(); } static void test_fcode0_par(struct sthyi_par_sctn *par) { int sum = par->INFPSCPS + par->INFPDCPS + par->INFPSIFL + par->INFPDIFL; + report_prefix_push("Partition"); if (par->INFPVAL1 & PART_CNT_VLD) - report("PAR core counts", sum); + report("core counts", sum); if (par->INFPVAL1 & PART_STSI_SUC) { - report("PAR number", par->INFPPNUM); - report("PAR name", memcmp(par->INFPPNAM, null_buf, sizeof(par->INFPPNAM))); + report("number", par->INFPPNUM); + report("name", memcmp(par->INFPPNAM, null_buf, sizeof(par->INFPPNAM))); } + report_prefix_pop(); } static void test_fcode0(void) @@ -133,6 +141,7 @@ static void test_fcode0(void) /* Zero destination memory. */ memset(pagebuf, 0, PAGE_SIZE); + report_prefix_push("fcode 0"); sthyi((uint64_t)pagebuf, 0, NULL, 0, 2); hdr = (void *)pagebuf; mach = (void *)pagebuf + hdr->INFMOFF; @@ -141,6 +150,7 @@ static void test_fcode0(void) test_fcode0_hdr(hdr); test_fcode0_mach(mach); test_fcode0_par(par); + report_prefix_pop(); } int main(void) @@ -156,10 +166,12 @@ int main(void) } /* Test register/argument checking. */ + report_prefix_push("Instruction"); test_exception_addr(); test_exception_reg_odd(); test_exception_reg_equal(); test_function_code((uint64_t) pagebuf); + report_prefix_pop(); /* Test function code 0 - CP and IFL Capacity Information */ test_fcode0(); From patchwork Thu Feb 28 08:35:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 10832681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7F061880 for ; Thu, 28 Feb 2019 08:36:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB0212E067 for ; Thu, 28 Feb 2019 08:36:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CC222E074; Thu, 28 Feb 2019 08:36:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88DEC2E118 for ; Thu, 28 Feb 2019 08:36:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731983AbfB1IgN (ORCPT ); Thu, 28 Feb 2019 03:36:13 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46774 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731829AbfB1IgM (ORCPT ); Thu, 28 Feb 2019 03:36:12 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1S8Y1v9170859 for ; Thu, 28 Feb 2019 03:36:10 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qxaejw6c8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 28 Feb 2019 03:36:10 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Feb 2019 08:36:09 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 28 Feb 2019 08:36:06 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1S8a5f646727256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Feb 2019 08:36:05 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0890FA405F; Thu, 28 Feb 2019 08:36:05 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0B05A405B; Thu, 28 Feb 2019 08:36:04 +0000 (GMT) Received: from s38lp20.lnxne.boe (unknown [9.152.224.63]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 28 Feb 2019 08:36:04 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, david@redhat.com, thuth@redhat.co Subject: [kvm-unit-tests PATCH v2 2/3] s390x: Beautify pfmf report strings Date: Thu, 28 Feb 2019 09:35:38 +0100 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20190228083539.146516-1-frankja@linux.ibm.com> References: <20190228083539.146516-1-frankja@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19022808-0028-0000-0000-0000034E0A07 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022808-0029-0000-0000-0000240C6458 Message-Id: <20190228083539.146516-3-frankja@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-28_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=886 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902280061 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use a 4k/1m prefix rather than mangling it into the report string. Signed-off-by: Janosch Frank --- s390x/pfmf.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/s390x/pfmf.c b/s390x/pfmf.c index 4cc6bd1..21f4e6a 100644 --- a/s390x/pfmf.c +++ b/s390x/pfmf.c @@ -64,6 +64,7 @@ static void test_4k_key(void) union r1 r1; union skey skey; + report_prefix_push("4K"); r1.val = 0; r1.reg.sk = 1; r1.reg.fsc = FSC_4K; @@ -71,15 +72,18 @@ static void test_4k_key(void) pfmf(r1.val, (unsigned long) pagebuf); skey.val = get_storage_key((unsigned long) pagebuf); skey.val &= SKEY_ACC | SKEY_FP; - report("set 4k", skey.val == 0x30); + report("set storage keys", skey.val == 0x30); + report_prefix_pop(); } static void test_1m_key(void) { int i; + bool rp = true; union r1 r1; union skey skey; + report_prefix_push("1M"); r1.val = 0; r1.reg.sk = 1; r1.reg.fsc = FSC_1M; @@ -89,11 +93,12 @@ static void test_1m_key(void) skey.val = get_storage_key((unsigned long) pagebuf + i * PAGE_SIZE); skey.val &= SKEY_ACC | SKEY_FP; if (skey.val != 0x30) { - report("set 1M", false); - return; + rp = false; + break; } } - report("set 1M", true); + report("set storage keys", rp); + report_prefix_pop(); } static void test_4k_clear(void) @@ -104,9 +109,11 @@ static void test_4k_clear(void) r1.reg.cf = 1; r1.reg.fsc = FSC_4K; + report_prefix_push("4K"); memset(pagebuf, 42, PAGE_SIZE); pfmf(r1.val, (unsigned long) pagebuf); - report("clear 4k", !memcmp(pagebuf, pagebuf + PAGE_SIZE, PAGE_SIZE)); + report("clear memory", !memcmp(pagebuf, pagebuf + PAGE_SIZE, PAGE_SIZE)); + report_prefix_pop(); } static void test_1m_clear(void) @@ -119,11 +126,13 @@ static void test_1m_clear(void) r1.reg.cf = 1; r1.reg.fsc = FSC_1M; + report_prefix_push("1M"); memset(pagebuf, 42, PAGE_SIZE * 256); pfmf(r1.val, (unsigned long) pagebuf); for (i = 0; i < PAGE_SIZE * 256; i++) sum |= pagebuf[i]; report("clear 1m", !sum); + report_prefix_pop(); } int main(void) @@ -141,8 +150,8 @@ int main(void) memset(pagebuf, 0, PAGE_SIZE * 256); test_4k_key(); - test_1m_key(); test_4k_clear(); + test_1m_key(); test_1m_clear(); done: From patchwork Thu Feb 28 08:35:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 10832683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D897139A for ; Thu, 28 Feb 2019 08:36:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F84E2E067 for ; Thu, 28 Feb 2019 08:36:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13D902E0B1; Thu, 28 Feb 2019 08:36:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5A662E067 for ; Thu, 28 Feb 2019 08:36:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732009AbfB1IgS (ORCPT ); Thu, 28 Feb 2019 03:36:18 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36944 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731130AbfB1IgS (ORCPT ); Thu, 28 Feb 2019 03:36:18 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1S8YPsl049436 for ; Thu, 28 Feb 2019 03:36:14 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qxbpfhr1g-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 28 Feb 2019 03:36:14 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Feb 2019 08:36:11 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 28 Feb 2019 08:36:07 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1S8a6wR63045836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Feb 2019 08:36:06 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 57BD0A405B; Thu, 28 Feb 2019 08:36:06 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17E67A405C; Thu, 28 Feb 2019 08:36:06 +0000 (GMT) Received: from s38lp20.lnxne.boe (unknown [9.152.224.63]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 28 Feb 2019 08:36:06 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, david@redhat.com, thuth@redhat.co Subject: [kvm-unit-tests PATCH v2 3/3] s390x: Add prefixes for dxc afp emulator test Date: Thu, 28 Feb 2019 09:35:39 +0100 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20190228083539.146516-1-frankja@linux.ibm.com> References: <20190228083539.146516-1-frankja@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19022808-0008-0000-0000-000002C5EE4C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022808-0009-0000-0000-000022323ED1 Message-Id: <20190228083539.146516-4-frankja@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-28_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=939 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902280061 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without it we have two reports that look the same, but don't have the same control register state for the test. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- s390x/emulator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390x/emulator.c b/s390x/emulator.c index f49c414..bce7b79 100644 --- a/s390x/emulator.c +++ b/s390x/emulator.c @@ -266,6 +266,7 @@ static void test_dxc(void) lc->dxc_vxc = 0x12345678; set_fpc_dxc(0); + report_prefix_push("afp"); expect_pgm_int(); asm volatile(" .insn rrf,0xb9600000,%0,%0,8,0\n" : : "r"(0) : "memory"); @@ -273,12 +274,13 @@ static void test_dxc(void) report("dxc in LC", lc->dxc_vxc == 0xff); report("dxc in FPC", get_fpc_dxc() == 0xff); - + report_prefix_pop(); /* DXC (0xff) is to be stored in LC only on a trap (CRT) without AFP */ lc->dxc_vxc = 0x12345678; set_fpc_dxc(0); + report_prefix_push("no-afp"); expect_pgm_int(); /* temporarily disable AFP */ afp_disable(); @@ -289,6 +291,7 @@ static void test_dxc(void) report("dxc in LC", lc->dxc_vxc == 0xff); report("dxc not in FPC", get_fpc_dxc() == 0); + report_prefix_pop(); } static struct {