diff --git a/tests/remote-store.sh b/tests/remote-store.sh
index d14442614..8312424f0 100644
--- a/tests/remote-store.sh
+++ b/tests/remote-store.sh
@@ -9,7 +9,7 @@ $SHELL ./user-envs.sh
 
 nix-store --dump-db > $TEST_ROOT/d1
 NIX_REMOTE= nix-store --dump-db > $TEST_ROOT/d2
-cmp d1 d2
+cmp $TEST_ROOT/d1 $TEST_ROOT/d2
 
 nix-store --gc --max-freed 1K