xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH 1/6] cr-ensure-disk-space: Do not take out the lock in dry run mode
@ 2016-10-04 12:26 Ian Jackson
  2016-10-04 12:26 ` [OSSTEST PATCH 2/6] cr-ensure-disk-space: -F option Ian Jackson
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ian Jackson @ 2016-10-04 12:26 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

This makes testing a bit easier, and is of course fine.

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

diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space
index ff6b01b..bfdbcc5 100755
--- a/cr-ensure-disk-space
+++ b/cr-ensure-disk-space
@@ -72,9 +72,11 @@ 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 $!;
+if (!$dryrun) {
+    my $lock = "$c{GlobalLockDir}/publish-lock";
+    open LOCK, "> $lock" or die "$lock $!";
+    flock LOCK, LOCK_EX or die $!;
+}
 
 print "proceeding...\n";
 
-- 
2.1.4


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

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

end of thread, other threads:[~2016-10-04 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04 12:26 [OSSTEST PATCH 1/6] cr-ensure-disk-space: Do not take out the lock in dry run mode Ian Jackson
2016-10-04 12:26 ` [OSSTEST PATCH 2/6] cr-ensure-disk-space: -F option Ian Jackson
2016-10-04 12:26 ` [OSSTEST PATCH 3/6] cr-ensure-disk-space: Dry run produces better `die' message Ian Jackson
2016-10-04 12:26 ` [OSSTEST PATCH 4/6] mg-allocate: Tiny refactoring Ian Jackson
2016-10-04 12:26 ` [OSSTEST PATCH 5/6] flight preservation: Honour flight allocation during expiry Ian Jackson
2016-10-04 12:26 ` [OSSTEST PATCH 6/6] flight preservation: Provide a way to allocate flights Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).