From nobody Tue Nov 18 21:12:21 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612545529; cv=none; d=zohomail.com; s=zohoarc; b=PfqgyhKW9bvsiFsHfDmv9mPn1dgDkjSQWpV+xMfW1zV70AKhPoS0oivUqYMlSRg7clpoEJEq86ldiulW9TJTZjzHGXJCZMwFx3Im7dcCQeyQJFFvtNNReuJxTjQRy+W761xHgwD34iPnifcN/8TRnaDo4eQgOva5KOqVzptqdP0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612545529; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=FQi3w0O1coZt6pmTX+ouvpYjqMMGeb2x43DFaeB1Fcs=; b=Gug0lIcdkAiT4HUxQNCCWYVYKeg1P/UsTaRVBGO7q8Wy8XoFL6JSKVf4ze8G+or3ezLwxSqXj3qyP+lYaOklvELULCiyQr8VU3QO55JRt0myMVUr5ZZYSpE9pmnqshGIJ52bi7+ybG3cu9Gz/7/9ewoCNGjCOERdNhPS49FwCT8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612545529273796.0617447457868; Fri, 5 Feb 2021 09:18:49 -0800 (PST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-284-sNC7thQIMGWXcLxYOBVkkg-1; Fri, 05 Feb 2021 12:18:46 -0500 Received: by mail-ed1-f72.google.com with SMTP id g2so7310944edq.14 for ; Fri, 05 Feb 2021 09:18:46 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id c6sm4378478edx.62.2021.02.05.09.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 09:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612545528; 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=FQi3w0O1coZt6pmTX+ouvpYjqMMGeb2x43DFaeB1Fcs=; b=D6Zuu4ztV55R+JTTJM+2riaTWi7kVp3b+3l88vU4+CUp8YUwpQxec29iwZWHhldsoyP1oM QsItB7pZRtf+/FLEklC5+0QLMcfoyVSf2ONSoOFBhIZHhHgHvhBzIS2FolJXZKUbjXxp6X AYZ0xlDAlHg5cUhh1WIHh6ndVPX0wEo= X-MC-Unique: sNC7thQIMGWXcLxYOBVkkg-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=FQi3w0O1coZt6pmTX+ouvpYjqMMGeb2x43DFaeB1Fcs=; b=D8QGIlgSh2Iie+D8QUSLyb0pcEWiU2imQLntdH25ENLnVuqaUBzRoJe7MhqjxDY6SZ Ps2bDhFve79B/FCXd9n8OaPvKl1CMWmDgvwAkAFnTE8fCWdBJIFp6BLFrgIO2jiZMLGB jQ0dGaFOL9IV77dZ8ep/PU5ewc3JCO0kMp/uLJtRZC5FPJ1+JN4A932QRj2tn314Fq8A A31vvIE5T+IFn3emAdovEmkybD1JgEgpiM9PhxrNgXf8TSzQT25n7L44px+zCOKiZZ0f uOjHi8Bq4eTMx2Orov0BmwyjJlm4jB+sVLcVdL77BNyB3AEOE1YfDPgco5U2V5YVULvT UNoA== X-Gm-Message-State: AOAM531iyjz7CsyWgHeOPqJFBZXDXsUh3olM45J1NxV0jkZISsBNmiWd eWEDZlN3j8KoNELFuhZHFj4d6Mur5agd5WpT0c+JjB0rVXpCNvbcuWA+u0BzFH57KmylqVNROrI RY/UPJK24Z2dtog== X-Received: by 2002:a05:6402:b26:: with SMTP id bo6mr4400623edb.46.1612545525398; Fri, 05 Feb 2021 09:18:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQERWebt5v9yJf36b+BVR5uxKSIdmBZCqA7xPibaYGs712/N4uNoBimXgddA2LnCfPiljYTA== X-Received: by 2002:a05:6402:b26:: with SMTP id bo6mr4400606edb.46.1612545525213; Fri, 05 Feb 2021 09:18:45 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Dr. David Alan Gilbert" , Max Reitz , Peter Maydell , Stefan Hajnoczi , Eduardo Otubo , qemu-block@nongnu.org, Gerd Hoffmann , Aurelien Jarno , Michael Roth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alex Williamson , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v2 4/8] scripts/device-crash-test: Replace the word 'whitelist' Date: Fri, 5 Feb 2021 18:18:13 +0100 Message-Id: <20210205171817.2108907-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210205171817.2108907-1-philmd@redhat.com> References: <20210205171817.2108907-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 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Philippe Mathieu-Daud=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