On Mon, May 02, 2022 at 03:03:41PM +0530, Shivaprasad G Bhat wrote:
> On 4/29/22 00:38, Michal Suchanek wrote:
> > When ndctl is not installed /etc/ndctl.conf.d does not exist and the
> > monitor fails to start. Use in-tree configuration for testing.
> > 
> > Signed-off-by: Michal Suchanek <[email protected]>
> > Reviewed-by: Dan Williams <[email protected]>
> > ---
> >   test/monitor.sh | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/test/monitor.sh b/test/monitor.sh
> > index e58c908..c5beb2c 100755
> > --- a/test/monitor.sh
> > +++ b/test/monitor.sh
> > @@ -13,6 +13,8 @@ smart_supported_bus=""
> >   . $(dirname $0)/common
> > +monitor_conf="$TEST_PATH/../ndctl"
> 
> Though this patch gets the monitor to "listening" mode,
> its not really parsing anything from the $TEST_PATH/../ndctl

Yes, very likely. The tests do pass so not failing to not parse the
file is good enough at this point.

> 
> There are two issues here.
> 1) Using the iniparser for parsing the monitor config file
> when the parser is set to parse_monitor_config() for monitor.
> I have posted a patch for this at 
> https://patchwork.kernel.org/project/linux-nvdimm/patch/164750955519.2000193.16903542741359443926.stgit@LAPTOP-TBQTPII8/

Thanks for fixing this. I am not really using the monitor for anything
so I did not notice.

> 
> 2) The directory passed in -c would silently be ignored
> in parse_monitor_config() during fseek() failure. The command proceeds to
> monitor everything.
> 
> Should the -c option be made to accept the directory as argument?

This has been already asked, and as far as I am concerned the answere
remains the same:

The documentation of the -c option talks about files which implies a
directory should be accepted.

This can be resolved either by clarifying the documentation to make it clear
only single file is accepted for -c, or accepting a directory.

Thanks

Michal

Reply via email to