Introduce a test for fuzzing engines#10264
Merged
locker merged 2 commits intotarantool:masterfrom Jul 22, 2024
Merged
Conversation
f211fc2 to
30fc96f
Compare
512462e to
6c196f2
Compare
6c196f2 to
a54b333
Compare
locker
reviewed
Jul 18, 2024
Gumix
approved these changes
Jul 18, 2024
This was referenced Jul 19, 2024
NO_CHANGELOG=typo NO_DOC=typo NO_TEST=typo
a54b333 to
50cfe55
Compare
50cfe55 to
030e648
Compare
locker
approved these changes
Jul 19, 2024
Gumix
approved these changes
Jul 19, 2024
The test for Tarantool allows you to randomly generate DDL and DML operations, apply these operations to vinyl and memtx spaces and toggle random error injections simultaneously. All random things generated by the test depends on random seed, that can be passed via command-line argument. Bugs found by the test: - tarantool#9995 - tarantool#10026 - tarantool#10033 - tarantool#10082 - tarantool#10090 - tarantool#10094 - tarantool#10095 - tarantool#10096 - tarantool#10096 - tarantool#10097 - tarantool#10099 - tarantool#10100 - tarantool#10109 - tarantool#10123 - tarantool#10128 - tarantool#10134 - tarantool#10147 - tarantool#10148 - tarantool#10153 - tarantool#10233 - tarantool#10235 - tarantool#10236 - tarantool#10237 - tarantool#10245 - tarantool#10262 - tarantool#10265 - tarantool#10267 - tarantool#10277 - tarantool#10278 - tarantool#10283 Part of tarantool#4349 Closes tarantool#5076 NO_CHANGELOG=fuzzing NO_DOC=fuzzing NO_TEST=fuzzing
Member
Author
|
There was a problem when error injections ( The patch below: diff --git a/test/fuzz/lua/test_engine.lua b/test/fuzz/lua/test_engine.lua
index e1c5bbac9b..f193ce4c38 100644
--- a/test/fuzz/lua/test_engine.lua
+++ b/test/fuzz/lua/test_engine.lua
@@ -1068,7 +1068,7 @@ local errinj_set = {
-- alter.
ERRINJ_BUILD_INDEX = {
enable = function(space)
- return oneof(keys(space.index))
+ return math.random(#(keys(space.index)))
end,
disable = function(_space)
return -1
@@ -1176,7 +1176,7 @@ local errinj_set = {
enable = enable_errinj_boolean,
disable = disable_errinj_boolean,
},
- -- Set to true to fail vinyl index dump.
+ -- Set to timeout to fail vinyl index dump.
ERRINJ_VY_INDEX_DUMP = {
enable = enable_errinj_timeout,
disable = function() return -1 end,
@@ -1262,7 +1262,7 @@ local errinj_set = {
enable = enable_errinj_timeout,
disable = disable_errinj_timeout,
},
- -- Set to true to fail allocation of vinyl tuple.
+ -- Set to timeout to fail allocation of vinyl tuple.
ERRINJ_VY_STMT_ALLOC = {
enable = enable_errinj_timeout,
disable = disable_errinj_timeout,
@@ -1283,11 +1283,11 @@ local errinj_set = {
enable = enable_errinj_boolean,
disable = disable_errinj_boolean,
},
- -- Set to true to fail WAL write due to error allocating disk
+ -- Set to timeout to fail WAL write due to error allocating disk
-- space.
ERRINJ_WAL_FALLOCATE = {
- enable = enable_errinj_boolean,
- disable = disable_errinj_boolean,
+ enable = enable_errinj_timeout,
+ disable = disable_errinj_timeout,
},
-- Set to true to fail WAL write.
ERRINJ_WAL_IO = {
@@ -1319,7 +1319,7 @@ local errinj_set = {
enable = enable_errinj_boolean,
disable = disable_errinj_boolean,
},
- -- Set to true to fail write to xlog file.
+ -- Set to timeout to fail write to xlog file.
ERRINJ_WAL_WRITE_PARTIAL = {
enable = enable_errinj_timeout,
disable = disable_errinj_timeout,
@@ -1329,7 +1329,7 @@ local errinj_set = {
enable = enable_errinj_boolean,
disable = disable_errinj_boolean,
},
- -- Set to true to fail xlog data read.
+ -- Set to timeout to fail xlog data read.
ERRINJ_XLOG_READ = {
enable = enable_errinj_timeout,
disable = disable_errinj_timeout,
@@ -1402,7 +1402,7 @@ local function run_test(num_workers, test_duration, test_dir,
end, arg_test_duration)
errinj_f:set_joinable(true)
errinj_f:name('ERRINJ')
- errinj_f:join()
+ table.insert(workers, errinj_f)
local error_messages = {}
for _, fb in ipairs(workers) do |
030e648 to
72c657d
Compare
ylobankov
approved these changes
Jul 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.