platform_Cryptohome: Add more test cases.
In particular, test bad dirents in the multi-mount paths. CryptohomeBadPerms
tests directories with bad permissions, CryptohomeNonDirs tests non-dirents in
the mount path.
BUG=chromium-os:20778
TEST=Yes. Needs CLs 10193 and 10670.
Change-Id: I3ad1cd65a88739ab4ac6bcc675def358ff728384
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/10801
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
diff --git a/client/bin/site_utils.py b/client/bin/site_utils.py
index b1421fb..deb96ec 100644
--- a/client/bin/site_utils.py
+++ b/client/bin/site_utils.py
@@ -2,11 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging, os, platform, re, signal, tempfile, time
+import logging, os, platform, re, signal, tempfile, time, uuid
from autotest_lib.client.common_lib import error
from autotest_lib.client.common_lib import utils
-
class TimeoutError(error.TestError):
"""Error raised when we time out when waiting on a condition."""
pass
@@ -220,3 +219,6 @@
"""
if not is_mountpoint(path):
raise error.TestFail('Path not mounted: "%s"' % path)
+
+def random_username():
+ return str(uuid.uuid4()) + '@example.com'