From: Sean Anderson Date: Tue, 6 Oct 2020 18:04:09 -0400 Subject: [PATCH 15/18] cmd: log: Add commands to manipulate filters In-Reply-To: References: <20201006191610.761899-1-seanga2@gmail.com> <20201006191610.761899-16-seanga2@gmail.com> Message-ID: <57bb76b0-b5e9-5fd3-16d0-c9af193a3df2@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/6/20 6:02 PM, Simon Glass wrote: > Hi Sean, > > On Tue, 6 Oct 2020 at 13:16, Sean Anderson wrote: >> >> This adds several commands to add, list, and remove log filters. Due to the >> complexity of adding a filter, `log filter-list` uses options instead of >> positional arguments. >> >> These commands have been added as subcommands to log by using a dash to >> join the subcommand and subsubcommand. This is stylistic, and they could be >> converted to proper subsubcommands if it is wished. >> >> Signed-off-by: Sean Anderson >> --- >> >> cmd/Kconfig | 1 + >> cmd/log.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 214 insertions(+) > > I see you have a lot of comments already, It's great to see this > feature. But please do add some sort of test for the command itself. > > You don't need to test that the filters work; that sort of thing > belongs in the log tests. But the command test should check that > various commands are interpreted correctly, result in some action (you > can check the log state directly if you provide a helper function to > export data structures) and output things correctly (for commands that > produce output). Is the test in the next patch inadequate? --Sean