xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 1/6] cr-ensure-disk-space: Do not take out the lock in dry run mode
Date: Tue, 4 Oct 2016 13:26:29 +0100	[thread overview]
Message-ID: <1475583994-30203-1-git-send-email-ian.jackson@eu.citrix.com> (raw)

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

             reply	other threads:[~2016-10-04 12:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 12:26 Ian Jackson [this message]
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

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=1475583994-30203-1-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 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).