tests: fail the test itself in case of Fatal/sanitizer alerts#82234
Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom Jun 20, 2025
Merged
Conversation
Previously it was reported at the end of the all tests, and even code was not changed, and this hide errors and makes debugging way harder.
Contributor
alexey-milovidov
approved these changes
Jun 20, 2025
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Jun 23, 2025
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Jun 23, 2025
…path)
This time I tested it with sanitizers:
$ ../tests/clickhouse-test shebang
Using queries from '/src/ch/clickhouse/tests/queries' directory
Connecting to ClickHouse server... OK
Connected to server 25.7.1.1 @ 9042a93 master
Found 1 parallel tests and 0 sequential tests
Running about 1 stateless tests (Process-3).
02203_shebang: [ FAIL ] 0.33 sec.
Reason: having stderror:
Path: /src/ch/clickhouse/tests/queries/0_stateless/test_ggjjtc06/clickhouse-351von_4.10890
==================
WARNING: ThreadSanitizer: data race (pid=10890)
Write of size 4 at 0x5555569e9718 by thread T2:
#0 thread2_func <null> (test-tsan+0xe7f68)
Previous write of size 4 at 0x5555569e9718 by thread T1:
#0 thread1_func <null> (test-tsan+0xe7f28)
Location is global 'shared_var' of size 4 at 0x5555569e9718 (test-tsan+0x1495718)
Thread T2 (tid=10893, running) created by main thread at:
#0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
ClickHouse#1 main <null> (test-tsan+0xe7fc5)
Thread T1 (tid=10892, finished) created by main thread at:
#0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
ClickHouse#1 main <null> (test-tsan+0xe7fae)
SUMMARY: ThreadSanitizer: data race (/tmp/test-tsan+0xe7f68) in thread2_func
==================
ThreadSanitizer: reported 1 warnings
stdout:
1
Database: test_ggjjtc06
Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
All tests have finished.
And "Fatal" logs:
$ ../tests/clickhouse-test shebang
Using queries from '/src/ch/clickhouse/tests/queries' directory
Connecting to ClickHouse server... OK
Connected to server 25.7.1.1 @ 9042a93 master
Found 1 parallel tests and 0 sequential tests
Running about 1 stateless tests (Process-3).
02203_shebang: [ FAIL ] 0.33 sec.
Reason: having stderror:
Path: /src/ch/clickhouse/tests/queries/0_stateless/test_grqdqc9f/clickhouse-p8a4uip4
foo
stdout:
1
Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
All tests have finished.
Fixes: ClickHouse#82234
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Jun 23, 2025
…path)
This time I tested it with sanitizers:
$ ../tests/clickhouse-test shebang
Using queries from '/src/ch/clickhouse/tests/queries' directory
Connecting to ClickHouse server... OK
Connected to server 25.7.1.1 @ 9042a93 master
Found 1 parallel tests and 0 sequential tests
Running about 1 stateless tests (Process-3).
02203_shebang: [ FAIL ] 0.33 sec.
Reason: having stderror:
Path: /src/ch/clickhouse/tests/queries/0_stateless/test_ggjjtc06/clickhouse-351von_4.10890
==================
WARNING: ThreadSanitizer: data race (pid=10890)
Write of size 4 at 0x5555569e9718 by thread T2:
#0 thread2_func <null> (test-tsan+0xe7f68)
Previous write of size 4 at 0x5555569e9718 by thread T1:
#0 thread1_func <null> (test-tsan+0xe7f28)
Location is global 'shared_var' of size 4 at 0x5555569e9718 (test-tsan+0x1495718)
Thread T2 (tid=10893, running) created by main thread at:
#0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
ClickHouse#1 main <null> (test-tsan+0xe7fc5)
Thread T1 (tid=10892, finished) created by main thread at:
#0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
ClickHouse#1 main <null> (test-tsan+0xe7fae)
SUMMARY: ThreadSanitizer: data race (/tmp/test-tsan+0xe7f68) in thread2_func
==================
ThreadSanitizer: reported 1 warnings
stdout:
1
Database: test_ggjjtc06
Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
All tests have finished.
And "Fatal" logs:
$ ../tests/clickhouse-test shebang
Using queries from '/src/ch/clickhouse/tests/queries' directory
Connecting to ClickHouse server... OK
Connected to server 25.7.1.1 @ 9042a93 master
Found 1 parallel tests and 0 sequential tests
Running about 1 stateless tests (Process-3).
02203_shebang: [ FAIL ] 0.33 sec.
Reason: having stderror:
Path: /src/ch/clickhouse/tests/queries/0_stateless/test_grqdqc9f/clickhouse-p8a4uip4
foo
stdout:
1
Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
All tests have finished.
Fixes: ClickHouse#82234
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.
Previously it was reported at the end of the all tests, and even code was not changed, and this hide errors and makes debugging way harder.
Changelog category (leave one):