diff --git a/test/app-tap/suite.ini b/test/app-tap/suite.ini
index 86af82637dbc335019d9d0df838a9174bbea8ff8..9629dfad5fae40c2a1816e77378a9e16bc9752a7 100644
--- a/test/app-tap/suite.ini
+++ b/test/app-tap/suite.ini
@@ -3,3 +3,4 @@ core = app
 description = application server tests (TAP)
 lua_libs = lua/require_mod.lua lua/serializer_test.lua
 is_parallel = True
+pretest_clean = True
diff --git a/test/app/suite.ini b/test/app/suite.ini
index 7f3c0a8f512371d7ee282b86fbaa252eb81a0895..4f9e51550b2a1198671cabc5be987230a6eed132 100644
--- a/test/app/suite.ini
+++ b/test/app/suite.ini
@@ -5,3 +5,4 @@ script = app.lua
 lua_libs = lua/fiber.lua
 use_unix_sockets = True
 is_parallel = True
+pretest_clean = True
diff --git a/test/box-tap/suite.ini b/test/box-tap/suite.ini
index 50dc1f43588438ff308c7d66a6b0d1860acd03b6..b3ccf2e6fe480fdfefaa5ca3c67f0e5334599aae 100644
--- a/test/box-tap/suite.ini
+++ b/test/box-tap/suite.ini
@@ -2,3 +2,4 @@
 core = app
 description = Database tests with #! using TAP
 is_parallel = True
+pretest_clean = True
diff --git a/test/box/box.lua b/test/box/box.lua
index b3b10ffd48ccb5d0706d92e47e085811462aa346..2a8e0e4fa1cc8f6bc92e35499bf2ba3a302823a8 100644
--- a/test/box/box.lua
+++ b/test/box/box.lua
@@ -29,7 +29,7 @@ function cfg_filter(data)
     return result
 end
 
-function compare(a,b)
+local function compare(a,b)
     return a[1] < b[1]
 end
 
@@ -37,3 +37,5 @@ function sorted(data)
     table.sort(data, compare)
     return data
 end
+
+_G.protected_globals = {'cfg_filter', 'sorted'}
diff --git a/test/box/suite.ini b/test/box/suite.ini
index fee1c40b4332775736ab0877ab14a62ea6c54280..c7b75c173dd26f6bb7723acc8d0dec57bd978ce2 100644
--- a/test/box/suite.ini
+++ b/test/box/suite.ini
@@ -7,3 +7,4 @@ release_disabled = errinj.test.lua errinj_index.test.lua rtree_errinj.test.lua u
 lua_libs = lua/fifo.lua lua/utils.lua lua/bitset.lua lua/index_random_test.lua lua/push.lua lua/identifier.lua
 use_unix_sockets = True
 is_parallel = True
+pretest_clean = True
diff --git a/test/engine/box.lua b/test/engine/box.lua
index c68bd626ceb0d523232af0ad120a1a008e264970..b1a379dafba73c860dc623a0f32128a69070c23b 100644
--- a/test/engine/box.lua
+++ b/test/engine/box.lua
@@ -21,24 +21,3 @@ box.cfg{
 }
 
 require('console').listen(os.getenv('ADMIN'))
-
-_to_exclude = {
-    'pid_file', 'log', 'vinyl_dir',
-    'memtx_dir', 'wal_dir',
-    'memtx_min_tuple_size', 'memtx_max_tuple_size'
-}
-
-_exclude = {}
-for _, f in pairs(_to_exclude) do
-    _exclude[f] = 1
-end
-
-function cfg_filter(data)
-    local result = {}
-    for field, val in pairs(data) do
-        if _exclude[field] == nil then
-            result[field] = val
-        end
-    end
-    return result
-end
diff --git a/test/engine/suite.ini b/test/engine/suite.ini
index 3db02ab6fc53050081b5c51c9286cbfaef0e2520..d79efa659c6f06b23f36b1e40676f3d5e1fb42b3 100644
--- a/test/engine/suite.ini
+++ b/test/engine/suite.ini
@@ -8,3 +8,4 @@ config = engine.cfg
 #disabled = replica_join.test.lua
 lua_libs = conflict.lua ../box/lua/utils.lua ../box/lua/push.lua
 is_parallel = True
