From b5b57219be32d7ee752aed64ac4d87db2ba36167 Mon Sep 17 00:00:00 2001 From: Zuleykha Pavlichenkova Date: Tue, 20 Aug 2024 11:05:03 +0200 Subject: [PATCH 01/14] handle --enable_verification passed with its value --- scripts/run_fuzzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_fuzzer.py b/scripts/run_fuzzer.py index a0bdac3..b5dc43a 100644 --- a/scripts/run_fuzzer.py +++ b/scripts/run_fuzzer.py @@ -32,7 +32,7 @@ elif param == '--no_checks': perform_checks = False elif param == '--enable_verification': - verification = True + verification = param.replace('--enable_verification=', '').lower() == 'true' elif param.startswith('--shell='): shell = param.replace('--shell=', '') elif param.startswith('--seed='): From 33244f52cc5181b6559bed10074d5f3476644b90 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Mon, 26 Aug 2024 16:00:50 +0200 Subject: [PATCH 02/14] add some tests as well --- .github/workflows/TestDebug.yml | 42 +++++++++++++++++++++++++++++++++ scripts/run_fuzzer.py | 5 ++++ test/sql/call_fuzzyduck.test | 14 +++++++++++ test/sql/sql_reduce.test | 2 +- 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/TestDebug.yml create mode 100644 test/sql/call_fuzzyduck.test diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml new file mode 100644 index 0000000..900c2e2 --- /dev/null +++ b/.github/workflows/TestDebug.yml @@ -0,0 +1,42 @@ +name: Test Debug +on: + workflow_dispatch: + pull_request: + push: + branches: + - '**' + - '!main' + +jobs: + build-duckdb: + name: Build DuckDB + runs-on: ubuntu-latest + timeout-minutes: 120 + outputs: + duckdb-hash: ${{ steps.find-hash.outputs.hash }} + env: + BUILD_ICU: 1 + BUILD_JSON: 1 + BUILD_TPCH: 1 + BUILD_TPCDS: 1 + BUILD_PARQUET: 1 + BUILD_JEMALLOC: 1 + CRASH_ON_ASSERT: 1 + GEN: ninja + + steps: + - name: Dependencies + shell: bash + run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build ccache + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Ccache + uses: hendrikmuhs/ccache-action@main + + - name: Build and Test + shell: bash + run: | + make debug test \ No newline at end of file diff --git a/scripts/run_fuzzer.py b/scripts/run_fuzzer.py index b5dc43a..f350756 100644 --- a/scripts/run_fuzzer.py +++ b/scripts/run_fuzzer.py @@ -16,6 +16,7 @@ dry = False max_queries = 1000 verification = False + for param in sys.argv: if param == '--sqlsmith': fuzzer = 'sqlsmith' @@ -108,6 +109,9 @@ def run_shell_command(cmd): else: current_errors = fuzzer_helper.extract_github_issues(shell, perform_checks) +# Don't go on and fuzz if perform checks = true +if perform_checks: + exit(0) last_query_log_file = 'sqlsmith.log' complete_log_file = 'sqlsmith.complete.log' @@ -118,6 +122,7 @@ def run_shell_command(cmd): ==========================================''' ) + load_script = create_db_script(db) fuzzer_name = get_fuzzer_name(fuzzer) fuzzer = ( diff --git a/test/sql/call_fuzzyduck.test b/test/sql/call_fuzzyduck.test new file mode 100644 index 0000000..3252c31 --- /dev/null +++ b/test/sql/call_fuzzyduck.test @@ -0,0 +1,14 @@ +# name: test/sql/call_fuzzyduck.test +# description: Test fuzzyduck +# group: [fuzzyduck] + +require sqlsmith + +statement ok +call fuzzyduck(max_queries=2, seed=933847600, verbose_output=1, log='sqlsmith.log', complete_log='sqlsmith.complete.log', enable_verification=True); + +#statement ok +#call fuzz_all_functions(seed=10, log='log_functions.txt', complete_log='clog_functions.txt' ); + +#statement ok +#call fuzzyduck(max_queries=10, seed=4, verbose_output=1, log='__TEST_DIR__/logs.txt', complete_log='__TEST_DIR__/clog.txt', enable_verification=True); diff --git a/test/sql/sql_reduce.test b/test/sql/sql_reduce.test index 1bfb3b1..c261974 100644 --- a/test/sql/sql_reduce.test +++ b/test/sql/sql_reduce.test @@ -1,4 +1,4 @@ -# name: test/sql_reduce.test +# name: test/sql/sql_reduce.test # description: Test reduce SQL statement # group: [sqlsmith] From 313a5628c4948482fd4a240476750355070f6df3 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Mon, 26 Aug 2024 16:01:44 +0200 Subject: [PATCH 03/14] make test_debug --- .github/workflows/TestDebug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml index 900c2e2..d5e56ce 100644 --- a/.github/workflows/TestDebug.yml +++ b/.github/workflows/TestDebug.yml @@ -39,4 +39,4 @@ jobs: - name: Build and Test shell: bash run: | - make debug test \ No newline at end of file + make test_debug \ No newline at end of file From 231338545c5051ecdc47c6059c9727a2eb6a1804 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Mon, 26 Aug 2024 16:05:28 +0200 Subject: [PATCH 04/14] remove unneeded changes --- scripts/run_fuzzer.py | 2 +- test/sql/call_fuzzyduck.test | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/run_fuzzer.py b/scripts/run_fuzzer.py index f350756..cfc2aee 100644 --- a/scripts/run_fuzzer.py +++ b/scripts/run_fuzzer.py @@ -33,7 +33,7 @@ elif param == '--no_checks': perform_checks = False elif param == '--enable_verification': - verification = param.replace('--enable_verification=', '').lower() == 'true' + verification = True elif param.startswith('--shell='): shell = param.replace('--shell=', '') elif param.startswith('--seed='): diff --git a/test/sql/call_fuzzyduck.test b/test/sql/call_fuzzyduck.test index 3252c31..93ebeaa 100644 --- a/test/sql/call_fuzzyduck.test +++ b/test/sql/call_fuzzyduck.test @@ -7,8 +7,8 @@ require sqlsmith statement ok call fuzzyduck(max_queries=2, seed=933847600, verbose_output=1, log='sqlsmith.log', complete_log='sqlsmith.complete.log', enable_verification=True); -#statement ok -#call fuzz_all_functions(seed=10, log='log_functions.txt', complete_log='clog_functions.txt' ); +statement ok +call fuzz_all_functions(seed=10, log='log_functions.txt', complete_log='clog_functions.txt' ); -#statement ok -#call fuzzyduck(max_queries=10, seed=4, verbose_output=1, log='__TEST_DIR__/logs.txt', complete_log='__TEST_DIR__/clog.txt', enable_verification=True); +statement ok +call fuzzyduck(max_queries=10, seed=4, verbose_output=1, log='__TEST_DIR__/logs.txt', complete_log='__TEST_DIR__/clog.txt', enable_verification=True); From 05b8b879a09afe8719a1e2804fee8b1589877e5c Mon Sep 17 00:00:00 2001 From: Tmonster Date: Mon, 26 Aug 2024 16:26:16 +0200 Subject: [PATCH 05/14] set recursive submodule --- .github/workflows/TestDebug.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml index d5e56ce..651d454 100644 --- a/.github/workflows/TestDebug.yml +++ b/.github/workflows/TestDebug.yml @@ -32,6 +32,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + submodules: recursive - name: Setup Ccache uses: hendrikmuhs/ccache-action@main From 580b313ee7c4ebe5829e645d8e8f009241d0b944 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 27 Aug 2024 08:53:20 +0200 Subject: [PATCH 06/14] update duckdb pointer --- duckdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duckdb b/duckdb index 5be7060..b9ee771 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 5be70607225453016b36361f56c832517b1cdb8a +Subproject commit b9ee7714b928b18125711c3ceaf6e71d738b96b9 From cb16a9e3484e2f3c6ee03db8f0b96869e20fe00c Mon Sep 17 00:00:00 2001 From: Tmonster Date: Thu, 29 Aug 2024 17:07:54 +0200 Subject: [PATCH 07/14] update submodule again --- duckdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duckdb b/duckdb index b9ee771..5bdb091 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit b9ee7714b928b18125711c3ceaf6e71d738b96b9 +Subproject commit 5bdb091a5d67460da3ca3a89f21b7cdc588d4544 From 6ca71c7954315ac1568cba309ec5bf2bd3ba5e76 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 3 Sep 2024 09:53:50 +0200 Subject: [PATCH 08/14] dont build with ninja, see if building then does not crash machine --- .github/workflows/TestDebug.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml index 651d454..9c2faf9 100644 --- a/.github/workflows/TestDebug.yml +++ b/.github/workflows/TestDebug.yml @@ -22,7 +22,6 @@ jobs: BUILD_PARQUET: 1 BUILD_JEMALLOC: 1 CRASH_ON_ASSERT: 1 - GEN: ninja steps: - name: Dependencies From afbec769ef56e4d1138256f24837ccfa919881b8 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 3 Sep 2024 09:55:49 +0200 Subject: [PATCH 09/14] use checkout v4 --- .github/workflows/TestDebug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml index 9c2faf9..c34ea5c 100644 --- a/.github/workflows/TestDebug.yml +++ b/.github/workflows/TestDebug.yml @@ -28,7 +28,7 @@ jobs: shell: bash run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build ccache - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: recursive From df74a31592c6915ab97a428c35969bb9e51d1451 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 3 Sep 2024 10:32:32 +0200 Subject: [PATCH 10/14] lets see --- .github/workflows/TestDebug.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml index c34ea5c..212c1f7 100644 --- a/.github/workflows/TestDebug.yml +++ b/.github/workflows/TestDebug.yml @@ -36,7 +36,10 @@ jobs: - name: Setup Ccache uses: hendrikmuhs/ccache-action@main + - name: Setup upterm session + uses: lhotari/action-upterm@v1 + - name: Build and Test shell: bash run: | - make test_debug \ No newline at end of file + GEN=ninja make -j 2 test_debug \ No newline at end of file From 1617fc9949bd19607852f951246841526f8e6b54 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 3 Sep 2024 10:55:13 +0200 Subject: [PATCH 11/14] remove tmux thing --- .github/workflows/TestDebug.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml index 212c1f7..a0278d5 100644 --- a/.github/workflows/TestDebug.yml +++ b/.github/workflows/TestDebug.yml @@ -36,9 +36,6 @@ jobs: - name: Setup Ccache uses: hendrikmuhs/ccache-action@main - - name: Setup upterm session - uses: lhotari/action-upterm@v1 - - name: Build and Test shell: bash run: | From 87135c226d5160a265485c35b5973a237a7d6b99 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 3 Sep 2024 11:04:53 +0200 Subject: [PATCH 12/14] remove fuzz all functions --- test/sql/call_fuzzyduck.test | 7 ++----- test/sql/sql_reduce.test | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/sql/call_fuzzyduck.test b/test/sql/call_fuzzyduck.test index 93ebeaa..3964217 100644 --- a/test/sql/call_fuzzyduck.test +++ b/test/sql/call_fuzzyduck.test @@ -5,10 +5,7 @@ require sqlsmith statement ok -call fuzzyduck(max_queries=2, seed=933847600, verbose_output=1, log='sqlsmith.log', complete_log='sqlsmith.complete.log', enable_verification=True); +call fuzzyduck(max_queries=2, verbose_output=1, log='sqlsmith.log', complete_log='sqlsmith.complete.log', enable_verification=True); statement ok -call fuzz_all_functions(seed=10, log='log_functions.txt', complete_log='clog_functions.txt' ); - -statement ok -call fuzzyduck(max_queries=10, seed=4, verbose_output=1, log='__TEST_DIR__/logs.txt', complete_log='__TEST_DIR__/clog.txt', enable_verification=True); +call fuzzyduck(max_queries=2, verbose_output=1, log='__TEST_DIR__/logs.txt', complete_log='__TEST_DIR__/clog.txt', enable_verification=false); diff --git a/test/sql/sql_reduce.test b/test/sql/sql_reduce.test index c261974..9ac9dc9 100644 --- a/test/sql/sql_reduce.test +++ b/test/sql/sql_reduce.test @@ -2,6 +2,8 @@ # description: Test reduce SQL statement # group: [sqlsmith] +mode skip + require sqlsmith query I From d2f44bd82336aa84d2e0764a81e97beb82769a77 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 3 Sep 2024 11:12:27 +0200 Subject: [PATCH 13/14] remove mode skip --- test/sql/sql_reduce.test | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/sql/sql_reduce.test b/test/sql/sql_reduce.test index 9ac9dc9..c261974 100644 --- a/test/sql/sql_reduce.test +++ b/test/sql/sql_reduce.test @@ -2,8 +2,6 @@ # description: Test reduce SQL statement # group: [sqlsmith] -mode skip - require sqlsmith query I From 8b4dbf7456b7fd57eaf5bde006e3e2f02ef29b53 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 3 Sep 2024 13:05:43 +0200 Subject: [PATCH 14/14] remove -j 2 anyway --- .github/workflows/TestDebug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TestDebug.yml b/.github/workflows/TestDebug.yml index a0278d5..9900cf0 100644 --- a/.github/workflows/TestDebug.yml +++ b/.github/workflows/TestDebug.yml @@ -39,4 +39,4 @@ jobs: - name: Build and Test shell: bash run: | - GEN=ninja make -j 2 test_debug \ No newline at end of file + make test_debug