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
> 
> 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/
> 
> 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?

The documentation of -c states:

       -c, --config-file=
                  Provide the config file(s) to use. This overrides the
                  default config typically found in /etc/ndctl.conf.d

It is not clear from this description if file or directory is expected.
Given that it suggests multiple files can be provided it implies a
directory is accepted.

Either the description should be clarified or directory accepted.

Thanks

Michal


Reply via email to