All of lore.kernel.org
 help / color / mirror / Atom feed
* OSSTest standalone script
@ 2015-10-14  9:29 Hu, Robert
  2015-10-14  9:48 ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Hu, Robert @ 2015-10-14  9:29 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel@lists.xen.org

Hi Ian,

When I now try to use standalone script for debug, it seems doesn't work as before. Any usage changed?

[root@robert-ivt osstest]# ./standalone run-job --dry-run -h dummy test-amd64-amd64-qemuu-nested
Could not open a connection to your authentication agent.
WARNING: Unable to access ssh-agent. Some tests may fail
./standalone: line 195: savelog: command not found

Best Regards,
Robert Ho

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OSSTest standalone script
  2015-10-14  9:29 OSSTest standalone script Hu, Robert
@ 2015-10-14  9:48 ` Ian Campbell
  2015-10-14  9:56   ` Hu, Robert
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2015-10-14  9:48 UTC (permalink / raw)
  To: Hu, Robert, ian.jackson; +Cc: xen-devel@lists.xen.org

On Wed, 2015-10-14 at 09:29 +0000, Hu, Robert wrote:
> Hi Ian,
> 
> When I now try to use standalone script for debug, it seems doesn't work
> as before. Any usage changed?
> 
> [root@robert-ivt osstest]# ./standalone run-job --dry-run -h dummy test
> -amd64-amd64-qemuu-nested
> Could not open a connection to your authentication agent.
> WARNING: Unable to access ssh-agent. Some tests may fail

It seems you do not have a ssh-agent running.

This isn't strictly needed (i.e if your ssh key has no passphrase) hence
this is just a warning.

> ./standalone: line 195: savelog: command not found

And this indicates that you need to install the "savelog" command.

In Debian this comes from the 'debianutils' package, so it is probably
Debian specific, which I had not realised.

If you aren't using Debian then I think the following will help, although
you won't benefit from the rotation of logs, which is the old behaviour.

-----8>--------

>From ed4fd4bf2b175a02b9dbe3e394577b7095a8f3be Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Wed, 14 Oct 2015 10:45:36 +0100
Subject: [PATCH] standalone: only rotate logs if savelog is available

`savelog' comes from the `debianutils' package and so is unlikely to
be available elsewhere. Revert to the old behaviour of clobbering the
logs in this case.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 standalone | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/standalone b/standalone
index 20a6ad5..c804b74 100755
--- a/standalone
+++ b/standalone
@@ -192,7 +192,9 @@ ensure_logs() {
 with_logging() {
     local log=$1; shift
     ensure_logs
-    savelog -c 300 -n "$log" >/dev/null
+    if command -v savelog >/dev/null ; then
+        savelog -c 300 -n "$log" >/dev/null
+    fi
     "$@" 2>&1 | tee "$log"
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
-- 
2.5.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: OSSTest standalone script
  2015-10-14  9:48 ` Ian Campbell
@ 2015-10-14  9:56   ` Hu, Robert
  2015-11-17 10:37     ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Hu, Robert @ 2015-10-14  9:56 UTC (permalink / raw)
  To: Ian Campbell, ian.jackson@citrix.com; +Cc: xen-devel@lists.xen.org

> -----Original Message-----
> From: Ian Campbell [mailto:ian.campbell@citrix.com]
> Sent: Wednesday, October 14, 2015 5:48 PM
> To: Hu, Robert <robert.hu@intel.com>; ian.jackson@citrix.com
> Cc: xen-devel@lists.xen.org
> Subject: Re: OSSTest standalone script
> 
> On Wed, 2015-10-14 at 09:29 +0000, Hu, Robert wrote:
> > Hi Ian,
> >
> > When I now try to use standalone script for debug, it seems doesn't work
> > as before. Any usage changed?
> >
> > [root@robert-ivt osstest]# ./standalone run-job --dry-run -h dummy test
> > -amd64-amd64-qemuu-nested
> > Could not open a connection to your authentication agent.
> > WARNING: Unable to access ssh-agent. Some tests may fail
> 
> It seems you do not have a ssh-agent running.
> 
> This isn't strictly needed (i.e if your ssh key has no passphrase) hence
> this is just a warning.
> 
> > ./standalone: line 195: savelog: command not found
> 
> And this indicates that you need to install the "savelog" command.
> 
> In Debian this comes from the 'debianutils' package, so it is probably
> Debian specific, which I had not realised.
> 
> If you aren't using Debian then I think the following will help, although
> you won't benefit from the rotation of logs, which is the old behaviour.
> 
> -----8>--------
> 
> From ed4fd4bf2b175a02b9dbe3e394577b7095a8f3be Mon Sep 17 00:00:00
> 2001
> From: Ian Campbell <ian.campbell@citrix.com>
> Date: Wed, 14 Oct 2015 10:45:36 +0100
> Subject: [PATCH] standalone: only rotate logs if savelog is available
> 
> `savelog' comes from the `debianutils' package and so is unlikely to
> be available elsewhere. Revert to the old behaviour of clobbering the
> logs in this case.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  standalone | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/standalone b/standalone
> index 20a6ad5..c804b74 100755
> --- a/standalone
> +++ b/standalone
> @@ -192,7 +192,9 @@ ensure_logs() {
>  with_logging() {
>      local log=$1; shift
>      ensure_logs
> -    savelog -c 300 -n "$log" >/dev/null
> +    if command -v savelog >/dev/null ; then
> +        savelog -c 300 -n "$log" >/dev/null
> +    fi
>      "$@" 2>&1 | tee "$log"
>      rc=${PIPESTATUS[0]}
>      if [ $rc -ne 0 ] ; then
 
Thanks for quick reply! It works!

> --
> 2.5.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OSSTest standalone script
  2015-10-14  9:56   ` Hu, Robert
@ 2015-11-17 10:37     ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2015-11-17 10:37 UTC (permalink / raw)
  To: Hu, Robert; +Cc: Ian Campbell, xen-devel@lists.xen.org

Hu, Robert writes ("RE: OSSTest standalone script"):
> > From ed4fd4bf2b175a02b9dbe3e394577b7095a8f3be Mon Sep 17 00:00:00
> > 2001
> > From: Ian Campbell <ian.campbell@citrix.com>
> > Date: Wed, 14 Oct 2015 10:45:36 +0100
> > Subject: [PATCH] standalone: only rotate logs if savelog is available
> > 
> > `savelog' comes from the `debianutils' package and so is unlikely to
> > be available elsewhere. Revert to the old behaviour of clobbering the
> > logs in this case.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
...
> Thanks for quick reply! It works!

Thanks.  Prompted by Ian C I have pushed this with my nested logging
fixes to osstest pretest.  I took your mail as a Tested-by.

Ian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-17 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14  9:29 OSSTest standalone script Hu, Robert
2015-10-14  9:48 ` Ian Campbell
2015-10-14  9:56   ` Hu, Robert
2015-11-17 10:37     ` Ian Jackson

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.