All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Tim.Bird@sony.com>
To: wangmy@cn.fujitsu.com, fuego@lists.linuxfoundation.org
Subject: Re: [Fuego] [PATCH] dovecot: fix test of logfile and ps.
Date: Tue, 9 Oct 2018 18:41:35 +0000	[thread overview]
Message-ID: <ECADFF3FD767C149AD96A924E7EA6EAF8051973C@USCULXMSG01.am.sony.com> (raw)
In-Reply-To: <1539067407-93632-7-git-send-email-wangmy@cn.fujitsu.com>

Question inline below.

> -----Original Message-----
> From: Wang Mingyu

There is no explanation in the body of the commit message, explaining
the rationale for these changes.  I'm going to need such information to
be included in the commit body from now on.

> Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
> ---
>  engine/tests/Functional.dovecot/tests/dovecot_logfile.sh | 8 ++++++--
>  engine/tests/Functional.dovecot/tests/dovecot_ps.sh      | 4 ++--
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/engine/tests/Functional.dovecot/tests/dovecot_logfile.sh
> b/engine/tests/Functional.dovecot/tests/dovecot_logfile.sh
> index 7489103..89fc199 100644
> --- a/engine/tests/Functional.dovecot/tests/dovecot_logfile.sh
> +++ b/engine/tests/Functional.dovecot/tests/dovecot_logfile.sh
> @@ -5,16 +5,18 @@
> 
> 
>  test="logfile"
> -service_name=""
> 
>  . "./fuego_board_function_lib.sh"
> 
>  set_init_manager
> +logger_service=$(detect_logger_service)
> 
>  exec_service_on_target dovecot stop
>  rm -f /var/log/mail.log
> 
> -exec_service_on_target $service_name restart
> +exec_service_on_target $logger_service restart
> +
> +sleep 3
I'm not sure I'm following this.  Is the board logger service
writing the data to /var/log/mail.log?  I would have thought
that messages going through the board's system logger
would show up in /var/log/messages.  I'm not familiar
with dovecot, but is it using the system logger, or doing
its own logging to /var/log/mail.log?

I'm just trying to clarify this.

> 
>  if exec_service_on_target dovecot start
>  then
> @@ -24,6 +26,8 @@ else
>      echo " -> $test: TEST-FAIL"
>  fi
> 
> +sleep 3
> +
>  if tail /var/log/mail.log | grep "dovecot"
>  then
>      echo " -> $test: TEST-PASS"
> diff --git a/engine/tests/Functional.dovecot/tests/dovecot_ps.sh
> b/engine/tests/Functional.dovecot/tests/dovecot_ps.sh
> index 2c627bb..0585cf2 100644
> --- a/engine/tests/Functional.dovecot/tests/dovecot_ps.sh
> +++ b/engine/tests/Functional.dovecot/tests/dovecot_ps.sh
> @@ -19,7 +19,7 @@ else
>      exit
>  fi
> 
> -if ps -N a | grep [d]ovecot
> +if ps -N a | grep "[/]usr/sbin/dovecot"

Why is it preferred to include the path?
'grep [d]ovecot' would catch ps output that included '/usr/sbin/dovecot'.

Are there more than one dovecot processes started, and you only
want to match one?

>  then
>      echo " -> get the pid of dovecot."
>  else
> @@ -38,7 +38,7 @@ else
>      exit
>  fi
> 
> -if ps -N a | grep [d]ovecot
> +if ps -N a | grep "[/]usr/sbin/dovecot"
>  then
>      echo " -> $test: TEST-FAIL"
>  else
> --
> 1.8.3.1


  reply	other threads:[~2018-10-09 18:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09  6:43 [Fuego] [PATCH] kbd: Add test cases for commands of kbd Wang Mingyu
2018-10-09  6:43 ` [Fuego] [PATCH] mcelog: Add test cases for command mcelog Wang Mingyu
2018-10-12  0:37   ` Tim.Bird
2018-10-09  6:43 ` [Fuego] [PATCH] bind: Add test cases for commands of bind(chroot) Wang Mingyu
2018-10-12  4:35   ` Tim.Bird
2018-10-13  4:59     ` Wang, Mingyu
2018-10-13 16:11       ` Tim.Bird
2018-10-09  6:43 ` [Fuego] [PATCH] bind: Add test cases for commands of bind(named) Wang Mingyu
2018-10-12  5:29   ` Tim.Bird
2018-10-09  6:43 ` [Fuego] [PATCH] lm_sensors: Add test cases for command lm_sensors Wang Mingyu
2018-10-09  6:43 ` [Fuego] [PATCH] atmtcp: Add test cases for command atmtcp Wang Mingyu
2018-10-09  6:43 ` [Fuego] [PATCH] dovecot: fix test of logfile and ps Wang Mingyu
2018-10-09 18:41   ` Tim.Bird [this message]
2018-10-10  3:17     ` Wang, Mingyu
2018-10-10  3:34       ` Tim.Bird
2018-10-10  8:49         ` Wang, Mingyu
2018-10-10 18:00           ` Tim.Bird
2018-10-12  0:33 ` [Fuego] [PATCH] kbd: Add test cases for commands of kbd Tim.Bird
2018-10-12  3:15   ` Wang, Mingyu
2018-10-12  3:50     ` Tim.Bird
2018-10-16  8:52 [Fuego] [PATCH] dovecot: fix test of logfile and ps Wang Mingyu

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=ECADFF3FD767C149AD96A924E7EA6EAF8051973C@USCULXMSG01.am.sony.com \
    --to=tim.bird@sony.com \
    --cc=fuego@lists.linuxfoundation.org \
    --cc=wangmy@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.