From patchwork Tue Feb 2 20:58:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12062903 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F625C433E0 for ; Tue, 2 Feb 2021 21:07:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8AC6364DC4 for ; Tue, 2 Feb 2021 21:07:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AC6364DC4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72tD-0003Uh-JV for qemu-devel@archiver.kernel.org; Tue, 02 Feb 2021 16:07:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lh-0002RK-S8 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:25 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72lf-00079y-M8 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ND9ZC1FHVt0d7eciPZVn1MRDtBcHT7RVOlI71H770Mo=; b=K2Yd95sa7HqiwpnDtX7hcIjdztOzTLaDQJk2ZbgS6xI2XZFJVO6LORDW4sb7lponu7k17V JsG65gKkwB8BaRDDZrWQwYvvq8isJqCfn13CVr5+sATC/MBXF3SyN5l6G2bFygKXkTC9D4 12PHekA2nIgU/DCE1l1r8H6/d+Vos2c= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-vdG8eKCNPPmgXDrohOPkTA-1; Tue, 02 Feb 2021 15:59:21 -0500 X-MC-Unique: vdG8eKCNPPmgXDrohOPkTA-1 Received: by mail-ed1-f70.google.com with SMTP id a26so10289189edx.8 for ; Tue, 02 Feb 2021 12:59:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ND9ZC1FHVt0d7eciPZVn1MRDtBcHT7RVOlI71H770Mo=; b=tsTlH9Yg0NaH0477JR3TV0vj3LkmLryHHEs0u26lylqnI6K7WAZdJ1hbI1kFDVos3M 5L7sPoV1P2xFwdq0lrbMyTfukMLCStDBi2RSvBRcqsa5nAfgCD/UaMi1T2xQxZvhgrO6 Qf27L8mvtssqwcq8dP/OkCfnUkxBM9JTIMY4DlABcnaNj8wa0h/YkvYdtc2u02IIbsbr Rcwd4hWviFKoJUEBNAAcderU1UyPKQ2fMBSXnmjlEgaNWue0+I7Z1WQo2HLs9+uN9Hs7 3xTSdDigZhmR5HiHHBTwm3ERI0P5dZ6bO3z7dy33EVbZ7ijh6EvJ/zjsdcgEruq1UNC0 82Dg== X-Gm-Message-State: AOAM5314hagWjns8li6rM7h4iGSjtGRHNuis5OtdmM0+AMvLJ+5j0eHi g9URqRVyGHjEjwGbmHZOHMciQ3XTL/ORFCi4peciSAqU7wWQkM1tt6A40pRYzbJ7UsK0kRL6KYR pclPoq/5XRMlDzDPFEIQQmoO+oq+qy6paiTXLT5aOD++i4670Gzg2ovDTGvI3DTE7 X-Received: by 2002:a17:906:1c11:: with SMTP id k17mr12127663ejg.70.1612299560117; Tue, 02 Feb 2021 12:59:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzc66eDSSH+BNcm5+dNYek0/hknrIf+zCDC3iL5UggY339OUoxodhKrOYqWwBngv8T0oBxHgg== X-Received: by 2002:a17:906:1c11:: with SMTP id k17mr12127633ejg.70.1612299559816; Tue, 02 Feb 2021 12:59:19 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id lz12sm3436ejb.71.2021.02.02.12.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/12] scripts/device-crash-test: Replace the word 'whitelist' Date: Tue, 2 Feb 2021 21:58:19 +0100 Message-Id: <20210202205824.1085853-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "whitelist" appropriately. [*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- scripts/device-crash-test | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 04118669ba7..6812de42f8c 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -41,18 +41,18 @@ logger = logging.getLogger('device-crash-test') dbg = logger.debug -# Purposes of the following whitelist: +# Purposes of the following allowlist: # * Avoiding verbose log messages when we find known non-fatal # (exitcode=1) errors # * Avoiding fatal errors when we find known crashes # * Skipping machines/devices that are known not to work out of # the box, when running in --quick mode # -# Keeping the whitelist updated is desirable, but not required, +# Keeping the allowlist updated is desirable, but not required, # because unexpected cases where QEMU exits with exitcode=1 will # just trigger a INFO message. -# Valid whitelist entry keys: +# Valid allowlist entry keys: # * accel: regexp, full match only # * machine: regexp, full match only # * device: regexp, full match only @@ -62,7 +62,7 @@ dbg = logger.debug # * expected: if True, QEMU is expected to always fail every time # when testing the corresponding test case # * loglevel: log level of log output when there's a match. -ERROR_WHITELIST = [ +ERROR_ALLOWLIST = [ # Machines that won't work out of the box: # MACHINE | ERROR MESSAGE {'machine':'niagara', 'expected':True}, # Unable to load a firmware for -M niagara @@ -187,9 +187,9 @@ ERROR_WHITELIST = [ def whitelistTestCaseMatch(wl, t): - """Check if a test case specification can match a whitelist entry + """Check if a test case specification can match a allowlist entry - This only checks if a whitelist entry is a candidate match + This only checks if a allowlist entry is a candidate match for a given test case, it won't check if the test case results/output match the entry. See whitelistResultMatch(). """ @@ -206,16 +206,16 @@ def whitelistTestCaseMatch(wl, t): def whitelistCandidates(t): """Generate the list of candidates that can match a test case""" - for i, wl in enumerate(ERROR_WHITELIST): + for i, wl in enumerate(ERROR_ALLOWLIST): if whitelistTestCaseMatch(wl, t): yield (i, wl) def findExpectedResult(t): - """Check if there's an expected=True whitelist entry for a test case + """Check if there's an expected=True allowlist entry for a test case Returns (i, wl) tuple, where i is the index in - ERROR_WHITELIST and wl is the whitelist entry itself. + ERROR_ALLOWLIST and wl is the allowlist entry itself. """ for i, wl in whitelistCandidates(t): if wl.get('expected'): @@ -223,7 +223,7 @@ def findExpectedResult(t): def whitelistResultMatch(wl, r): - """Check if test case results/output match a whitelist entry + """Check if test case results/output match a allowlist entry It is valid to call this function only if whitelistTestCaseMatch() is True for the entry (e.g. on @@ -237,10 +237,10 @@ def whitelistResultMatch(wl, r): def checkResultWhitelist(r): - """Look up whitelist entry for a given test case result + """Look up allowlist entry for a given test case result Returns (i, wl) tuple, where i is the index in - ERROR_WHITELIST and wl is the whitelist entry itself. + ERROR_ALLOWLIST and wl is the allowlist entry itself. """ for i, wl in whitelistCandidates(r['testcase']): if whitelistResultMatch(wl, r): @@ -544,7 +544,7 @@ def main(): if f: i, wl = checkResultWhitelist(f) - dbg("testcase: %r, whitelist match: %r", t, wl) + dbg("testcase: %r, allowlist match: %r", t, wl) wl_stats.setdefault(i, []).append(f) level = wl.get('loglevel', logging.DEBUG) logFailure(f, level) @@ -561,9 +561,9 @@ def main(): if args.debug: stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in - enumerate(ERROR_WHITELIST)], key=lambda x: x[0]) + enumerate(ERROR_ALLOWLIST)], key=lambda x: x[0]) for count, wl in stats: - dbg("whitelist entry stats: %d: %r", count, wl) + dbg("allowlist entry stats: %d: %r", count, wl) if fatal_failures: for f in fatal_failures: