diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 32a4d423b837001dbd82935a6d5026b969fcd3ca..b1ddfc97c700b107f851d5736c80ebd44489cdbd 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -1064,14 +1064,14 @@ create algorithm=merge view v4 as select * from t1 with cascaded check option;
 create algorithm =temptable view v5 as select * from t1;
 
 # dump tables and views
---exec $MYSQL_DUMP test > var/tmp/bug14871.sql
+--exec $MYSQL_DUMP test > $MYSQLTEST_VARDIR/tmp/bug14871.sql
 
 # drop the db, tables and views
 drop table t1;
 drop view v1, v2, v3, v4, v5;
 
 # Reload dump
---exec $MYSQL test < var/tmp/bug14871.sql
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug14871.sql
 
 # check that all tables and views could be created
 show tables;
@@ -1098,13 +1098,13 @@ end|
 delimiter ;|
 
 # dump table and trigger
---exec $MYSQL_DUMP test > var/tmp/bug16878.sql
+--exec $MYSQL_DUMP test > $MYSQLTEST_VARDIR/tmp/bug16878.sql
 drop trigger tr1;
 drop trigger tr2;
 drop table t1, t2;
 
 # reload dump
---exec $MYSQL test < var/tmp/bug16878.sql
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug16878.sql
 --replace_column 6 #
 show triggers;
 drop trigger tr1;