diff --git a/tests/test-branches.t b/tests/test-branches.t
index ed6d650b7cb734d17d51280380f616c9e4ed43f3_dGVzdHMvdGVzdC1icmFuY2hlcy50..cfa0037448f4c1cdaa8b2be8ff669d93d005190f_dGVzdHMvdGVzdC1icmFuY2hlcy50 100644
--- a/tests/test-branches.t
+++ b/tests/test-branches.t
@@ -544,7 +544,6 @@
   0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
   0070: f8 94 c2 56 80 00 00 03                         |...V....|
 
-#if unix-permissions no-root
 no errors when revbranchcache is not writable
 
   $ echo >> .hg/cache/rbc-revs-v1
@@ -548,6 +547,7 @@
 no errors when revbranchcache is not writable
 
   $ echo >> .hg/cache/rbc-revs-v1
-  $ chmod a-w .hg/cache/rbc-revs-v1
+  $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_
+  $ mkdir .hg/cache/rbc-revs-v1
   $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n'
   5
@@ -552,7 +552,7 @@
   $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n'
   5
-  $ chmod a+w .hg/cache/rbc-revs-v1
-#endif
+  $ rmdir .hg/cache/rbc-revs-v1
+  $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1
 
 recovery from invalid cache revs file with trailing data
   $ echo >> .hg/cache/rbc-revs-v1