--- a/tools/rdb/unit_test.js
+++ b/tools/rdb/unit_test.js
@@ -4,7 +4,7 @@
 exec   = require('child_process').exec
 util   = require('util')
 
-DB_NAME = '/tmp/rocksdbtest-' + process.getuid()
+DB_NAME = '@TERMUX_PREFIX@/tmp/rocksdbtest-' + process.getuid()
 
 a = RDB()
 assert.equal(a.open(DB_NAME, ['b']), false)
