diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh
index d7daf0b4c245742502dc187808ba90e952e0e6a9..454b644b5077942e884f044570ec6474b7f220c3 100644
--- a/lustre/tests/sanityN.sh
+++ b/lustre/tests/sanityN.sh
@@ -232,7 +232,7 @@ test_11() {
 run_test 11 "execution of file opened for write should return error ===="
 
 test_12() {
-       sh lockorder.sh
+       DIR=$DIR DIR2=$DIR2 sh lockorder.sh
 }
 run_test 12 "test lock ordering (link, stat, unlink) ==========="