All of lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST PATCH 1/3] cr-ensure-disk-space: Fix reference to iteration_proceed
@ 2016-07-25 10:34 Ian Jackson
  2016-07-25 10:34 ` [OSSTEST PATCH 2/3] cr-ensure-disk-space: Break out quit_ok Ian Jackson
  2016-07-25 10:34 ` [OSSTEST PATCH 3/3] cr-ensure-disk-space: Correct stdout output Ian Jackson
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Jackson @ 2016-07-25 10:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu

8738d60622c1 "cr-ensure-disk-space: Break out check_space" renamed
iteration_continue to iteration_proceed but did not change the call
site.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 cr-ensure-disk-space | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space
index 2d299dd..bb98835 100755
--- a/cr-ensure-disk-space
+++ b/cr-ensure-disk-space
@@ -152,7 +152,7 @@ db_retry($dbh_tests,[], sub {
     @flights = ();
     for (;;) {
 	last if check_space();
-	iteration_continue();
+	iteration_proceed();
     }
 });
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [OSSTEST PATCH 2/3] cr-ensure-disk-space: Break out quit_ok
  2016-07-25 10:34 [OSSTEST PATCH 1/3] cr-ensure-disk-space: Fix reference to iteration_proceed Ian Jackson
@ 2016-07-25 10:34 ` Ian Jackson
  2016-07-25 10:34 ` [OSSTEST PATCH 3/3] cr-ensure-disk-space: Correct stdout output Ian Jackson
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2016-07-25 10:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu

We are going to want another call site.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 cr-ensure-disk-space | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space
index bb98835..6a9781a 100755
--- a/cr-ensure-disk-space
+++ b/cr-ensure-disk-space
@@ -61,6 +61,13 @@ sub check_space () {
     return $space >= logcfg('MinSpaceMby');
 }
 
+sub quit_ok () {
+    printf "ok.\n";
+    exit 0;
+}
+
+$|=1;
+
 exit 0 if check_space;
 
 my $lock = "$c{GlobalLockDir}/publish-lock";
@@ -156,5 +163,4 @@ db_retry($dbh_tests,[], sub {
     }
 });
 
-printf "ok.\n";
-exit 0;
+quit_ok();
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [OSSTEST PATCH 3/3] cr-ensure-disk-space: Correct stdout output
  2016-07-25 10:34 [OSSTEST PATCH 1/3] cr-ensure-disk-space: Fix reference to iteration_proceed Ian Jackson
  2016-07-25 10:34 ` [OSSTEST PATCH 2/3] cr-ensure-disk-space: Break out quit_ok Ian Jackson
@ 2016-07-25 10:34 ` Ian Jackson
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2016-07-25 10:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu

d221996eea64 "cr-ensure-disk-space: Run check_space before taking
lock" introduced an additional call to check_space but check_space
prints the start of a message (with no newline) expecting
iteration_proceed to print the rest.

Move $|=1 up appropriately and add a couple of messages in the right
place.  This involves calling quit_ok rather than exit 0.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 cr-ensure-disk-space | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space
index 6a9781a..ff6b01b 100755
--- a/cr-ensure-disk-space
+++ b/cr-ensure-disk-space
@@ -68,13 +68,15 @@ sub quit_ok () {
 
 $|=1;
 
-exit 0 if check_space;
+check_space if check_space;
+
+print "taking lock...";
 
 my $lock = "$c{GlobalLockDir}/publish-lock";
 open LOCK, "> $lock" or die "$lock $!";
 flock LOCK, LOCK_EX or die $!;
 
-$|=1;
+print "proceeding...\n";
 
 my $chkq= db_prepare("SELECT * FROM flights WHERE flight=?");
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-07-25 10:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25 10:34 [OSSTEST PATCH 1/3] cr-ensure-disk-space: Fix reference to iteration_proceed Ian Jackson
2016-07-25 10:34 ` [OSSTEST PATCH 2/3] cr-ensure-disk-space: Break out quit_ok Ian Jackson
2016-07-25 10:34 ` [OSSTEST PATCH 3/3] cr-ensure-disk-space: Correct stdout output 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.