summaryrefslogtreecommitdiffstats
path: root/tests/include.rc
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2016-01-18 20:50:24 +0100
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-01-24 18:29:32 -0800
commitf17c2e991e45b83f7d21de1b976b59862ea173ab (patch)
tree298ebcedc1cb19c83eebc54cf7e0794d45f0c065 /tests/include.rc
parentca4d4a26a553bac9c627bc6e6d6c9fa1f9435297 (diff)
NetBSD regression reliability: properly cleanup loopback devices
When a loopback device is configured and we forcibly unmount the filesystem containing the backing store, further vnconfig -l will complain "vnconfig: VNDIOCGET: Bad file descriptor" causing failures. We fix this by iterating on all loopback devices available in /dev, testing for this condition and manually unconfiguring when it happens. BUG: 1129939 Change-Id: I17b956a8ed28a7767f2d0dda83b93c523d3238c2 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/13204 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/include.rc')
-rw-r--r--tests/include.rc6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/include.rc b/tests/include.rc
index 76b81875bbc..139bc03ac8c 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -482,6 +482,12 @@ function cleanup()
done
;;
NetBSD)
+ # cleanup loopback device with unmounted backing store
+ for vnd in /dev/vnd* ; do
+ vnconfig -l ${vnd} 2>&1 | \
+ grep -q 'Bad file descriptor' && vnconfig -u ${vnd}
+ done
+
vnd=`vnconfig -l | \
awk '!/not in use/{printf("%s%s:%d ", $1, $2, $5);}'`
for l in ${vnd} ; do