From patchwork Tue Mar 19 16:02:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Orlov X-Patchwork-Id: 1913701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=UDKwIFYj; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PDlafogA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tzc2C6M6Jz1yWs for ; Wed, 20 Mar 2024 03:02:59 +1100 (AEDT) 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: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:In-Reply-To:References: List-Owner; bh=ZeAZgPj8CCb7RVdI/28PayqIVUs5bMazdEMChmEydNY=; b=UDKwIFYj+JVG98 80p/jduWjj4AXFQNr5cHj6k2Ndtl6SmxuxCsqLETepfFTSdRYfED/cHeooWHTT6lx2+/C9z8Xs5+Z e3oe6HQ3vAx8bBOXdICcVIhYXrDozZlAZL4kFqYWb5U6CbaRD6paDaPqgERx1GOB1bUCDjyAVWUwW eE/zURwFZDqfKus/v0P21uiVxOyjeyvQ56wXNWWHa44+QDDFoPH9xz7R3o8mnaR8Guo8AZwhxDLY0 /x+13/wvYf0BFNJa4XzZYglFPQrygFEQ98ow6rvPalUIw6X2RF8+on85JoaQRis2oYWmtgVoKeqIc H2LxCUJYm3RpWS11PH1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmbvO-0000000DGU8-1RXR; Tue, 19 Mar 2024 16:02:50 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmbvL-0000000DGTQ-0DL0 for opensbi@lists.infradead.org; Tue, 19 Mar 2024 16:02:48 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-513dca8681bso857634e87.0 for ; Tue, 19 Mar 2024 09:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710864164; x=1711468964; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=StNtUvADuZk50RbAvMlBouhlih+8QYZn5QTaXckIe1o=; b=PDlafogAI+ee1rHKCwyRZGo3o44khf+94+2t8l101ivlfC7pFkgw7WqyHwvYkL5sD4 KPAnlhOTdd3/PscDoEUaAe8GFGZ7gWKnLdCQaDsDmDbaZvXJjJJCJFNfGs4NZueVH3qR XW3G6AVHmqp9TnJMfcfM0x6KuRd/Ahn7nxqXP64VQRqoBZ96ZqTjosdzpZ7JOBdK1Da6 OGBGblka5ObjfPup1sUTRaapuyVQKBw+bhvGVH0BVyPd06x/iVBxt3Lj5ydXPLUIPuLF /LrLNdUQZE6RZvMyK39417g5leMWwuMVFnm2lVY1Pu/nPIELDWfXmhDou3PNU3YCDk21 PLGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710864164; x=1711468964; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=StNtUvADuZk50RbAvMlBouhlih+8QYZn5QTaXckIe1o=; b=pUxZBVi3SVJ7G4u70Zg8l33Z+/hagXi6aDdkO8P45U+cZQVg8Bkk0r/mV9N1NlUJOQ Tny2gH28sjDJaeTbPLAdQ5kS2cVEF/Nm/2lp4HrR/VKZ85/Qhk16bWw0b/EkbRKPMi8S K/+oUdsner16eRcSYrJKg1OI1txR44942BsTKftA2E+7ZtZSBICJTl4Oq/Os/E6Q4oYX aSpu4tswa/MZsHAnnR4hs4knxvZ7l6rZKfqcs8yMFK2ZQ3Bx4kEq8fhxZIDaGN8Y4MCo f9AttYnc28kjR8ZQOElYxZvf7Lu2oZ2aodWPc9sdhaOplOPPQ8T5+/1FYTdUNo2Xv+0T jbHA== X-Forwarded-Encrypted: i=1; AJvYcCWb//TdXX5ss/kp3HjPSLm7VvPTjL+F/M0SzixwlUoAik5xVdHcCw9Vwgyus6zbDL/wEpKhi9cSk1tLnPhb1FdPVRRUlGqRmi1pDrU= X-Gm-Message-State: AOJu0YwDpd3yyqMdBHa9qs/AuCJjxoCD5PZk9bDjeVplv/9Id15JbKDO llO5N2YphN5ZsEMi2IMnalSZh70kzDSnEbXfStmwW+xsc6AfL+pl X-Google-Smtp-Source: AGHT+IEay9s+KDGkXNn2jutEtC7EMRg0D4GpeADA5lO1VmCpfNzKwPOLGe7luSs1bQIj1k5s5nf+hw== X-Received: by 2002:a05:6512:3283:b0:513:ca5a:e9cb with SMTP id p3-20020a056512328300b00513ca5ae9cbmr8578100lfe.4.1710864164053; Tue, 19 Mar 2024 09:02:44 -0700 (PDT) Received: from ivan-HLYL-WXX9.guest.codethink.co.uk ([167.98.27.226]) by smtp.gmail.com with ESMTPSA id q2-20020a05600000c200b0033dedd63382sm12590316wrx.101.2024.03.19.09.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 09:02:43 -0700 (PDT) From: Ivan Orlov To: anup@brainfault.org Cc: Ivan Orlov , ajones@ventanamicro.com, opensbi@lists.infradead.org Subject: [PATCH] docs: writing_tests: Make docs correspond the latest changes Date: Tue, 19 Mar 2024 16:02:39 +0000 Message-Id: <20240319160239.303765-1-ivan.orlov0322@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240319_090247_189417_FC55342E X-CRM114-Status: GOOD ( 10.62 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: We should store test object files list in the `libsbi-objs-y` Makefile variable, not in `libsbitests-objs-y`. Update the documentation correspondingly. Since we don't use the `console_dev` static variable directly in the `sbi_console_test` unit test anymore, remove the paragraph which says that we do. Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [ivan.orlov0322(at)gmail.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ivan.orlov0322(at)gmail.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We should store test object files list in the `libsbi-objs-y` Makefile variable, not in `libsbitests-objs-y`. Update the documentation correspondingly. Since we don't use the `console_dev` static variable directly in the `sbi_console_test` unit test anymore, remove the paragraph which says that we do. Fixes: 86224ec36aed ("docs/writing_tests: Update tests paths") Signed-off-by: Ivan Orlov Reviewed-by: Anup Patel --- docs/writing_tests.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/writing_tests.md b/docs/writing_tests.md index 816adba..2ce887a 100644 --- a/docs/writing_tests.md +++ b/docs/writing_tests.md @@ -53,8 +53,8 @@ SBIUNIT_TEST_SUITE(string_test_suite, string_test_cases); Then, add the corresponding Makefile entries to `lib/sbi/tests/objects.mk`: ```lang-makefile ... -libsbitests-objs-$(CONFIG_SBIUNIT) += sbi_string_test.o carray-sbi_unit_tests-$(CONFIG_SBIUNIT) += string_test_suite +libsbi-objs-$(CONFIG_SBIUNIT) += sbi_string_test.o ``` If you compiled OpenSBI with CONFIG_SBIUNIT enabled before, you may need to @@ -113,9 +113,6 @@ carray-sbi_unit_tests-$(CONFIG_SBIUNIT) += string_test_suite You don't have to compile the `sbi_string_test.o` separately, because the test code will be included into the `sbi_string` object file. -See example in `lib/sbi/tests/sbi_console_test.c`, where statically declared -`console_dev` variable is used to mock the `sbi_console_device` structure. - "Mocking" the structures ------------------------ See the example of structure "mocking" in `lib/sbi/tests/sbi_console_test.c`,