diff --git a/ci/ci-install.bash b/ci/ci-install.bash index 594d96ba4..7ecc860de 100755 --- a/ci/ci-install.bash +++ b/ci/ci-install.bash @@ -55,16 +55,16 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then sudo apt-get update sudo apt-get install ccache help2man libfl-dev || sudo apt-get install ccache help2man libfl-dev - if [ "$CI_RUNS_ON" != "ubuntu-22.04" ]; then + if [[ ! "$CI_RUNS_ON" =~ "ubuntu-22.04" ]]; then # Some conflict of libunwind verison on 22.04, can live without it for now sudo apt-get install libgoogle-perftools-dev || sudo apt-get install libgoogle-perftools-dev fi - if [ "$CI_RUNS_ON" = "ubuntu-20.04" ] || [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then + if [[ "$CI_RUNS_ON" =~ "ubuntu-20.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then sudo apt-get install libsystemc libsystemc-dev || sudo apt-get install libsystemc libsystemc-dev fi - if [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then + if [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then sudo apt-get install bear mold || sudo apt-get install bear mold fi @@ -92,11 +92,11 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3 || sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3 # Required for test_regress/t/t_dist_attributes.py - if [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then + if [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then sudo apt-get install python3-clang mold || sudo apt-get install python3-clang mold fi - if [ "$CI_RUNS_ON" = "ubuntu-20.04" ] || [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then + if [[ "$CI_RUNS_ON" =~ "ubuntu-20.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then sudo apt-get install libsystemc-dev || sudo apt-get install libsystemc-dev fi diff --git a/ci/ci-script.bash b/ci/ci-script.bash index 35b594422..88e6ff1dc 100755 --- a/ci/ci-script.bash +++ b/ci/ci-script.bash @@ -87,7 +87,7 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then fi # Run sanitize on Ubuntu 22.04 only - ( [ "$CI_RUNS_ON" = 'ubuntu-22.04' ] || [ "$CI_RUNS_ON" = 'ubuntu-24.04' ] ) && sanitize='--sanitize' || sanitize='' + ( [[ "$CI_RUNS_ON" =~ 'ubuntu-22.04' ]] || [[ "$CI_RUNS_ON" =~ 'ubuntu-24.04' ]] ) && sanitize='--sanitize' || sanitize='' TEST_REGRESS=test_regress if [ "$CI_RELOC" == 1 ]; then @@ -121,10 +121,10 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=3/4 ;; vltmt-0) - "$MAKE" -C "$TEST_REGRESS" SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=0/2 + "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=0/2 ;; vltmt-1) - "$MAKE" -C "$TEST_REGRESS" SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2 + "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=1/2 ;; coverage-all) nodist/code_coverage --stages 1- diff --git a/include/verilated_vpi.cpp b/include/verilated_vpi.cpp index 5ab3caca6..c05b0820d 100644 --- a/include/verilated_vpi.cpp +++ b/include/verilated_vpi.cpp @@ -2788,8 +2788,8 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value valuep, p_vpi_time /*time_ } else if (valuep->format == vpiOctStrVal) { const int len = std::strlen(valuep->value.str); for (int i = 0; i < len; ++i) { - char digit = valuep->value.str[len - i - 1] - '0'; - if (digit < 0 || digit > 7) { + unsigned char digit = valuep->value.str[len - i - 1] - '0'; + if (digit > 7) { // If str was < '0', then as unsigned, digit > 7 VL_VPI_WARNING_(__FILE__, __LINE__, "%s: Non octal character '%c' in '%s' as value %s for %s", __func__, digit + '0', valuep->value.str, diff --git a/test_regress/t/t_a5_attributes_include.py b/test_regress/t/t_a5_attributes_include.py index 730a6d447..5959677ae 100755 --- a/test_regress/t/t_a5_attributes_include.py +++ b/test_regress/t/t_a5_attributes_include.py @@ -30,7 +30,7 @@ if 'VERILATOR_TEST_NO_ATTRIBUTES' in os.environ: if not os.path.exists(root + "/src/obj_dbg/compile_commands.json"): test.skip("compile_commands.json not found. Please install 'bear > 3.0' and rebuild Verilator") if not have_clang_check(): - test.skip("No libclang installed\n") + test.skip("No libclang installed") # some of the files are only used in Verilation # and are only in "include" folder diff --git a/test_regress/t/t_a5_attributes_src.py b/test_regress/t/t_a5_attributes_src.py index 3c55ea4e2..185d8eb46 100755 --- a/test_regress/t/t_a5_attributes_src.py +++ b/test_regress/t/t_a5_attributes_src.py @@ -30,7 +30,7 @@ if 'VERILATOR_TEST_NO_ATTRIBUTES' in os.environ: if not os.path.exists(root + "/src/obj_dbg/compile_commands.json"): test.skip("compile_commands.json not found. Please install 'bear > 3.0' and rebuild Verilator") if not have_clang_check(): - test.skip("No libclang installed\n") + test.skip("No libclang installed") # some of the files are only used in Verilation # and are only in "include" folder diff --git a/test_regress/t/t_dist_attributes_bad.py b/test_regress/t/t_dist_attributes_bad.py index 14b04ec27..1fca2d090 100755 --- a/test_regress/t/t_dist_attributes_bad.py +++ b/test_regress/t/t_dist_attributes_bad.py @@ -30,7 +30,7 @@ if 'VERILATOR_TEST_NO_ATTRIBUTES' in os.environ: if not os.path.exists(root + "/.git"): test.skip("Not in a git repository") if not have_clang_check(): - test.skip("No libclang installed\n") + test.skip("No libclang installed") aroot = os.path.abspath(root) ccjson_file = test.obj_dir + "/compile_commands.json" diff --git a/test_regress/t/t_leak.py b/test_regress/t/t_leak.py index a743e049c..cd84c8163 100755 --- a/test_regress/t/t_leak.py +++ b/test_regress/t/t_leak.py @@ -11,9 +11,6 @@ import vltest_bootstrap test.scenarios('vlt_all') -if test.vltmt and test.getenv_def('TRAVIS_DIST', "None") == "trusty": - test.skip("Multithreaded test does not work under CI w/ Ubuntu Trusty") - test.compile(make_top_shell=False, make_main=False, verilator_flags2=["--exe", test.pli_filename], diff --git a/test_regress/t/t_math_real.v b/test_regress/t/t_math_real.v index 5e2344e5b..6c6ac73e0 100644 --- a/test_regress/t/t_math_real.v +++ b/test_regress/t/t_math_real.v @@ -166,9 +166,11 @@ module t (/*AUTOARG*/ `checks(s, "-inf"); r = $sqrt(-1.0); // NaN s = $sformatf("%g", r); - `checks(s, "-nan"); + if (s == "-nan") s = "nan"; + `checks(s, "nan"); r = -$sqrt(-1.0); // NaN s = $sformatf("%g", r); + if (s == "-nan") s = "nan"; `checks(s, "nan"); if (real'(TWENTY) != 20.0) $stop; diff --git a/test_regress/t/t_prof.py b/test_regress/t/t_prof.py index f47b92805..e5ebf6147 100755 --- a/test_regress/t/t_prof.py +++ b/test_regress/t/t_prof.py @@ -8,9 +8,13 @@ # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap +import platform test.scenarios('vlt_all') +if re.search(r'clang', test.cxx_version) and 'aarch64' in platform.processor(): + test.skip("Known compiler profile issues on clang aarch64") + test.compile(verilator_flags2=["--stats --prof-cfuncs +define+T_PROF"]) # TODO below might no longer be required as configure checks for -pg diff --git a/test_regress/t/t_prof_timing.py b/test_regress/t/t_prof_timing.py index e06dc0024..59f233265 100755 --- a/test_regress/t/t_prof_timing.py +++ b/test_regress/t/t_prof_timing.py @@ -8,10 +8,14 @@ # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap +import platform test.scenarios('vlt_all') test.top_filename = "t/t_prof.v" +if re.search(r'clang', test.cxx_version) and 'aarch64' in platform.processor(): + test.skip("Known compiler profile issues on clang aarch64") + # TODO below might no longer be required as configure checks for -pg if 'VERILATOR_TEST_NO_GPROF' in os.environ: test.skip("Skipping due to VERILATOR_TEST_NO_GPROF") diff --git a/test_regress/t/t_vpi_time_cb_c.cpp b/test_regress/t/t_vpi_time_cb_c.cpp index 8bbbb0a48..4f69d232c 100644 --- a/test_regress/t/t_vpi_time_cb_c.cpp +++ b/test_regress/t/t_vpi_time_cb_c.cpp @@ -113,7 +113,7 @@ extern "C" void dpii_init() { t_cb_data cb_data_n1, cb_data_n2, cb_data_n3; bzero(&cb_data_n1, sizeof(cb_data_n1)); bzero(&cb_data_n2, sizeof(cb_data_n2)); - bzero(&cb_data_n2, sizeof(cb_data_n3)); + bzero(&cb_data_n3, sizeof(cb_data_n3)); s_vpi_time t1, t2, t3; cb_data_n1.reason = cbAfterDelay;