Skip to contentSkip to conversation

standalone: print the path to the apache logs if we can't read them

OSSTEST Ian Campbell 2 participants 6 messages Apr 28, 2014 – May 12, 2014

lore
Share & tools
lore
#0 lore raw

For cut-and-paste convenience.

---
 standalone | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
standalone +1 -1
index 6b08995..800b4ec 100755
@@ -79,7 +79,7 @@ while true ; do
 done
 
 if [ ! -r /var/log/apache2/access.log ] ; then
-    echo "WARNING: Cannot read apache logs. Some tests may fail" >&2
+    echo "WARNING: Cannot read apache logs at /var/log/apache2/access.log. Some tests may fail" >&2
 fi
 
 if ! ssh-add -l >/dev/null ] ; then
Signature · 1 line
1.9.0
Acked-by
#1 lore raw

Ian Campbell writes ("[OSSTEST] standalone: print the path to the apache logs if we can't read them"):

Quoted 1 line

For cut-and-paste convenience.

standalone while true ; do · line 83

Quoted 11 lines
standalone +1 -1
index 6b08995..800b4ec 100755
@@ -79,7 +79,7 @@ while true ; do
 done
 
 if [ ! -r /var/log/apache2/access.log ] ; then
-    echo "WARNING: Cannot read apache logs. Some tests may fail" >&2
+    echo "WARNING: Cannot read apache logs at /var/log/apache2/access.log. Some tests may fail" >&2
 fi

I guess at some point it would be nice if this honoured the log location config option (WebspaceLog).

Ian.

#2 lore raw
Quoted 12 lines · Ian Jackson

Ian Campbell writes ("[OSSTEST] standalone: print the path to the apache logs if we can't read them"):

Quoted 1 line

For cut-and-paste convenience.

Quoted 7 lines
standalone +0 -0
index 6b08995..800b4ec 100755
@@ -79,7 +79,7 @@ while true ; do
 done
 
Quoted 7 lines

standalone while true ; do · line 83

Quoted 4 lines
standalone +1 -1
 if [ ! -r /var/log/apache2/access.log ] ; then
-    echo "WARNING: Cannot read apache logs. Some tests may fail" >&2
+    echo "WARNING: Cannot read apache logs at /var/log/apache2/access.log. Some tests may fail" >&2
 fi

I guess at some point it would be nice if this honoured the log location config option (WebspaceLog).

Done.

8<-------------------

Quoted 1 line

From 0359398f95935b227b6b536175a92b29c9743980 Mon Sep 17 00:00:00 2001

From: Ian Campbell <[email protected]>
Date: Sun, 27 Apr 2014 10:11:43 +0100
Subject: [PATCH] standalone: Use WebspaceLog for apache log check

Also print the result in the error message for cut-and-paste convenience.

While there I noticed that run-test was setting OSSTEST_CONFIG twice.

---
v2: Use cri-getconfig:getconfig

---
 standalone | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
standalone +6 -3
index 6b08995..f00a81e 100755
@@ -78,8 +78,12 @@ while true ; do
     esac
 done
 
-if [ ! -r /var/log/apache2/access.log ] ; then
-    echo "WARNING: Cannot read apache logs. Some tests may fail" >&2
+. cri-getconfig
+
+WebspaceLog=`OSSTEST_CONFIG=$config getconfig WebspaceLog`
+echo $WebspaceLog
+if [ ! -r "$WebspaceLog" ] ; then
+    echo "WARNING: Cannot read apache logs at $WebspaceLog. Some tests may fail" >&2
 fi
 
 if ! ssh-add -l >/dev/null ] ; then
@@ -222,7 +226,6 @@ case $op in
 
 	OSSTEST_CONFIG=$config \
 	OSSTEST_FLIGHT=$flight \
-	OSSTEST_CONFIG=$config \
 	OSSTEST_HOST_REUSE=$reuse \
 	OSSTEST_JOB=$job \
 	    with_logging logs/$flight/$job.$ts.log ./$ts host=$host $@
Signature · 1 line
1.9.0
#3 lore raw
Quoted 46 lines · Ian Campbell
Quoted 12 lines · Ian Jackson

Ian Campbell writes ("[OSSTEST] standalone: print the path to the apache logs if we can't read them"):

Quoted 1 line

For cut-and-paste convenience.

Quoted 7 lines
standalone +0 -0
index 6b08995..800b4ec 100755
@@ -79,7 +79,7 @@ while true ; do
 done
 
Quoted 7 lines

standalone while true ; do · line 87

Quoted 4 lines
standalone +1 -1
 if [ ! -r /var/log/apache2/access.log ] ; then
-    echo "WARNING: Cannot read apache logs. Some tests may fail" >&2
+    echo "WARNING: Cannot read apache logs at /var/log/apache2/access.log. Some tests may fail" >&2
 fi

I guess at some point it would be nice if this honoured the log location config option (WebspaceLog).

Done.

8<-------------------

From 0359398f95935b227b6b536175a92b29c9743980 Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Sun, 27 Apr 2014 10:11:43 +0100
Subject: [PATCH] standalone: Use WebspaceLog for apache log check

Also print the result in the error message for cut-and-paste convenience.

While there I noticed that run-test was setting OSSTEST_CONFIG twice.

---
v2: Use cri-getconfig:getconfig

---
 standalone | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
standalone +0 -0
index 6b08995..f00a81e 100755

standalone while true ; do · line 84

Quoted 9 lines
standalone +4 -2
@@ -78,8 +78,12 @@ while true ; do
     esac
 done
 
-if [ ! -r /var/log/apache2/access.log ] ; then
-    echo "WARNING: Cannot read apache logs. Some tests may fail" >&2
+. cri-getconfig
+
+WebspaceLog=`OSSTEST_CONFIG=$config getconfig WebspaceLog`
+echo $WebspaceLog

This stray debug echo should be removed on commit...

Quoted 13 lines
standalone +2 -1
+if [ ! -r "$WebspaceLog" ] ; then
+    echo "WARNING: Cannot read apache logs at $WebspaceLog. Some tests may fail" >&2
 fi
 
 if ! ssh-add -l >/dev/null ] ; then
@@ -222,7 +226,6 @@ case $op in
 
 	OSSTEST_CONFIG=$config \
 	OSSTEST_FLIGHT=$flight \
-	OSSTEST_CONFIG=$config \
 	OSSTEST_HOST_REUSE=$reuse \
 	OSSTEST_JOB=$job \
 	    with_logging logs/$flight/$job.$ts.log ./$ts host=$host $@
#4 lore raw

Ian Campbell writes ("Re: [Xen-devel] [OSSTEST] standalone: print the path to the apache logs if we can't read them"):

Quoted 5 lines · Ian Campbell

standalone while true ; do · line 84

Quoted 2 lines
standalone +2 -0
+WebspaceLog=`OSSTEST_CONFIG=$config getconfig WebspaceLog`
+echo $WebspaceLog

This stray debug echo should be removed on commit...

Done, btw.

Ian.

Acked-by
#5 lore raw
In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST] standalone: print the path to the apache logs if we can't read them"):

Quoted 5 lines · Ian Jackson
Quoted 2 lines

I guess at some point it would be nice if this honoured the log location config option (WebspaceLog).

Done.

Thanks.

I have added this to my pending-push queue.

Ian.