+pretest_clean = True
diff --git a/test/engine_long/suite.ini b/test/engine_long/suite.ini
index 66df267156acac5207c54ba01f4f8a6ba2152df2..2447344fb6f9a8e29c781c689029a7fde2c6820b 100644
--- a/test/engine_long/suite.ini
+++ b/test/engine_long/suite.ini
@@ -7,3 +7,4 @@ lua_libs = suite.lua
 use_unix_sockets = True
 config = engine.cfg
 is_parallel = True
+pretest_clean = True
diff --git a/test/engine_long/suite.lua b/test/engine_long/suite.lua
index 464138db1204f166100ba660a91f25e6accf54ce..9ac2bff9f4fa807295c8e70006b2024ca6b5eb9e 100644
--- a/test/engine_long/suite.lua
+++ b/test/engine_long/suite.lua
@@ -1,5 +1,4 @@
-
-function string_function()
+local function string_function()
     local random_number
     local random_string
     random_string = ""
@@ -107,3 +106,5 @@ function delete_insert(engine_name, iterations)
     box.space.tester:drop()
     return {counter, string_value_2}
 end
+
+_G.protected_globals = {'delete_replace_update', 'delete_insert'}
diff --git a/test/luajit-tap/suite.ini b/test/luajit-tap/suite.ini
index 80899270e4e8274e4675014d9c522b0776b58970..3e860c9ac43b8c5ebbd01ff8c3f01f58898d15c8 100644
--- a/test/luajit-tap/suite.ini
+++ b/test/luajit-tap/suite.ini
@@ -2,3 +2,4 @@
 core = app
 description = Luajit tests
 is_parallel = True
+pretest_clean = True
diff --git a/test/replication/suite.ini b/test/replication/suite.ini
index dd5b01405bdc059e13d9a76b2c608754e73f0727..0ca85933b98ed07fb0cb182fc810408dc82219f9 100644
--- a/test/replication/suite.ini
+++ b/test/replication/suite.ini
@@ -9,3 +9,4 @@ lua_libs = lua/fast_replica.lua lua/rlimit.lua
 use_unix_sockets = True
 long_run = prune.test.lua
 is_parallel = True
+pretest_clean = True
diff --git a/test/sql/suite.ini b/test/sql/suite.ini
index bfe0fa06382ba62d61264cc54c6d35e535d19d62..ebaf81a531282b9e01462813f4d4ac71a84d0134 100644
--- a/test/sql/suite.ini
+++ b/test/sql/suite.ini
@@ -8,3 +8,4 @@ is_parallel = True
 lua_libs = lua/sql_tokenizer.lua
 release_disabled = errinj.test.lua view_delayed_wal.test.lua sql-debug.test.lua
 disabled = sql-statN-index-drop.test.lua
+pretest_clean = True
diff --git a/test/vinyl/suite.ini b/test/vinyl/suite.ini
index d2a194d85997c7a071e5d4f050be1cdc8504b4ec..3612cf44b5547dea0901daa377d031b8b51a28cd 100644
--- a/test/vinyl/suite.ini
+++ b/test/vinyl/suite.ini
@@ -9,3 +9,4 @@ use_unix_sockets = True
 long_run = stress.test.lua large.test.lua write_iterator_rand.test.lua dump_stress.test.lua select_consistency.test.lua throttle.test.lua
 is_parallel = False
 disabled = upgrade.test.lua
+pretest_clean = True
diff --git a/test/wal_off/suite.ini b/test/wal_off/suite.ini
index bd3a349db0c2bbb662c8e35bbf3dcacb92449763..679104f822c5449a8efc6084b531c4e02a1b43b2 100644
--- a/test/wal_off/suite.ini
+++ b/test/wal_off/suite.ini
@@ -4,3 +4,4 @@ script = wal.lua
 description = tarantool/box, wal_mode = none
 use_unix_sockets = True
 is_parallel = True
+pretest_clean = True
diff --git a/test/xlog/suite.ini b/test/xlog/suite.ini
index 4043f3700105c44211a8261c2a56c9a802822133..06cfbb068872f946c76b37b025a66c49165db2d3 100644
--- a/test/xlog/suite.ini
+++ b/test/xlog/suite.ini
@@ -9,3 +9,4 @@ config = suite.cfg
 use_unix_sockets = True
 long_run = snap_io_rate.test.lua
 is_parallel = True
+pretest_clean = True