OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Orlov <ivan.orlov0322@gmail.com>
To: opensbi@lists.infradead.org
Subject: [PATCH] docs: writing_tests: Make docs correspond the latest changes
Date: Tue, 19 Mar 2024 16:02:39 +0000	[thread overview]
Message-ID: <20240319160239.303765-1-ivan.orlov0322@gmail.com> (raw)

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 <ivan.orlov0322@gmail.com>
---
 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`,
-- 
2.34.1



             reply	other threads:[~2024-03-19 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 16:02 Ivan Orlov [this message]
2024-03-20  5:42 ` [PATCH] docs: writing_tests: Make docs correspond the latest changes Anup Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240319160239.303765-1-ivan.orlov0322@gmail.com \
    --to=ivan.orlov0322@gmail.com \
    --cc=opensbi@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox