
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=log... 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