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/postinstall_runner_action_unittest.cc b/postinstall_runner_action_unittest.cc
index a5649e0..2229004 100644
--- a/postinstall_runner_action_unittest.cc
+++ b/postinstall_runner_action_unittest.cc
@@ -118,7 +118,7 @@
ASSERT_TRUE(WriteFileString(mountpoint + "/postinst", script));
ASSERT_EQ(0, System(string("chmod a+x ") + mountpoint + "/postinst"));
- ASSERT_EQ(0, System(string("umount -d ") + mountpoint));
+ ASSERT_EQ(0, System(string("umount ") + mountpoint));
ASSERT_EQ(0, System(string("rm -f ") + cwd + "/postinst_called"));