From: Paul Floyd Date: Sat, 12 Apr 2025 16:27:06 +0000 (+0200) Subject: Illumos regtest: add 'illumos' to os_test and turn off a few tests X-Git-Tag: VALGRIND_3_25_0~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a23860abe7737d3fababd8c0bb19cf68332fea0;p=thirdparty%2Fvalgrind.git Illumos regtest: add 'illumos' to os_test and turn off a few tests The threadname tests fail on Illumos. Solaris has a syscall, sys_lwp_name, which we intercept and record. Illumos doesn't have that, with the pthread name functions looking ofr the name in /proc That's not implemented in Valgrind so I'm turning those 2 tests off. The other 3 are all based on none faultstatus. This test checks 4 things, one of which is reading from a 32k mmap that is PRIVATE and READ but is only backed by a 16k file. All other OSes generate a SIGBUS. Illumos just reads 0 from the address. --- diff --git a/gdbserver_tests/mcsignopass.vgtest b/gdbserver_tests/mcsignopass.vgtest index 73def5e6b..33347b714 100644 --- a/gdbserver_tests/mcsignopass.vgtest +++ b/gdbserver_tests/mcsignopass.vgtest @@ -4,7 +4,7 @@ # faultstatus C code will report a failure for the signal not passed # (i.e. SIGBUG, Test 3). Other tests will be successful, because signals # are eventually passed. -prereq: test -e gdb +prereq: test -e gdb && ! ../tests/os_test illumos prog: ../none/tests/faultstatus vgopts: --tool=memcheck --vgdb=full --vex-iropt-register-updates=allregs-at-mem-access --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcsignopass stderr_filter: filter_memcheck_monitor diff --git a/gdbserver_tests/mcsigpass.vgtest b/gdbserver_tests/mcsigpass.vgtest index 20f786456..9f0d6c995 100644 --- a/gdbserver_tests/mcsigpass.vgtest +++ b/gdbserver_tests/mcsigpass.vgtest @@ -1,5 +1,5 @@ # test the signal handling, when signals are passed to the Valgrind guest. -prereq: test -e gdb +prereq: test -e gdb && ! ../tests/os_test illumos prog: ../none/tests/faultstatus vgopts: --tool=memcheck --vgdb=full --vex-iropt-register-updates=allregs-at-mem-access --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcsigpass stderr_filter: filter_memcheck_monitor diff --git a/memcheck/tests/threadname.vgtest b/memcheck/tests/threadname.vgtest index 2692bd078..71fd4abe4 100644 --- a/memcheck/tests/threadname.vgtest +++ b/memcheck/tests/threadname.vgtest @@ -1,3 +1,4 @@ +prereq: ! ../tests/os_test illumos prog: threadname prereq: test -e ./threadname vgopts: -q diff --git a/memcheck/tests/threadname_xml.vgtest b/memcheck/tests/threadname_xml.vgtest index 7796ac2c8..67ee778f0 100644 --- a/memcheck/tests/threadname_xml.vgtest +++ b/memcheck/tests/threadname_xml.vgtest @@ -1,3 +1,4 @@ +prereq: ! ../tests/os_test illumos prog: threadname prereq: test -e ./threadname vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null diff --git a/none/tests/faultstatus.vgtest b/none/tests/faultstatus.vgtest index d388f29c0..adbd3874e 100644 --- a/none/tests/faultstatus.vgtest +++ b/none/tests/faultstatus.vgtest @@ -1 +1,2 @@ +prereq: ! ../../tests/os_test illumos prog: faultstatus diff --git a/tests/os_test.c b/tests/os_test.c index 7e47bf0ce..0c5bb1ddb 100644 --- a/tests/os_test.c +++ b/tests/os_test.c @@ -25,6 +25,7 @@ char* all_OSes[] = { "darwin", "solaris", "freebsd", + "illumos", NULL }; @@ -66,6 +67,7 @@ static Bool go(char* OS, char *min_version) #elif defined(VGO_solaris) if ( 0 == strcmp( OS, "solaris" ) ) return True; + if ( 0 == strcmp( OS, "illumos" ) ) return True; #elif defined(VGO_freebsd) if ( 0 == strcmp( OS, "freebsd" ) ) return True;