Delete unnecessary -d options from umount in unit tests.
The -d option to umount is unnecessary in cases where the original
mount was created with '-o loop' (it says so in the man page).
Moreover, there's a demonstrable bug when using 'umount -d' in this
case: umount complains that it's unable to delete the loop device
in this case. This change silences those messages.
The demonstrated bug in umount is a plausible explanation for build
failures characterized by unexpected failures of 'mount -o loop';
see the BUG, below.
BUG=chromium-os:24975
TEST=Run the unit test, verify it still works.
Change-Id: Id537522b865b8ef1af4d7407fe8dab9556ccbec3
Reviewed-on: https://gerrit.chromium.org/gerrit/16093
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
diff --git a/test_utils.cc b/test_utils.cc
index fcaae46..0a30ddf 100644
--- a/test_utils.cc
+++ b/test_utils.cc
@@ -217,7 +217,7 @@
kMountPath, kMountPath)));
EXPECT_EQ(0, System(StringPrintf("ln -s bogus %s/boguslink",
kMountPath)));
- EXPECT_EQ(0, System(StringPrintf("umount -d %s", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("umount %s", kMountPath)));
if (out_paths) {
out_paths->clear();