Patchwork [6,of,7] tests: avoid tests related to directory permission if running with fsmonitor

login
register
mail settings
Submitter Katsunori FUJIWARA
Date July 12, 2017, 6:22 p.m.
Message ID <e9ba6543da0c07111a3b.1499883733@speaknoevil>
Download mbox | patch
Permalink /patch/22275/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - July 12, 2017, 6:22 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1499883479 -32400
#      Thu Jul 13 03:17:59 2017 +0900
# Node ID e9ba6543da0c07111a3bfbbbea047dc1774c8798
# Parent  6727043ee44165d5e7527f0ec3d64c6ac0940a03
tests: avoid tests related to directory permission if running with fsmonitor

Patch

diff --git a/tests/blacklists/fsmonitor b/tests/blacklists/fsmonitor
--- a/tests/blacklists/fsmonitor
+++ b/tests/blacklists/fsmonitor
@@ -23,9 +23,7 @@  test-largefiles-wireproto.t
 test-largefiles.t
 test-lfconvert.t
 test-nested-repo.t
-test-permissions.t
 test-push-warn.t
 test-subrepo-deep-nested-change.t
 test-subrepo-recursion.t
 test-subrepo.t
-test-tags.t
diff --git a/tests/test-permissions.t b/tests/test-permissions.t
--- a/tests/test-permissions.t
+++ b/tests/test-permissions.t
@@ -61,10 +61,17 @@ 
   M a
   ? dir/a
   $ chmod -rx dir
+
+#if no-fsmonitor
+
+(fsmonitor makes "hg status" avoid accessing to "dir")
+
   $ hg status
   dir: Permission denied
   M a
 
+#endif
+
 Reenable perm to allow deletion:
 
   $ chmod +rx dir
diff --git a/tests/test-tags.t b/tests/test-tags.t
--- a/tests/test-tags.t
+++ b/tests/test-tags.t
@@ -118,13 +118,17 @@  Repeat with cold tag cache:
 
 And again, but now unable to write tag cache or lock file:
 
-#if unix-permissions
+#if unix-permissions no-fsmonitor
+
   $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
   $ chmod 555 .hg/cache
   $ hg identify
   b9154636be93 tip
   $ chmod 755 .hg/cache
 
+(this block should be protected by no-fsmonitor, because "chmod 555 .hg"
+makes watchman fail at accessing to files under .hg)
+
   $ chmod 555 .hg
   $ hg identify
   b9154636be93 tip