From patchwork Tue Nov 14 02:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 743756 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp1960129wrw; Mon, 13 Nov 2023 18:14:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHM9zQOBTJVGphG2TpRd6FsycbAT2B/Pjw5ivQM/9qm6v0K8Bk983A6wCnGpDR1q9xp4sZ X-Received: by 2002:aa7:c9d9:0:b0:544:1fa7:b6c1 with SMTP id i25-20020aa7c9d9000000b005441fa7b6c1mr6038173edt.0.1699928097637; Mon, 13 Nov 2023 18:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699928097; cv=none; d=google.com; s=arc-20160816; b=hc9+GfLIkp8PMASyUundzzREOP8vfwQrvdF844fiQ28ZfdE7PlcTp4Do0XoslFPnqw f7yZhlruSvYhRYjM9IWaI7pR85NA9XJla0LsTuvQVxTdwH6ArNJziH/1Zu3d/mj2yh5b E19tb5sUuq04LF5KZes9VLN9hZJa/3YiL4eOAUp2X4bqycFSoUqV3NRB/Nud/Z7RUy1O t5VemQn+lN13W+h9C+9+KpDowE1nPOmdG4msbMcI+RT2oMWFM7gJCbOVewodUgzMY09f 9CLRNKEYYnUrStx9ryl1df+UscHYbbDSdDKxRjLwePw6mo0DP9vsUp7KUlfP763wG5U6 DAVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LMQ30vVJ6x3VuIzzlPgixo+7jt4+e1KA7PiQ5YhXggU=; fh=FEXntNvfp44QdEE6WJIcPMgg3VtrFk//sTXqtO2Yfu8=; b=lrQAoHZX+zAXuUdKfq4YQRLqJn6x5P4R5Jpv0duSR1vN118lgDA8qYE3YBE7T+r9yH lKd5fKPGDhUwHHeiTPHldvJTatMYtHoD6U7Ob/c8TmrHxZAJJlsdlJEID0NKYkEzJbBb w0GvZX5F3czHpjS4c2DzsGyZ/JLRtMc7Ymmq5De6J9F7CdV5XlbGHq6eu3CAlgISV0Ac aq4MPpz02tlg/VsRzlgVJH9dY0lv/aghJsrfABj90YKjZhPomfpHcHiFEYyJ4QRl1/Uh 53nxtXTHrflU07GfyVkjzHPNR30ul5QrYg362y/FONrLofYfiJND2TJGeinJqPI5BSUU pKmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hCybj/ZD"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id t13-20020a50d70d000000b0053e671320a8si3425881edi.377.2023.11.13.18.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 18:14:57 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hCybj/ZD"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A805A871C1; Tue, 14 Nov 2023 03:14:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="hCybj/ZD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 889F6871A5; Tue, 14 Nov 2023 03:14:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 59237870F6 for ; Tue, 14 Nov 2023 03:14:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1cc703d2633so5563575ad.0 for ; Mon, 13 Nov 2023 18:14:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699928085; x=1700532885; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LMQ30vVJ6x3VuIzzlPgixo+7jt4+e1KA7PiQ5YhXggU=; b=hCybj/ZDsvbt5ZxHNErB/Q/w/QPzuoSRz3AiFcWrerQ8FKLGapwfbj9Glj3NpBmkSK eJ8xbItjVm/jz4iiD21e+rVvj59c1/wSo6Cmul+qOeh+xItw0Gg7coyHhw6Ss7HSB6cq pr8rPr+s4VkeoU/UQawH9Ct/JTk8+W5YidmgdJi7y00aZ0gXRDi3vcNXmFYgE2cmWNwO dv67BO9wiFsrGyL8Cky07MgdgtgSCpz0XHLJH2f6cI+ZVc2sbeZGvVCn9//OD8r/rLrv Kts7dgLzq3sZLIxSaf2OzDdeWmPE0peekej5V/QAg2B6hD/0OyOznC2f3iNf2Sa8QBD5 krqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699928085; x=1700532885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LMQ30vVJ6x3VuIzzlPgixo+7jt4+e1KA7PiQ5YhXggU=; b=IlayWiP4lgEL8x/PfklzYaHaIbhuyJTJoZ1PVxyBjia7mwOfg/e08DQrXMM2tvt41i IZaD0hpk0Q9O1i9tD4Rv9VHOuSungoxkNnbFs80OtIJQivj7f5W9rFhxD1HJKSuFonIb bahxlMJ7RripoOJRyKNaO8cQ/xkbZg1UvHFApoOTtAg7402wA4wXpxarSImA/1VuFAoB Vl0pz9wpw/jyE7hqIsnAZUVbe8fQOj88I8Xu+8sAjRY6vW2kWpoiNvkaMGI4lc0PP6CC je7FrCGl2xCQ/hWikQGlG56Q80Gr6sGDaUBSLcidiJzOOO2XLWRjhkhCAkc3DNWriDgN IODA== X-Gm-Message-State: AOJu0YxRSfs6UvSOidvDVOMem8Xbliqf9wOS2QI+UtYEC5s+3AnBJbld DAyY3OC4tNiEllh4g7QwrFVbTx5ax47Rr8zRf+ddAA== X-Received: by 2002:a17:902:d2c9:b0:1cc:2bc4:5157 with SMTP id n9-20020a170902d2c900b001cc2bc45157mr1201454plc.1.1699928085520; Mon, 13 Nov 2023 18:14:45 -0800 (PST) Received: from octopus.. ([2400:4050:c3e1:100:66f2:cd5c:3d82:6e6f]) by smtp.gmail.com with ESMTPSA id i4-20020a170902c94400b001c61afa7009sm4680475pla.114.2023.11.13.18.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 18:14:45 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com, sjg@chromium.org Cc: etienne.carriere@st.com, michal.simek@amd.com, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v3 1/5] test: dm: skip scmi tests against disabled protocols Date: Tue, 14 Nov 2023 11:14:24 +0900 Message-Id: <20231114021428.531887-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231114021428.531887-1-takahiro.akashi@linaro.org> References: <20231114021428.531887-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This is a precautionary change to make scmi tests workable whether or not a specific protocol be enabled. If a given protocol is not configured, we skip the test by returning -EAGAIN. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- v9 * return -EAGAIN if we want to skip a test * use CONFIG_IS_ENABLED() rather than IS_ENABLED() --- test/dm/scmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/dm/scmi.c b/test/dm/scmi.c index da45314f2e4c..582485471fff 100644 --- a/test/dm/scmi.c +++ b/test/dm/scmi.c @@ -217,6 +217,9 @@ static int dm_test_scmi_power_domains(struct unit_test_state *uts) u8 *name; int ret; + if (!CONFIG_IS_ENABLED(SCMI_POWER_DOMAIN)) + return -EAGAIN; + /* preparation */ ut_assertok(load_sandbox_scmi_test_devices(uts, &agent, &dev)); ut_assertnonnull(agent); @@ -317,6 +320,9 @@ static int dm_test_scmi_clocks(struct unit_test_state *uts) int ret_dev; int ret; + if (!CONFIG_IS_ENABLED(CLK_SCMI)) + return -EAGAIN; + ret = load_sandbox_scmi_test_devices(uts, &agent, &dev); if (ret) return ret; @@ -382,6 +388,9 @@ static int dm_test_scmi_resets(struct unit_test_state *uts) struct udevice *agent_dev, *reset_dev, *dev = NULL; int ret; + if (!CONFIG_IS_ENABLED(RESET_SCMI)) + return -EAGAIN; + ret = load_sandbox_scmi_test_devices(uts, &agent, &dev); if (ret) return ret; @@ -418,6 +427,9 @@ static int dm_test_scmi_voltage_domains(struct unit_test_state *uts) struct udevice *dev; struct udevice *regul0_dev; + if (!CONFIG_IS_ENABLED(DM_REGULATOR_SCMI)) + return -EAGAIN; + ut_assertok(load_sandbox_scmi_test_devices(uts, &agent, &dev)); scmi_devices = sandbox_scmi_devices_ctx(dev);