Tests: Fix ubuntu24.04-arm issues

This commit is contained in:
Wilson Snyder 2025-03-22 16:55:53 -04:00
parent 0b6be2809e
commit 464e19caaa
11 changed files with 25 additions and 18 deletions

View File

@ -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

View File

@ -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-

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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],

View File

@ -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;

View File

@ -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

View File

@ -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")

View File

@ -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;