From patchwork Fri Apr 19 06:32:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10909119 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 F009D17EE for ; Fri, 19 Apr 2019 18:18:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5C9E28D3F for ; Fri, 19 Apr 2019 18:18:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA12B28D97; Fri, 19 Apr 2019 18:18:34 +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 8A1CB28D3F for ; Fri, 19 Apr 2019 18:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727543AbfDSSSb (ORCPT ); Fri, 19 Apr 2019 14:18:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46240 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727535AbfDSSSa (ORCPT ); Fri, 19 Apr 2019 14:18:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 26E4C3199365; Fri, 19 Apr 2019 06:32:15 +0000 (UTC) Received: from thuth.com (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id F29A75D9C5; Fri, 19 Apr 2019 06:32:13 +0000 (UTC) From: Thomas Huth To: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Paolo Bonzini , kvm@vger.kernel.org Cc: David Hildenbrand , Janosch Frank Subject: [kvm-unit-tests PULL 1/4] Add s390x/*.bin to the .gitignore file Date: Fri, 19 Apr 2019 08:32:04 +0200 Message-Id: <20190419063207.11474-2-thuth@redhat.com> In-Reply-To: <20190419063207.11474-1-thuth@redhat.com> References: <20190419063207.11474-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 19 Apr 2019 06:32:15 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 1a4cd2f22a48b8de53ef9e46afb8 ("s390x: Add binary generation to makefile") we are also generating *.bin files from the *.elf files in the s390x directory. Add them to the .gitignore file so that they do not show up in the output of "git status" anymore. Acked-by: David Hildenbrand Signed-off-by: Thomas Huth --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 483f7c7..784cb2d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ cscope.* /api/api-sample /api/dirty-log /api/dirty-log-perf +/s390x/*.bin From patchwork Fri Apr 19 06:32:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10909171 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 7E578922 for ; Fri, 19 Apr 2019 18:21:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73B8028DB9 for ; Fri, 19 Apr 2019 18:21:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 684FE28DBA; Fri, 19 Apr 2019 18:21:30 +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 0F06228DB5 for ; Fri, 19 Apr 2019 18:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727513AbfDSSVU (ORCPT ); Fri, 19 Apr 2019 14:21:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726941AbfDSSVT (ORCPT ); Fri, 19 Apr 2019 14:21:19 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D3A9CAA87; Fri, 19 Apr 2019 06:32:16 +0000 (UTC) Received: from thuth.com (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 706705D9C5; Fri, 19 Apr 2019 06:32:15 +0000 (UTC) From: Thomas Huth To: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Paolo Bonzini , kvm@vger.kernel.org Cc: David Hildenbrand , Janosch Frank Subject: [kvm-unit-tests PULL 2/4] s390x/skey: Skip the "iske" test when running under z/VM 6 Date: Fri, 19 Apr 2019 08:32:05 +0200 Message-Id: <20190419063207.11474-3-thuth@redhat.com> In-Reply-To: <20190419063207.11474-1-thuth@redhat.com> References: <20190419063207.11474-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 19 Apr 2019 06:32:16 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a known bug of z/VM 6 which causes the "iske" test to fail. Since it is still sometimes useful to run the kvm-unit-tests in such a nested environment, let's rather skip the "iske" test there instead of always reporting a failure. Acked-by: Christian Borntraeger Signed-off-by: Thomas Huth --- s390x/skey.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/s390x/skey.c b/s390x/skey.c index f4894f1..b1e11af 100644 --- a/s390x/skey.c +++ b/s390x/skey.c @@ -70,9 +70,51 @@ static void test_set(void) skey.str.acc == ret.str.acc && skey.str.fp == ret.str.fp); } +static inline int stsi(void *addr, int fc, int sel1, int sel2) +{ + register int r0 asm("0") = (fc << 28) | sel1; + register int r1 asm("1") = sel2; + int rc = 0; + + asm volatile( + " stsi 0(%3)\n" + " jz 0f\n" + " lhi %1,-1\n" + "0:\n" + : "+d" (r0), "+d" (rc) + : "d" (r1), "a" (addr) + : "cc", "memory"); + + return rc; +} + +/* Returns true if we are running under z/VM 6.x */ +static bool check_for_zvm6(void) +{ + int dcbt; /* Descriptor block count */ + int nr; + static const unsigned char zvm6[] = { + /* This is "z/VM 6" in EBCDIC */ + 0xa9, 0x61, 0xe5, 0xd4, 0x40, 0x40, 0x40, 0x40, 0xf6 + }; + + if (stsi(pagebuf, 3, 2, 2)) + return false; + + dcbt = pagebuf[31] & 0xf; + + for (nr = 0; nr < dcbt; nr++) { + if (!memcmp(&pagebuf[32 + nr * 64 + 24], zvm6, sizeof(zvm6))) + return true; + } + + return false; +} + static void test_priv(void) { union skey skey; + bool is_zvm6 = check_for_zvm6(); memset(pagebuf, 0, PAGE_SIZE * 2); report_prefix_push("privileged"); @@ -87,10 +129,15 @@ static void test_priv(void) report("skey did not change on exception", skey.str.acc != 3); report_prefix_push("iske"); - expect_pgm_int(); - enter_pstate(); - get_storage_key(page0); - check_pgm_int_code(PGM_INT_CODE_PRIVILEGED_OPERATION); + if (is_zvm6) { + /* There is a known bug with z/VM 6, so skip the test there */ + report_skip("not working on z/VM 6"); + } else { + expect_pgm_int(); + enter_pstate(); + get_storage_key(page0); + check_pgm_int_code(PGM_INT_CODE_PRIVILEGED_OPERATION); + } report_prefix_pop(); report_prefix_pop(); From patchwork Fri Apr 19 06:32:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10909097 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 1E8AB14DB for ; Fri, 19 Apr 2019 18:17:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1225528D3F for ; Fri, 19 Apr 2019 18:17:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0672028D97; Fri, 19 Apr 2019 18:17:39 +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 18AC028D3F for ; Fri, 19 Apr 2019 18:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727351AbfDSSRd (ORCPT ); Fri, 19 Apr 2019 14:17:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726274AbfDSSRb (ORCPT ); Fri, 19 Apr 2019 14:17:31 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1992C307E061; Fri, 19 Apr 2019 06:32:18 +0000 (UTC) Received: from thuth.com (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id E48835D9C5; Fri, 19 Apr 2019 06:32:16 +0000 (UTC) From: Thomas Huth To: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Paolo Bonzini , kvm@vger.kernel.org Cc: David Hildenbrand , Janosch Frank Subject: [kvm-unit-tests PULL 3/4] s390x: Add a test for the diagnose 0x308 hypercall Date: Fri, 19 Apr 2019 08:32:06 +0200 Message-Id: <20190419063207.11474-4-thuth@redhat.com> In-Reply-To: <20190419063207.11474-1-thuth@redhat.com> References: <20190419063207.11474-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 19 Apr 2019 06:32:18 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The original idea for this test is to have an easy way to check for a problem that has been fixed in QEMU recently: QEMU simply aborted if this diagnose call was called with an unsupported subcode (e.g. 2). The problem has been fixed in QEMU commit 37dbd1f4d4805edcd18d94eb202bb3461b3cd52d ("Return specification exception for unimplemented diag 308 subcodes"), and this test now should make sure that we do not regress here again. While we're at it, also check whether LOAD NORMAL via subcode 1 works correctly, whether the diagnose call is blocked correctly in problem state and whether subcodes 5 and 6 are generating specification exceptions for illegal parameters as expected. Acked-by: Christian Borntraeger Signed-off-by: Thomas Huth --- s390x/Makefile | 1 + s390x/diag308.c | 130 ++++++++++++++++++++++++++++++++++++++++++++ s390x/unittests.cfg | 3 + 3 files changed, 134 insertions(+) create mode 100644 s390x/diag308.c diff --git a/s390x/Makefile b/s390x/Makefile index af40fd4..1f21ddb 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -5,6 +5,7 @@ tests += $(TEST_DIR)/sieve.elf tests += $(TEST_DIR)/sthyi.elf tests += $(TEST_DIR)/skey.elf tests += $(TEST_DIR)/diag10.elf +tests += $(TEST_DIR)/diag308.elf tests += $(TEST_DIR)/pfmf.elf tests += $(TEST_DIR)/cmm.elf tests += $(TEST_DIR)/vector.elf diff --git a/s390x/diag308.c b/s390x/diag308.c new file mode 100644 index 0000000..f085b1a --- /dev/null +++ b/s390x/diag308.c @@ -0,0 +1,130 @@ +/* + * Diagnose 0x308 hypercall tests + * + * Copyright (c) 2019 Thomas Huth, Red Hat Inc. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2, or (at + * your option) any later version. + */ + +#include +#include +#include + +/* The diagnose calls should be blocked in problem state */ +static void test_priv(void) +{ + expect_pgm_int(); + enter_pstate(); + asm volatile ("diag %0,%1,0x308" :: "d"(0), "d"(3)); + check_pgm_int_code(PGM_INT_CODE_PRIVILEGED_OPERATION); +} + +/* + * Check that diag308 with subcode 1 loads the PSW at address 0, i.e. + * that we can put a pointer into address 4 which then gets executed. + */ +static void test_subcode1(void) +{ + uint64_t saved_psw = *(uint64_t *)0; + long subcode = 1; + long ret, tmp; + + asm volatile ( + " epsw %0,%1\n" + " st %0,0\n" + " larl %0,0f\n" + " oilh %0,0x8000\n" + " st %0,4\n" + " diag 0,%2,0x308\n" + " lghi %0,0\n" + " j 1f\n" + "0: lghi %0,1\n" + "1:" + : "=&d"(ret), "=&d"(tmp) : "d"(subcode) : "memory"); + + *(uint64_t *)0 = saved_psw; + + report("load normal reset done", ret == 1); +} + +/* Expect a specification exception when using an uneven register */ +static void test_uneven_reg(unsigned int subcode) +{ + register unsigned long sc asm("6") = subcode; + register unsigned long r3 asm("9") = 0x2000; + + report_prefix_push("uneven register"); + expect_pgm_int(); + asm volatile ("diag %0,%1,0x308" :: "d"(r3), "d"(sc)); + check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); + report_prefix_pop(); +} + +/* Expect a specification exception when using an unaligned address */ +static void test_unaligned_address(unsigned int subcode) +{ + register unsigned long sc asm("6") = subcode; + register unsigned long addr asm("8") = 54321; + + report_prefix_push("unaligned address"); + expect_pgm_int(); + asm volatile ("diag %0,%1,0x308" :: "d"(addr), "d"(sc)); + check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); + report_prefix_pop(); +} + +static void test_subcode5(void) +{ + test_uneven_reg(5); + test_unaligned_address(5); +} + +static void test_subcode6(void) +{ + test_uneven_reg(6); + test_unaligned_address(6); +} + +/* Unsupported subcodes should generate a specification exception */ +static void test_unsupported_subcode(void) +{ + int subcodes[] = { 2, 0x101, 0xffff, 0x10001, -1 }; + int idx; + + for (idx = 0; idx < ARRAY_SIZE(subcodes); idx++) { + report_prefix_pushf("0x%04x", subcodes[idx]); + expect_pgm_int(); + asm volatile ("diag %0,%1,0x308" :: "d"(0), "d"(subcodes[idx])); + check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); + report_prefix_pop(); + } +} + +static struct { + const char *name; + void (*func)(void); +} tests[] = { + { "privileged", test_priv }, + { "subcode 1", test_subcode1 }, + { "subcode 5", test_subcode5 }, + { "subcode 6", test_subcode6 }, + { "unsupported", test_unsupported_subcode }, + { NULL, NULL } +}; + +int main(int argc, char**argv) +{ + int i; + + report_prefix_push("diag308"); + for (i = 0; tests[i].name; i++) { + report_prefix_push(tests[i].name); + tests[i].func(); + report_prefix_pop(); + } + report_prefix_pop(); + + return report_summary(); +} diff --git a/s390x/unittests.cfg b/s390x/unittests.cfg index e53c365..546b1f2 100644 --- a/s390x/unittests.cfg +++ b/s390x/unittests.cfg @@ -44,6 +44,9 @@ file = skey.elf [diag10] file = diag10.elf +[diag308] +file = diag308.elf + [pfmf] file = pfmf.elf From patchwork Fri Apr 19 06:32:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10909131 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 A28AD14DB for ; Fri, 19 Apr 2019 18:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 981D528D3F for ; Fri, 19 Apr 2019 18:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C44528D97; Fri, 19 Apr 2019 18:18:53 +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 1E66F28D3F for ; Fri, 19 Apr 2019 18:18:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727558AbfDSSSo (ORCPT ); Fri, 19 Apr 2019 14:18:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727566AbfDSSSo (ORCPT ); Fri, 19 Apr 2019 14:18:44 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EF8489C3C; Fri, 19 Apr 2019 06:32:19 +0000 (UTC) Received: from thuth.com (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 639065D9C5; Fri, 19 Apr 2019 06:32:18 +0000 (UTC) From: Thomas Huth To: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Paolo Bonzini , kvm@vger.kernel.org Cc: David Hildenbrand , Janosch Frank Subject: [kvm-unit-tests PULL 4/4] Add a .gitlab-ci.yml file for automatic CI testing on GitLab instances Date: Fri, 19 Apr 2019 08:32:07 +0200 Message-Id: <20190419063207.11474-5-thuth@redhat.com> In-Reply-To: <20190419063207.11474-1-thuth@redhat.com> References: <20190419063207.11474-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 19 Apr 2019 06:32:19 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When changing common code of the kvm-unit-tests, one should make sure that the tests still compile fine for all target architectures afterwards. But compiling kvm-unit-tests for all target architectures manually is cumbersome. For people like me who store their git trees on GitLab, this can be done automatically via a CI system instead. Using the .gitlab-ci.yml file, auto- matic builds are now triggered on each push to a kvm-unit-test repository on gitlab.com. Additionally, the script also runs the tests that can be executed with QEMU TCG (except for s390x, since the QEMU package of the CI container currently does not provide the required s390-ccw bios here). Acked-by: Andrew Jones Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..50a1e39 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,75 @@ +before_script: + - apt-get update -qq + - apt-get install -y -qq qemu-system + +build-aarch64: + script: + - apt-get install -y -qq gcc-aarch64-linux-gnu + - ./configure --arch=aarch64 --cross-prefix=aarch64-linux-gnu- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp + pci-test pmu gicv2-active gicv3-active psci timer + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-arm: + script: + - apt-get install -y -qq gcc-arm-linux-gnueabi + - ./configure --arch=arm --cross-prefix=arm-linux-gnueabi- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp + pci-test pmu gicv2-active gicv3-active psci + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-ppc64be: + script: + - apt-get install -y -qq gcc-powerpc64-linux-gnu + - ./configure --arch=ppc64 --endian=big --cross-prefix=powerpc64-linux-gnu- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base + rtas-set-time-of-day emulator + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-ppc64le: + script: + - apt-get install -y -qq gcc-powerpc64-linux-gnu + - ./configure --arch=ppc64 --endian=little --cross-prefix=powerpc64-linux-gnu- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base + rtas-set-time-of-day emulator + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-s390x: + script: + - apt-get install -y -qq gcc-s390x-linux-gnu + - ./configure --arch=s390x --cross-prefix=s390x-linux-gnu- + - make -j2 + +build-x86_64: + script: + - ./configure --arch=x86_64 + - make -j2 + - ACCEL=tcg ./run_tests.sh + ioapic-split ioapic smptest smptest3 vmexit_cpuid vmexit_mov_from_cr8 + vmexit_mov_to_cr8 vmexit_inl_pmtimer vmexit_ipi vmexit_ipi_halt + vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed + eventinj msr port80 sieve tsc rmap_chain umip hyperv_stimer intel_iommu + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-i386: + script: + - apt-get install -y -qq gcc-multilib + - ./configure --arch=i386 + - make -j2 + - ACCEL=tcg ./run_tests.sh + eventinj port80 sieve tsc taskswitch umip hyperv_stimer + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi