From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 21/23] test: Add a test for log filter-*
Date: Tue, 27 Oct 2020 17:11:58 -0400 [thread overview]
Message-ID: <a8d57294-e004-8b06-795f-785fdcaf300e@gmail.com> (raw)
In-Reply-To: <20201027210052.GB5340@bill-the-cat>
On 10/27/20 5:00 PM, Tom Rini wrote:
> On Sat, Oct 17, 2020 at 02:07:46PM -0400, Sean Anderson wrote:
>
>> This exercises a few success and failure modes of the log filter-*
>> commands. log filter-list is not tested because it's purely informational.
>> I don't think there's a good way to test it except by testing if the output
>> of the command exactly matches a sample run.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Building this with Clang shows a real problem. A full log is over at
> https://dev.azure.com/u-boot/u-boot/_build/results?buildId=1386&view=logs&j=f22b025e-3f3e-5478-618e-bef68154f752&t=0594e91d-c1b1-5d5d-b353-a764bbd01b55
> but:
> /home/trini/u-boot/u-boot/test/log/log_filter.c:64:13: warning: implicit conversion from enumeration type 'enum uclass_id' to different enumeration type 'enum log_category_t' [-Wenum-conversion]
> UCLASS_MMC));
> ^~~~~~~~~~
> /home/trini/u-boot/u-boot/include/test/ut.h:124:41: note: expanded from macro 'ut_asserteq'
> unsigned int _val1 = (expr1), _val2 = (expr2); \
> ^~~~~
> /home/trini/u-boot/u-boot/test/log/log_filter.c:66:13: warning: implicit conversion from enumeration type 'enum uclass_id' to different enumeration type 'enum log_category_t' [-Wenum-conversion]
> UCLASS_SPI));
> ^~~~~~~~~~
> /home/trini/u-boot/u-boot/include/test/ut.h:124:41: note: expanded from macro 'ut_asserteq'
> unsigned int _val1 = (expr1), _val2 = (expr2); \
> ^~~~~
> 2 warnings generated.
>
> Was perhaps an earlier series, or some other series, adding LOGC_MMC /
> LOGC_SPI ? Thanks!
>
I think it's because UCLASS_SPI is an enum uclass_t, and those functions
expect a enum log_category_t. They should be cast with log_uc_cat. I can
send a v4 fixing this.
--Sean
next prev parent reply other threads:[~2020-10-27 21:11 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-17 18:07 [PATCH v3 00/23] log: Add commands for manipulating filters Sean Anderson
2020-10-17 18:07 ` [PATCH v3 01/23] log: Fix missing negation of ENOMEM Sean Anderson
2020-10-17 18:07 ` [PATCH v3 02/23] log: Fix incorrect documentation of log_filter.cat_list Sean Anderson
2020-10-17 18:07 ` [PATCH v3 03/23] log: Add additional const qualifier to arrays Sean Anderson
2020-10-17 18:07 ` [PATCH v3 04/23] log: Add new category names to log_cat_name Sean Anderson
2020-10-27 17:45 ` Tom Rini
2020-10-27 18:07 ` Sean Anderson
2020-10-27 18:08 ` Tom Rini
2020-10-17 18:07 ` [PATCH v3 05/23] log: Use CONFIG_IS_ENABLED() for LOG_TEST Sean Anderson
2020-10-17 18:07 ` [PATCH v3 06/23] log: Expose some helper functions Sean Anderson
2020-10-17 18:07 ` [PATCH v3 07/23] log: Add function to create a filter with flags Sean Anderson
2020-10-17 18:07 ` [PATCH v3 08/23] log: Add filter flag to deny on match Sean Anderson
2020-10-17 18:07 ` [PATCH v3 09/23] test: log: Convert log_test from python to C Sean Anderson
2020-11-03 15:11 ` Simon Glass
2020-10-17 18:07 ` [PATCH v3 10/23] test: log: Give tests names instead of numbers Sean Anderson
2020-11-03 15:11 ` Simon Glass
2020-10-17 18:07 ` [PATCH v3 11/23] test: Add tests for LOGFF_DENY Sean Anderson
2020-10-17 18:07 ` [PATCH v3 12/23] log: Add filter flag to match greater than a log level Sean Anderson
2020-10-17 18:07 ` [PATCH v3 13/23] test: Add test for LOGFF_MIN Sean Anderson
2020-10-17 18:07 ` [PATCH v3 14/23] cmd: log: Use sub-commands for log Sean Anderson
2020-10-17 18:07 ` [PATCH v3 15/23] cmd: log: Split off log level parsing Sean Anderson
2020-10-17 18:07 ` [PATCH v3 16/23] cmd: log: Add commands to list categories and drivers Sean Anderson
2020-10-17 18:07 ` [PATCH v3 17/23] cmd: log: Make "log level" print all log levels Sean Anderson
2020-10-17 18:07 ` [PATCH v3 18/23] lib: Add getopt Sean Anderson
2020-11-03 15:11 ` Simon Glass
2020-10-17 18:07 ` [PATCH v3 19/23] test: Add a test for getopt Sean Anderson
2020-11-03 15:11 ` Simon Glass
2020-10-17 18:07 ` [PATCH v3 20/23] cmd: log: Add commands to manipulate filters Sean Anderson
2020-10-17 18:07 ` [PATCH v3 21/23] test: Add a test for log filter-* Sean Anderson
2020-10-27 21:00 ` Tom Rini
2020-10-27 21:11 ` Sean Anderson [this message]
2020-10-27 21:12 ` Tom Rini
2020-10-17 18:07 ` [PATCH v3 22/23] doc: Add log kerneldocs to documentation Sean Anderson
2020-10-17 18:07 ` [PATCH v3 23/23] doc: Update logging documentation Sean Anderson
2020-10-27 20:58 ` Tom Rini
2020-10-27 21:00 ` Heinrich Schuchardt
2020-10-27 21:11 ` Sean Anderson
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=a8d57294-e004-8b06-795f-785fdcaf300e@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/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