From nobody Tue Nov 18 19:43:47 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612299563; cv=none; d=zohomail.com; s=zohoarc; b=ZO78PgONVwTicDJeni1/5E8uZUqjQv+W9UsG4PLLeBTRyLpaGGCBpUmCbn+5pklJmor5aeB0Igop/dfjwkBDEJgCemwu0Iw3XGRpXfbC27BPnJAvCfXJlHBXyfmMiVEUGEVmIVgCQSIkoD5O33Tq+5Hgym+PMc78dNFUHRgbHWQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612299563; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ND9ZC1FHVt0d7eciPZVn1MRDtBcHT7RVOlI71H770Mo=; b=euuhw4qdxmv1fXDV2jWpLAsHxcpiGxZsI5QQxFUTo1A63+xr4pqcBaXYSQf2qDLMAFsn9W48VDDi/5wSb86oN8KeTpe3DyncPVrhXKRNyG+upLZJu8p6PQJNyp0f26anhiyE9XDHSIOcRvA5PyEuuBfRwe7nFV3+H04tgsJMhW8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612299563784179.61663242113377; Tue, 2 Feb 2021 12:59:23 -0800 (PST) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-255-RVxv5TimNga3n62M6UF06A-1; Tue, 02 Feb 2021 15:59:21 -0500 Received: by mail-ed1-f69.google.com with SMTP id i13so4221536edq.19 for ; Tue, 02 Feb 2021 12:59:21 -0800 (PST) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299562; 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=XfjaFdhB5w9zgtYFho3mecuSNjqlrrzDHXe7EZyekXIaCRIFspFbIrhdUoAHNBraOvsttb ekhHZqV+RnwXSFxpRd0O+tFum8dnKJOZThYk5CDPxPS33YPUrk7xkkq7VOvqAXxQklIjV2 ABdDvTw2rAZbnF/dKaVIYOsZzliCnNw= X-MC-Unique: RVxv5TimNga3n62M6UF06A-1 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=aIfMfqZ6Rh174VBh8/i4i8bDebXsa0Cde6Tj8Uex2WUfLF0ydCZK7V6XwJlShcVLRo h8AE6K0Mq1AfUq5i8ipWU8mCRsh2RWBvgi1y0FTCbz6glTP6qu/KwKX6XOlqjQmy6oCB w+NWxQAOEy+c79Umv8Isz8Ln6TS0rTYrk394oIj95Px3Wfg3eVtTc/f47z+lSkEQW2ht inDUhD3hLidYSWmqi3BLhIVT2tZlVr6d5rsK2SX6gccPVdbHPrF0AUfCiYPKJIzp+FaV twTMnhOqhLnndIYqcI+skaIteHdrmGL3ZTlW0p0GTtX9VL7dXtFoZJdFJ1uft+NQioJ2 sQfQ== X-Gm-Message-State: AOAM533j7rFakMrUnjxyVPoWUbp31c5rQ/CIYHCaDO9ExN178Ua/0tOR w2CbRrAx468SuZxSsQ9XjNGpDwvzkp2HuUmAXR0ZX+/+mNxXHAOd95Aft1A4oBmoNITAia/mU65 DEYu8b0SV83D4sQ== X-Received: by 2002:a17:906:1c11:: with SMTP id k17mr12127657ejg.70.1612299560073; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , "Dr. David Alan Gilbert" , Eduardo Otubo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Gerd Hoffmann , Aurelien Jarno , qemu-block@nongnu.org, Kevin Wolf , Michael Roth , Peter Maydell , Alex Williamson , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 =3D logging.getLogger('device-crash-test') dbg =3D logger.debug =20 =20 -# Purposes of the following whitelist: +# Purposes of the following allowlist: # * Avoiding verbose log messages when we find known non-fatal # (exitcode=3D1) 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=3D1 will # just trigger a INFO message. =20 -# 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 =3D 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 =3D [ +ERROR_ALLOWLIST =3D [ # Machines that won't work out of the box: # MACHINE | ERROR MESSAGE {'machine':'niagara', 'expected':True}, # Unable to load a firmw= are for -M niagara @@ -187,9 +187,9 @@ ERROR_WHITELIST =3D [ =20 =20 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 =20 - 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): =20 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) =20 =20 def findExpectedResult(t): - """Check if there's an expected=3DTrue whitelist entry for a test case + """Check if there's an expected=3DTrue allowlist entry for a test case =20 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): =20 =20 def whitelistResultMatch(wl, r): - """Check if test case results/output match a whitelist entry + """Check if test case results/output match a allowlist entry =20 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): =20 =20 def checkResultWhitelist(r): - """Look up whitelist entry for a given test case result + """Look up allowlist entry for a given test case result =20 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(): =20 if f: i, wl =3D 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 =3D wl.get('loglevel', logging.DEBUG) logFailure(f, level) @@ -561,9 +561,9 @@ def main(): =20 if args.debug: stats =3D sorted([(len(wl_stats.get(i, [])), wl) for i, wl in - enumerate(ERROR_WHITELIST)], key=3Dlambda x: x[0]) + enumerate(ERROR_ALLOWLIST)], key=3Dlambda x: x[0]) for count, wl in stats: - dbg("whitelist entry stats: %d: %r", count, wl) + dbg("allowlist entry stats: %d: %r", count, wl) =20 if fatal_failures: for f in fatal_failures: --=20 2.26.2