From patchwork Tue Mar 5 18:40:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 13582861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55704C54E41 for ; Tue, 5 Mar 2024 18:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5mnqyLif6/Zt3KKdq6tOKbc8kTgg1X1dQKGPUl1gxa0=; b=xT+aIWX2tKyHSA RlTUzoJQL/cOhD3X1Z2EoT8nXZttEZC47HOr3DP/Pu6kbVIJbnXjWVwIKz6/UQCmH09gIRkMFi9f/ VOZWY2ndlot/5GlnGfYJs/wKEpd/XHa6nAN8bfDREtVQHD5BOX+PnimWxL9zL52m1t4RZpx04sE8v MgaNGj9ZBlco6ho5hvUz/FELQSPm1qvvmO7yP0/+hernBfvq57qmBwXEDhqcMEakz60+oX0XTEUjJ blmTP0dv3r0b2i3iB+mkO8RqRVAqBmoJiDVJ+dnUEKeW/IPzUZb7XJWmSMwSXV/v/WtxgrUmjzHRS M25JdgAP+NIThCOu5yAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhZie-0000000EtJ0-39Td; Tue, 05 Mar 2024 18:40:52 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhZiZ-0000000EtC7-44s8 for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 18:40:50 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6e5d7f1f25fso2642775b3a.0 for ; Tue, 05 Mar 2024 10:40:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709664045; x=1710268845; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=NGQg+0HBD/PmNnv+fI5fQqG3IGlyLsIaZmNJE7ZYwjo=; b=dn7t4t+3cnBbjRxL8QDnhKzyGrfTvP4r8pOMBqOQdchfVsBlbUoUC02DN8+DYr1Axz X2C8FOxCCOIS/xKxsed0mRuemn7eMRt+syTMSZsUx0REsWexEEmYzsHGvNjqbZr4/JKs RqMGS+wEZ97hWRFmibQuz2YAzVAUWlnnni1urpY6pnCX7oHrTk1cYI9oYhqmPJ4/Ty7l GLunEMcrFpdOC40Xkl6ddvYpc0TnltQRrz1vfzwa/kQEwAvQ8Jglb/VSFafGBwp03jiK Zn8NeGLYWXxbX8oFXroKXp5jz+EDVk2p2Fie3JylflKq6XPNokF+9lcJwZdWAVqhE17g eoXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709664045; x=1710268845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NGQg+0HBD/PmNnv+fI5fQqG3IGlyLsIaZmNJE7ZYwjo=; b=enFYuVQ9eXzz67nDExmqiPRsnJfGMCuasssfhhknM9yS46nxLrtTx/0afIYOzyKAT1 vWzwx3BsvcToU4RNH2BGihEbIJVRY3QEKVE0EqbeJcZrezU97JUxBgEk6luH76s6j1nG ImaqdgubcQSKsFF3cvubWK0cy2JdaWnjZW8Md6gRlwiFS1uu/LmtBqrO3jBUwwEgc3pC jTzCZI4muou0vR61QmxGFuEEOaSYLKwJEu5WI06bp+1oQC7p8RbA+7OJmwkeyd2LqvEM AIIlOvCLxCEB7jyMi9S4zYiMcGnHmHqBDokDN2bXWypEJ0AqkJyCPdbrxXPxmOsa61We TpaQ== X-Forwarded-Encrypted: i=1; AJvYcCW/ikys50ddhPm4Kj5nFD4yp9wMFpAvrudd20pDsQNCOUK9vbG3wPHrDKpOEjZJ4wU/SXNoAFePCb+pAyK9999SCNKWCoa/Z7EllWhm4AB1LW5NtZ4= X-Gm-Message-State: AOJu0Yxmxn0EpzNbgvhSvsx5XG6xZo+Qk1oxVAP595isCrHF5v/Ht1s9 jkGX2rXX9trc7NLFYt7CZ5b9QOtnEtrhEFSp1+bOyj0W/uw4X0dt X-Google-Smtp-Source: AGHT+IEEib95LASlxflZmOGoKOqjWt2O08nr6/dUyPF5bkMtYTcUru+1PyW5JqlUhb0RbpsxEBo7Nw== X-Received: by 2002:a05:6a21:8cc5:b0:1a1:47cb:9709 with SMTP id ta5-20020a056a218cc500b001a147cb9709mr3127651pzb.44.1709664045282; Tue, 05 Mar 2024 10:40:45 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id b5-20020aa78ec5000000b006e50c083b90sm9219955pfr.212.2024.03.05.10.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 10:40:43 -0800 (PST) From: Guenter Roeck To: linux-kselftest@vger.kernel.org Cc: David Airlie , Arnd Bergmann , =?utf-8?q?Ma=C3=ADra_Canal?= , Dan Carpenter , Kees Cook , Daniel Diaz , David Gow , Arthur Grillo , Brendan Higgins , Naresh Kamboju , Maarten Lankhorst , Andrew Morton , Maxime Ripard , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Daniel Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kunit-dev@googlegroups.com, linux-arch@vger.kernel.org, Guenter Roeck Subject: [RFC PATCH 2/5] drm: Suppress intentional warning backtraces in scaling unit tests Date: Tue, 5 Mar 2024 10:40:30 -0800 Message-Id: <20240305184033.425294-3-linux@roeck-us.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240305184033.425294-1-linux@roeck-us.net> References: <20240305184033.425294-1-linux@roeck-us.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240305_104048_276977_17023485 X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The drm_test_rect_calc_hscale and drm_test_rect_calc_vscale unit tests intentionally trigger warning backtraces by providing bad parameters to the tested functions. What is tested is the return value, not the existence of a warning backtrace. Suppress the backtraces to avoid clogging the kernel log. Signed-off-by: Guenter Roeck --- drivers/gpu/drm/tests/drm_rect_test.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_rect_test.c b/drivers/gpu/drm/tests/drm_rect_test.c index 76332cd2ead8..75614cb4deb5 100644 --- a/drivers/gpu/drm/tests/drm_rect_test.c +++ b/drivers/gpu/drm/tests/drm_rect_test.c @@ -406,22 +406,28 @@ KUNIT_ARRAY_PARAM(drm_rect_scale, drm_rect_scale_cases, drm_rect_scale_case_desc static void drm_test_rect_calc_hscale(struct kunit *test) { + DEFINE_SUPPRESSED_WARNING(drm_calc_scale); const struct drm_rect_scale_case *params = test->param_value; int scaling_factor; + START_SUPPRESSED_WARNING(drm_calc_scale); scaling_factor = drm_rect_calc_hscale(¶ms->src, ¶ms->dst, params->min_range, params->max_range); + END_SUPPRESSED_WARNING(drm_calc_scale); KUNIT_EXPECT_EQ(test, scaling_factor, params->expected_scaling_factor); } static void drm_test_rect_calc_vscale(struct kunit *test) { + DEFINE_SUPPRESSED_WARNING(drm_calc_scale); const struct drm_rect_scale_case *params = test->param_value; int scaling_factor; + START_SUPPRESSED_WARNING(drm_calc_scale); scaling_factor = drm_rect_calc_vscale(¶ms->src, ¶ms->dst, params->min_range, params->max_range); + END_SUPPRESSED_WARNING(drm_calc_scale); KUNIT_EXPECT_EQ(test, scaling_factor, params->expected_scaling_factor); }