diff --git a/HISTORY b/HISTORY index c5b87c87..16247850 100644 --- a/HISTORY +++ b/HISTORY @@ -1,9 +1,13 @@ SnapRAID HISTORY ================ +6.2 2014/5 +========== + * Fixed the regression test when run as root. + 6.1 2014/4 ========== - * Fix build and regression test in Mac OS X. + * Fixed build and regression test in Mac OS X. 6.0 2014/3 ========== diff --git a/Makefile.am b/Makefile.am index d662e3e6..a49b86d3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -250,7 +250,10 @@ endif echo RUN > bench/disk1/RUN-RM $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "rm bench/disk1/RUN-RM" --test-expect-failure sync echo RUN > bench/disk1/RUN-CHMOD - $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/RUN-CHMOD" --test-expect-failure sync +# Doesn't run this test as root because the root user overrride permissions + if [[ $$EUID -ne 0 ]]; then \ + $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/RUN-CHMOD" --test-expect-failure sync; \ + fi echo RUN > bench/disk1/RUN-SIZE $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "echo RUNRUN > bench/disk1/RUN-SIZE" --test-expect-failure sync echo RUN > bench/disk1/RUN-TOUCH @@ -265,7 +268,10 @@ endif echo HASH > bench/disk1/HASH-RM $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "rm bench/disk1/HASH-RM" --test-expect-failure -h sync echo HASH > bench/disk1/HASH-CHMOD - $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/HASH-CHMOD" --test-expect-failure -h sync +# Doesn't run this test as root because the root user overrride permissions + if [[ $$EUID -ne 0 ]]; then \ + $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/HASH-CHMOD" --test-expect-failure -h sync; \ + fi echo HASH > bench/disk1/HASH-SIZE $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "echo HASHHASH > bench/disk1/HASH-SIZE" --test-expect-failure -h sync echo HASH > bench/disk1/HASH-TOUCH