parent
838b8a2bec
commit
c8c53f9a18
|
|
@ -90,9 +90,6 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
|||
export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable
|
||||
fi
|
||||
|
||||
# Run sanitize on Ubuntu 22.04 only
|
||||
( [[ "$CI_RUNS_ON" =~ 'ubuntu-22.04' ]] || [[ "$CI_RUNS_ON" =~ 'ubuntu-24.04' ]] ) && sanitize='--sanitize' || sanitize=''
|
||||
|
||||
TEST_REGRESS=test_regress
|
||||
if [ "$CI_RELOC" == 1 ]; then
|
||||
# Testing that the installation is relocatable.
|
||||
|
|
@ -113,16 +110,16 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
|||
ccache -z
|
||||
case $TESTS in
|
||||
dist-vlt-0)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=0/4
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=0/4
|
||||
;;
|
||||
dist-vlt-1)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=1/4
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=1/4
|
||||
;;
|
||||
dist-vlt-2)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=2/4
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=2/4
|
||||
;;
|
||||
dist-vlt-3)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=3/4
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=3/4
|
||||
;;
|
||||
vltmt-0)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=0/3
|
||||
|
|
|
|||
|
|
@ -2242,11 +2242,6 @@ driver.py Non-Scenario Arguments
|
|||
--rrsim
|
||||
Run Verilator generated executable and record with ``rr``.
|
||||
|
||||
--sanitize
|
||||
Enable address sanitizer to compile Verilated C++ code. This may detect
|
||||
misuses of memory, such as out-of-bound accesses, use-after-free, and
|
||||
memory leaks.
|
||||
|
||||
--site
|
||||
Run site-specific tests also.
|
||||
|
||||
|
|
|
|||
|
|
@ -1033,7 +1033,6 @@ class VlTest:
|
|||
bool(re.search(r'-savable\b', checkflags)))
|
||||
self.coverage = ( # pylint: disable=attribute-defined-outside-init
|
||||
bool(re.search(r'-coverage\b', checkflags)))
|
||||
self.sanitize = param.get('sanitize', None) # pylint: disable=attribute-defined-outside-init
|
||||
self.sc = ( # pylint: disable=attribute-defined-outside-init
|
||||
bool(re.search(r'-sc\b', checkflags)))
|
||||
self.timing = ( # pylint: disable=attribute-defined-outside-init
|
||||
|
|
@ -1078,10 +1077,6 @@ class VlTest:
|
|||
verilator_flags += ["--threads", str(param['threads'])]
|
||||
if param['vltmt'] and re.search(r'-trace-fst ', checkflags):
|
||||
verilator_flags += ["--trace-threads 2"]
|
||||
if self.sanitize:
|
||||
verilator_flags += [
|
||||
"-CFLAGS -fsanitize=address,undefined -LDFLAGS -fsanitize=address,undefined"
|
||||
]
|
||||
if param['verilator_make_cmake']:
|
||||
verilator_flags += ["--make cmake"]
|
||||
if param['verilator_make_gmake']:
|
||||
|
|
@ -2918,7 +2913,6 @@ if __name__ == '__main__':
|
|||
parser.add_argument('--rerun', action='store_true', help='rerun all tests that fail')
|
||||
parser.add_argument('--rr', action='store_true', help='run Verilator executable with rr')
|
||||
parser.add_argument('--rrsim', action='store_true', help='run Verilated executable with rr')
|
||||
parser.add_argument('--sanitize', action='store_true', help='run address sanitizer')
|
||||
parser.add_argument('--site',
|
||||
action='store_true',
|
||||
help='include VERILATOR_TEST_SITE test list')
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--assert"], sanitize=False) # GCC 11.4.0 hang bug
|
||||
test.compile(verilator_flags2=["--assert"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('vlt')
|
||||
|
||||
test.compile(sanitize=True)
|
||||
test.compile()
|
||||
|
||||
test.execute(aslr_off=True) # Some GCC versions hit an address-sanitizer bug otherwise)
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ test.scenarios('vlt')
|
|||
test.setenv("ASAN_OPTIONS", "handle_segv=0")
|
||||
test.leak_check_disable()
|
||||
|
||||
test.lint(v_flags=["--debug-sigsegv"], fails='any', sanitize=0)
|
||||
test.lint(v_flags=["--debug-sigsegv"], fails='any')
|
||||
|
||||
test.file_grep(test.compile_log_filename,
|
||||
r'%Error: Verilator internal fault, sorry. Suggest trying --debug --gdbbt')
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ if 'VERILATOR_TEST_NO_GDB' in os.environ:
|
|||
if not test.have_gdb:
|
||||
test.skip("No gdb installed")
|
||||
|
||||
test.lint(verilator_flags2=["--lint-only --debug --gdbbt --debug-sigsegv"],
|
||||
sanitize=0,
|
||||
fails='any')
|
||||
test.lint(verilator_flags2=["--lint-only --debug --gdbbt --debug-sigsegv"], fails='any')
|
||||
|
||||
test.file_grep(test.compile_log_filename, r'Program received signal SIGSEGV')
|
||||
test.file_grep(test.compile_log_filename, r'in V3Options::')
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ test.top_filename = "t/t_flag_main.v"
|
|||
|
||||
test.compile(verilator_flags2=['--binary --runtime-debug'])
|
||||
|
||||
test.execute(
|
||||
# Some GCC versions hit an address-sanitizer bug otherwise
|
||||
aslr_off=True)
|
||||
test.execute()
|
||||
|
||||
test.file_grep(test.obj_dir + "/" + test.vm_prefix + ".mk", r'VL_DEBUG=1')
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,9 @@ import vltest_bootstrap
|
|||
test.scenarios('simulator')
|
||||
test.top_filename = "t/t_trace_ub_misaligned_address.v"
|
||||
|
||||
test.compile(verilator_flags2=[
|
||||
"--binary --trace-vcd", "-CFLAGS -fsanitize=address,undefined",
|
||||
"-LDFLAGS -fsanitize=address,undefined"
|
||||
])
|
||||
test.compile(verilator_flags2=["--binary --trace-vcd", "--runtime-debug"])
|
||||
|
||||
test.execute(
|
||||
# Some GCC versions hit an address-sanitizer bug otherwise)
|
||||
aslr_off=True)
|
||||
test.execute(aslr_off=True)
|
||||
|
||||
# Make sure that there are no additional messages (such as runtime messages
|
||||
# regarding undefined behavior).test.files_identical(test.obj_dir + "/vlt_sim.log", test.golden_filename, "logfile")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
test.sanitize = False # Test neads cleanup to reclaim all callbacks
|
||||
|
||||
test.compile(make_top_shell=False,
|
||||
make_main=False,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('vlt')
|
||||
test.top_filename = test.obj_dir + "/t_vthread.v"
|
||||
test.sanitize = False # GCC takes too long otherwise
|
||||
|
||||
|
||||
def gen(filename, n):
|
||||
|
|
|
|||
Loading…
Reference in New Issue