From patchwork Fri Mar 9 20:28:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyf9s3XgXz9sd1 for ; Sat, 10 Mar 2018 07:29:21 +1100 (AEDT) Received: from localhost ([::1]:47936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOdj-0008FH-9g for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:29:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOd1-0008C7-AY for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOd0-0006m1-96 for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41474) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOd0-0006lo-0h for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:34 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 523AC80C36; Fri, 9 Mar 2018 20:28:33 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 228607E230; Fri, 9 Mar 2018 20:28:30 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:20 -0300 Message-Id: <20180309202827.12085-2-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 09 Mar 2018 20:28:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/8] device-crash-test: Refactor loglevel configuration code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Use action='store_const', dest='loglevel' to represent the effect of each option more clearly. This will also make the last option in the command-line override the previous ones (e.g.: "-d -q"). Signed-off-by: Eduardo Habkost --- scripts/device-crash-test | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 7417177ebb..c6a7875357 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -484,7 +484,7 @@ def casesToTest(args, testcase): if args.random: cases = list(cases) cases = random.sample(cases, min(args.random, len(cases))) - if args.debug: + if logger.isEnabledFor(logging.DEBUG): cases = list(cases) dbg("%d test cases to test", len(cases)) if args.shuffle: @@ -511,11 +511,15 @@ def main(): parser.add_argument('-t', metavar='KEY=VALUE', nargs='*', help="Limit test cases to KEY=VALUE", action='append', dest='testcases', default=[]) - parser.add_argument('-d', '--debug', action='store_true', + parser.set_defaults(loglevel=logging.INFO) + parser.add_argument('-d', '--debug',action='store_const', + dest='loglevel', const=logging.DEBUG, help='debug output') - parser.add_argument('-v', '--verbose', action='store_true', default=True, + parser.add_argument('-v', '--verbose',action='store_const', + dest='loglevel', const=logging.INFO, help='verbose output') - parser.add_argument('-q', '--quiet', dest='verbose', action='store_false', + parser.add_argument('-q', '--quiet',action='store_const', + dest='loglevel', const=logging.WARN, help='non-verbose output') parser.add_argument('-r', '--random', type=int, metavar='COUNT', help='run a random sample of COUNT test cases', @@ -536,13 +540,7 @@ def main(): help='QEMU binary to run') args = parser.parse_args() - if args.debug: - lvl = logging.DEBUG - elif args.verbose: - lvl = logging.INFO - else: - lvl = logging.WARN - logging.basicConfig(stream=sys.stdout, level=lvl, format='%(levelname)s: %(message)s') + logging.basicConfig(stream=sys.stdout, level=args.loglevel, format='%(levelname)s: %(message)s') fatal_failures = [] wl_stats = {} @@ -599,7 +597,7 @@ def main(): if skipped: logger.info("Skipped %d test cases", skipped) - if args.debug: + if logger.isEnabledFor(logging.DEBUG): stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in enumerate(ERROR_WHITELIST)]) for count, wl in stats: dbg("whitelist entry stats: %d: %r", count, wl) From patchwork Fri Mar 9 20:28:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyfF942xLz9sd1 for ; Sat, 10 Mar 2018 07:32:13 +1100 (AEDT) Received: from localhost ([::1]:47957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOgV-0002PS-8y for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:32:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOd3-0008Ej-PZ for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOd2-0006mz-Up for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40652) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOd2-0006mm-P4 for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:36 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 17CA1368E6; Fri, 9 Mar 2018 20:28:36 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCBA55C54F; Fri, 9 Mar 2018 20:28:34 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:21 -0300 Message-Id: <20180309202827.12085-3-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 09 Mar 2018 20:28:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/8] device-crash-test: Add examples to script documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add simple examples for common use cases. Signed-off-by: Eduardo Habkost --- scripts/device-crash-test | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index c6a7875357..364c779cdb 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -22,6 +22,25 @@ """ Run QEMU with all combinations of -machine and -device types, check for crashes and unexpected errors. + +Example usage: + +Test all QEMU binaries found in the current directory, with all +machine-type/device combinations, but skip the combinations that are expected to +fail: + + device-crash-test + +Test all QEMU binaries found in the current directory, with all +machine-type/device combinations, including the combinations that are expected +to fail: + + device-crash-test -F + +Test a single QEMU binary: + + device-crash-test /path/to/qemu/binary + """ import sys From patchwork Fri Mar 9 20:28:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883986 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyfJv3NLkz9sd1 for ; Sat, 10 Mar 2018 07:35:27 +1100 (AEDT) Received: from localhost ([::1]:47968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOjd-0004rj-8v for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:35:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOd9-0008L2-W3 for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOd6-0006nt-Ss for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49742) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOd6-0006nj-N8 for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:40 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F264581DF3; Fri, 9 Mar 2018 20:28:39 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C18D1798B; Fri, 9 Mar 2018 20:28:37 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:22 -0300 Message-Id: <20180309202827.12085-4-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 09 Mar 2018 20:28:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/8] device-crash-test: Accept machine=DEFAULT to test the default machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This will be useful for running a smaller test set on "make check", instead of testing every single machine-type/device combination. Signed-off-by: Eduardo Habkost --- scripts/device-crash-test | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 364c779cdb..632b128e44 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -41,6 +41,11 @@ Test a single QEMU binary: device-crash-test /path/to/qemu/binary +Test all QEMU binaries found in the current directory, using only the default +machine-type: + + device-crash-test -t machine=DEFAULT + """ import sys @@ -357,7 +362,7 @@ class QemuBinaryInfo(object): # there's no way to query DeviceClass::user_creatable using QMP, # so use 'info qdm': self.no_user_devs = set([d['name'] for d in infoQDM(vm, ) if d['no-user']]) - self.machines = list(m['name'] for m in vm.command('query-machines')) + self.machines = vm.command('query-machines') self.user_devs = self.alldevs.difference(self.no_user_devs) self.kvm_available = vm.command('query-kvm')['enabled'] finally: @@ -390,6 +395,19 @@ class QemuBinaryInfo(object): self._machine_info[machine] = mi return mi + def defaultMachine(self): + """Default machine-type for the QEMU binary + + If no default machine-type is returned by query-machines, return the + first machine-type in the list. + """ + machines = self.machines + defmachine = [m['name'] for m in self.machines if m.get('is-default')] + if defmachine: + return defmachine[0] + else: + return self.machines[0]['name'] + BINARY_INFO = {} @@ -455,7 +473,7 @@ def accelsToTest(args, testcase): def machinesToTest(args, testcase): - return getBinaryInfo(args, testcase['binary']).machines + return [m['name'] for m in getBinaryInfo(args, testcase['binary']).machines] def devicesToTest(args, testcase): @@ -580,6 +598,13 @@ def main(): return 1 for t in casesToTest(args, tc): + + # expand some test case variables to their actual values before + # using them: + # "-t machine=DEFAULT" can be used to use the default machine-type + if t['machine'] == 'DEFAULT': + t['machine'] = getBinaryInfo(args, t['binary']).defaultMachine() + logger.info("running test case: %s", formatTestCase(t)) total += 1 From patchwork Fri Mar 9 20:28:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyfF370jDz9sf2 for ; Sat, 10 Mar 2018 07:32:06 +1100 (AEDT) Received: from localhost ([::1]:47954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOgN-0002Gj-In for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:32:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOdC-0008Nv-S9 for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOdB-0006pl-QC for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50306) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOdB-0006pR-Ku for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:45 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81D20C04BE0E; Fri, 9 Mar 2018 20:28:44 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70C79782DE; Fri, 9 Mar 2018 20:28:41 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:23 -0300 Message-Id: <20180309202827.12085-5-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 09 Mar 2018 20:28:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/8] device-crash-test: New known crashes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Pavel Pisa , John Snow , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We are not running the script on "make check" yet, and additional bugs were introduced recently in the tree. Whitelist the new crashes while we investigate, to allow us to run device-crash-test on "make check" as soon as possible to prevent new bugs. Cc: Pavel Pisa Cc: John Snow Signed-off-by: Eduardo Habkost --- scripts/device-crash-test | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 632b128e44..b9a7470efc 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -241,11 +241,15 @@ ERROR_WHITELIST = [ {'exitcode':-6, 'log':r"Object .* is not an instance of type generic-pc-machine", 'loglevel':logging.ERROR}, {'exitcode':-6, 'log':r"Object .* is not an instance of type e500-ccsr", 'loglevel':logging.ERROR}, {'exitcode':-6, 'log':r"vmstate_register_with_alias_id: Assertion `!se->compat \|\| se->instance_id == 0' failed", 'loglevel':logging.ERROR}, + {'exitcode':-6, 'device':'isa-fdc', 'loglevel':logging.ERROR, 'expected':True}, {'exitcode':-11, 'device':'gus', 'loglevel':logging.ERROR, 'expected':True}, {'exitcode':-11, 'device':'isa-serial', 'loglevel':logging.ERROR, 'expected':True}, {'exitcode':-11, 'device':'sb16', 'loglevel':logging.ERROR, 'expected':True}, {'exitcode':-11, 'device':'cs4231a', 'loglevel':logging.ERROR, 'expected':True}, {'exitcode':-11, 'machine':'isapc', 'device':'.*-iommu', 'loglevel':logging.ERROR, 'expected':True}, + {'exitcode':-11, 'device':'mioe3680_pci', 'loglevel':logging.ERROR, 'expected':True}, + {'exitcode':-11, 'device':'pcm3680_pci', 'loglevel':logging.ERROR, 'expected':True}, + {'exitcode':-11, 'device':'kvaser_pci', 'loglevel':logging.ERROR, 'expected':True}, # everything else (including SIGABRT and SIGSEGV) will be a fatal error: {'exitcode':None, 'fatal':True, 'loglevel':logging.FATAL}, From patchwork Fri Mar 9 20:28:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883984 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyfFf1HfJz9sf2 for ; Sat, 10 Mar 2018 07:32:38 +1100 (AEDT) Received: from localhost ([::1]:47959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOgu-0002gS-0b for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:32:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOdL-00007F-BU for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOdI-0006sg-70 for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36586) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOdI-0006sU-1O for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:52 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 57F7BC0587E5; Fri, 9 Mar 2018 20:28:51 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF8E7183B7; Fri, 9 Mar 2018 20:28:45 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:24 -0300 Message-Id: <20180309202827.12085-6-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 09 Mar 2018 20:28:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 5/8] device-crash-test: Remove runnable-machine check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This optimization to skip tests if the machine is not runnable is unreliable and makes the script ignore actual QEMU crashes, so we're safer simply removing it. Signed-off-by: Eduardo Habkost --- scripts/device-crash-test | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index b9a7470efc..f406890519 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -372,33 +372,6 @@ class QemuBinaryInfo(object): finally: vm.shutdown() - def machineInfo(self, machine): - """Query for information on a specific machine-type - - Results are cached internally, in case the same machine- - type is queried multiple times. - """ - if machine in self._machine_info: - return self._machine_info[machine] - - mi = {} - args = ['-S', '-machine', '%s' % (machine)] - dbg("querying machine info for binary=%s machine=%s", self.binary, machine) - vm = QEMUMachine(binary=self.binary, args=args) - try: - vm.launch() - mi['runnable'] = True - except KeyboardInterrupt: - raise - except: - dbg("exception trying to run binary=%s machine=%s", self.binary, machine, exc_info=sys.exc_info()) - dbg("log: %r", vm.get_log()) - mi['runnable'] = False - - vm.shutdown() - self._machine_info[machine] = mi - return mi - def defaultMachine(self): """Default machine-type for the QEMU binary @@ -613,9 +586,7 @@ def main(): total += 1 expected_match = findExpectedResult(t) - if (args.quick and - (expected_match or - not getBinaryInfo(args, t['binary']).machineInfo(t['machine'])['runnable'])): + if args.quick and expected_match: dbg("skipped: %s", formatTestCase(t)) skipped += 1 continue From patchwork Fri Mar 9 20:28:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyfKL5xLHz9sd1 for ; Sat, 10 Mar 2018 07:35:50 +1100 (AEDT) Received: from localhost ([::1]:47970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOk0-0005C7-Hl for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:35:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOdL-00007R-Iw for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOdK-0006tA-Gu for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55556) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOdK-0006sv-8m for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:54 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F77A3DE42; Fri, 9 Mar 2018 20:28:53 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFC7F1813D; Fri, 9 Mar 2018 20:28:52 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:25 -0300 Message-Id: <20180309202827.12085-7-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 09 Mar 2018 20:28:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 6/8] device-crash-test: Use WARN for known crashes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We're going to run device-crash-test on "make check", so it's better to make the script less noisy on known errors. Signed-off-by: Eduardo Habkost --- scripts/device-crash-test | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index f406890519..ed9a552fa1 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -228,28 +228,28 @@ ERROR_WHITELIST = [ {'exitcode':1, 'loglevel':logging.INFO}, # KNOWN CRASHES: - # Known crashes will generate error messages, but won't be fatal. - # Those entries must be removed once we fix the crashes. - {'exitcode':-6, 'log':r"Device 'serial0' is in use", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"qemu_net_client_setup: Assertion `!peer->peer' failed", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r'RAMBlock "[\w.-]+" already registered', 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"find_ram_offset: Assertion `size != 0' failed.", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"add_cpreg_to_hashtable: code should not be reached", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"qemu_alloc_display: Assertion `surface->image != NULL' failed", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"Unexpected error in error_set_from_qdev_prop_error", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"Object .* is not an instance of type spapr-machine", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"Object .* is not an instance of type generic-pc-machine", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"Object .* is not an instance of type e500-ccsr", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'log':r"vmstate_register_with_alias_id: Assertion `!se->compat \|\| se->instance_id == 0' failed", 'loglevel':logging.ERROR}, - {'exitcode':-6, 'device':'isa-fdc', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'device':'gus', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'device':'isa-serial', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'device':'sb16', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'device':'cs4231a', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'machine':'isapc', 'device':'.*-iommu', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'device':'mioe3680_pci', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'device':'pcm3680_pci', 'loglevel':logging.ERROR, 'expected':True}, - {'exitcode':-11, 'device':'kvaser_pci', 'loglevel':logging.ERROR, 'expected':True}, + # Known crashes will generate warn messages + # FIXME: all those crashes MUST be fixed, and all these entries MUST be removed + {'exitcode':-6, 'log':r"Device 'serial0' is in use", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"qemu_net_client_setup: Assertion `!peer->peer' failed", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r'RAMBlock "[\w.-]+" already registered', 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"find_ram_offset: Assertion `size != 0' failed.", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"add_cpreg_to_hashtable: code should not be reached", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"qemu_alloc_display: Assertion `surface->image != NULL' failed", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"Unexpected error in error_set_from_qdev_prop_error", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"Object .* is not an instance of type spapr-machine", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"Object .* is not an instance of type generic-pc-machine", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"Object .* is not an instance of type e500-ccsr", 'loglevel':logging.WARN}, + {'exitcode':-6, 'log':r"vmstate_register_with_alias_id: Assertion `!se->compat \|\| se->instance_id == 0' failed", 'loglevel':logging.WARN}, + {'exitcode':-6, 'device':'isa-fdc', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'device':'gus', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'device':'isa-serial', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'device':'sb16', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'device':'cs4231a', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'machine':'isapc', 'device':'.*-iommu', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'device':'mioe3680_pci', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'device':'pcm3680_pci', 'loglevel':logging.WARN, 'expected':True}, + {'exitcode':-11, 'device':'kvaser_pci', 'loglevel':logging.WARN, 'expected':True}, # everything else (including SIGABRT and SIGSEGV) will be a fatal error: {'exitcode':None, 'fatal':True, 'loglevel':logging.FATAL}, From patchwork Fri Mar 9 20:28:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883985 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyfGJ4qxvz9sf2 for ; Sat, 10 Mar 2018 07:33:12 +1100 (AEDT) Received: from localhost ([::1]:47960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOhS-00035Y-FB for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:33:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOdN-00009H-9g for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOdM-0006tj-Iw for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36628) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOdM-0006tY-Ch for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:56 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF018C058EA8; Fri, 9 Mar 2018 20:28:55 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F7016266D; Fri, 9 Mar 2018 20:28:54 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:26 -0300 Message-Id: <20180309202827.12085-8-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 09 Mar 2018 20:28:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 7/8] device-crash-test: Don't print warnings in quiet mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This will be useful for hiding known crashes on "make check". Signed-off-by: Eduardo Habkost --- scripts/device-crash-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index ed9a552fa1..36194e4347 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -533,7 +533,7 @@ def main(): dest='loglevel', const=logging.INFO, help='verbose output') parser.add_argument('-q', '--quiet',action='store_const', - dest='loglevel', const=logging.WARN, + dest='loglevel', const=logging.ERROR, help='non-verbose output') parser.add_argument('-r', '--random', type=int, metavar='COUNT', help='run a random sample of COUNT test cases', From patchwork Fri Mar 9 20:28:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 883988 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyfND1c2Cz9sd5 for ; Sat, 10 Mar 2018 07:38:20 +1100 (AEDT) Received: from localhost ([::1]:47987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOmQ-0007Xr-3A for incoming@patchwork.ozlabs.org; Fri, 09 Mar 2018 15:38:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOdP-0000Bn-8p for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:29:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOdO-0006ug-Fe for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50548) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euOdO-0006uR-AW for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:28:58 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 987BAC049D5C; Fri, 9 Mar 2018 20:28:57 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B8297E231; Fri, 9 Mar 2018 20:28:56 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:28:27 -0300 Message-Id: <20180309202827.12085-9-ehabkost@redhat.com> In-Reply-To: <20180309202827.12085-1-ehabkost@redhat.com> References: <20180309202827.12085-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 09 Mar 2018 20:28:57 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 8/8] tests: Run device-crash-test on "make check" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Run a subset of tests using device-crash-test on "make check", to help us catch device crashes earlier. This also add a "check-device-crash-test-full" rule, that will check all machine/device combinations. Signed-off-by: Eduardo Habkost --- tests/Makefile.include | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index ef9b88c369..0ba641b8d4 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -942,6 +942,17 @@ check-decodetree: ./check.sh "$(PYTHON)" "$(SRC_PATH)/scripts/decodetree.py", \ TEST, decodetree.py) +CRASH_TEST = $(SRC_PATH)/scripts/device-crash-test +CRASH_TEST_OPTIONS = $(if $(V),-v,-q) +CRASH_TEST_BINARIES = $(foreach TARGET,$(TARGETS), $(TARGET)-softmmu/qemu-system-$(TARGET)) + +.PHONY: check-device-crash-quick +check-device-crash-quick: + $(CRASH_TEST) $(CRASH_TEST_OPTIONS) -t machine=DEFAULT accel=tcg -- $(CRASH_TEST_BINARIES) + +check-device-crash-full: + $(CRASH_TEST) $(CRASH_TEST_OPTIONS) -F $(CRASH_TEST_BINARIES) + # Consolidated targets .PHONY: check-qapi-schema check-qtest check-unit check check-clean @@ -950,7 +961,7 @@ check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) check-unit: $(patsubst %,check-%, $(check-unit-y)) check-speed: $(patsubst %,check-%, $(check-speed-y)) check-block: $(patsubst %,check-%, $(check-block-y)) -check: check-qapi-schema check-unit check-qtest check-decodetree +check: check-qapi-schema check-unit check-qtest check-decodetree check-device-crash-quick check-clean: $(MAKE) -C tests/tcg clean rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)