1898 Commits

Author SHA1 Message Date
Paul Floyd
827a1b8c30 solaris readlinkat: check that buf is accessible for proc self path a.out 2026-01-04 10:17:15 +01:00
Paul Floyd
8d8023d107 syswrap readlink and linux readlinkat: check that buf is accessible for proc self exe case
Also update the t testcases to cover this.
2026-01-04 09:34:54 +01:00
Mark Wielaard
294742a2d9 Fix bug514094,vgtest typo in none/tests/Makefile.am 2026-01-03 22:50:28 +01:00
Paul Floyd
dae37ecd26 regtest: fix warning
Added a nice const named variable then didn't use it
2026-01-03 22:32:56 +01:00
Paul Floyd
987034c441 Regtest: add missing readlinkat_self files 2026-01-03 22:16:58 +01:00
Paul Floyd
bd9edb8fcd readlink[at] syswrap: limit copy to bufsiz when path is proc self exe 2026-01-03 21:17:00 +01:00
Paul Floyd
5c0f5e604b Bug 514094 - readlink("/proc/self/exe") overwrites buffer beyond its return value
Used the reproducer as the basis for a test on Solaris and Linux.
2026-01-03 18:52:59 +01:00
Florian Krohm
26a2ed8106 s390 disasm-test: Add --all-except-exrl command line option.
EX and EXRL need special scaffolding and treatment.

Part of fixing https://bugs.kde.org/show_bug.cgi?id=510840
2025-12-31 18:55:37 +00:00
Paul Floyd
b35aa82658 Regtest: use basic stderr filter for none/tests/iropt-test
This was doing no filtering. macOS needs filtering in every
directory otherwise there wioll be a failure with a diff from
dsymutil like

+--49940-- run: /usr/bin/dsymutil "./iropt-test-sec"
2025-12-28 11:34:38 +01:00
Paul Floyd
48ff6038d0 Regtest: another test that needs to increase the value for an 'unused' fd. 2025-12-27 18:56:39 +01:00
Paul Floyd
937c2e74d0 Regtest: increase the 'unused' fd value in none use_after_close
Darwin 22 dyld seems to use 9 fds. We were using 7 as the 'unused'
value but that will soon be no longer true on all platforms.
2025-12-27 18:48:28 +01:00
Alexandra Hájková
c3339bae0e Add SSE4.1 PMULLD instruction for x86 32 bit
Support pmulld (packed multiply 32-bit doubleword integers) instruction
in guest_x86_toIR.c and host_x86_isel.c. Add test function to
sse4-common.h and update none/tests/x86/sse4-x86.c to test the
instruction.

BZ: https://bugs.kde.org/show_bug.cgi?id=513475
2025-12-26 09:17:48 +01:00
Paul Floyd
af48d83637 Clean up a few loose ends from previous commit adding Darwin 21 support.
Update NEWS, one missed expected update and left over debug printfs
in a newly failing Darwin testcase.
2025-12-25 09:02:33 +01:00
Paul Floyd
bd417daf8b Bug 513636 - Support macOS 12.0 (Monterey)
Intel only for the moment.
2025-12-24 17:36:11 +01:00
Paul Floyd
7fa0593648 Darwin regtest: update none apple-main-arg for macOS 10.14
Looks like the apple pointer to the executable name started having a prefix
starting with macOS 10.14.
2025-12-23 10:55:25 +01:00
Paul Floyd
eab939e9c9 Bug 513533 - Support macOS 11.0 (Big Sur)
Most of the work for this was done by Louis Brunner.
Thanks Louis.
2025-12-20 15:47:50 +01:00
Florian Krohm
1d4182eed4 s390 disasm-test: Add constraint for VPDI insn. 2025-12-17 22:31:41 +00:00
Florian Krohm
ab89bdcfbd s390: Fix build failure
Followup to 778fe51a69.
2025-12-14 18:28:25 +00:00
Paul Floyd
a28682dc7c Darwin regtest: update none ioctl_moans
This testcase needs IOCTL_REQUEST_BASE to be set to some bogus
value with the platform dependent "no direction" flag set.
That flag wasn't being set for Darwin and so the testcase was
failing.
2025-12-14 10:05:04 +01:00
Florian Krohm
778fe51a69 testsuite: Tidy. Remove empty .stdout.exp files
As per tests/vg_regtest:

 Expected stdout (filtered) is kept in <test>.stdout.exp* (can be more
 than one expected output).  It can be missing if it would be empty.
2025-12-13 18:37:27 +00:00
Paul Floyd
2e773335b7 Regtest: fix and x86 test unused function warning 2025-12-10 13:16:54 +01:00
Alexandra Hájková
fb25ce838c Add SSE4.1 min/max instructions for x86 32 bit
Support pmaxsb, pminsb, pmaxuw, pminuw, pmaxud and pminud instructions
in guest_x86_toIR.c and host_x86_isel.c. Move test functions from
amd64/sse4-64.c to sse4-common.h and update none/tests/x86/sse4-x86.c
and sse4-x86.stdout.exp to test all min/max instructions.

BZ: https://bugs.kde.org/show_bug.cgi?id=512873
2025-12-09 12:44:24 +01:00
Mark Wielaard
db4da40262 Add sse4-common.h to none/tests/Makefile.am noinst_HEADERS
Fixes: 5e584556a9 ("Add none/tests/sse4-common.h header")
2025-11-30 16:00:41 +01:00
Florian Krohm
502fb19a40 s390: Remove S390_NUM_FACILITY_DW; fix testcase stfle.c (BZ 509562)
Now that the stfle insn is available we can use it to tell uas how
many double words are needed to store all facility bits. Hence,
S390_NUM_FACILITY_DW can go.

none/tests/s390x/stfle.c: The bug is here

  if (bit_to_test < 64)
    return (hoststfle[0] & (1ULL << (63 - bit_to_test)));
  else if (bit_to_test < 128)
    return (hoststfle[1] & (1ULL << (63 - bit_to_test)));
  else if (bit_to_test < 192)
    return (hoststfle[2] & (1ULL << (63 - bit_to_test)));

when bit_to_test >= 64.  Now fixed and test added.

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-30 08:34:46 +00:00
Paul Floyd
bf7c22738b Darwin: many fixes for OSX 10.13
Most of these changes are from Louis Brunner's GitHub repo.
The most imortant changes are to the memory space and to the code
related to getting the host filename during startup. This means
that when Valgrind crashes or hits an assert we now get a legible
host stacktrrace.

This also fixes none/tests/darwin/bug228343
2025-11-27 13:26:57 +01:00
Paul Floyd
8e93514465 Darwin: fix x86 build and client syscall 2025-11-26 20:26:08 +01:00
Alexandra Hájková
e2a244aceb Add pmaxsd and pminsd support for x86 32 bit
Support pmaxsd and pminsd instructions in guest_x86_toIR.c and host_x86_isel.c
and modify the none/tests/x86/sse4-x86.stdout.exp to match pmaxsd and
pminsd support.
2025-11-26 20:16:48 +01:00
Alexandra Hájková
83a3116dbb sse4-common.h: make changes to make test_PMAXSD usable for 32bit
Modify DO_imm_r_r macro called by test_PMAXSD to use xmm7 register
when testing on 32bit.
2025-11-26 20:16:38 +01:00
Alexandra Hájková
5e584556a9 Add none/tests/sse4-common.h header
Refactor none/tests/amd64/sse4-64.c and none/tests/x86/sse4-x86.c
to use a common none/tests/sse4-common.h header. This eliminates
code redundancies and makes it easier to add new SSE4 tests for both
architectures more easily. The shared header contains common helper functions,
type definitions, and test macros previously duplicated in both files.
2025-11-26 20:16:29 +01:00
Florian Krohm
2020b9914d s390x_features.c cleanup
Remove detection of unneeded facilities: zarch, n3, exrl, mi3
Rename s390x-vx2 --> s390x-vxe2 to be consistent with VEX_HWCAPS_S390X_VXE2
Change vec2_float.vgtest accordingly
2025-11-26 16:51:49 +00:00
Florian Krohm
5e0aa0cefa s390: PFPO facility related cleanups (BZ 509562)
The PFPO facility is always present on the supported machines.
- Remove VEX_HWCAPS_S390X_PFPO, s390_host_has_pfpo and EmFail_S390X_pfpo
- Update tests/s390x_features.c and none/tests/s390x/pfpo
- Update memcheck/tests/vbit-test

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-25 13:50:37 +00:00
Florian Krohm
ccbd64548f s390: load/store-on-condition / high-word facility related cleanups (BZ 509562)
The load/store-on-condition / high-word facility is always present on the
supported machines.
- Remove VEX_HWCAPS_S390X_LSC and s390_host_has_lsc
- Update tests/s390x_features.c and none/tests/s390x/high-word

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-25 13:23:52 +00:00
Florian Krohm
9d2e3da555 s390: ETF2/ETF3-enhancement facilities related cleanups (BZ 509562)
The ETF2/ETF3-enhancement facilities are always present on
the supported machines.
- Remove VEX_HWCAPS_S390X_ETF2 and s390_host_has_etf2
- Remove VEX_HWCAPS_S390X_ETF3 and s390_host_has_etf3
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-24 18:39:39 +00:00
Florian Krohm
49d3e63da6 s390: decimal-floating-point facility related cleanups (BZ 509562)
The decimal-floating-point facility is always present on the supported
machines.
- Remove VEX_HWCAPS_S390X_DFP and s390_host_has_dfp
- Remove EmFail_S390X_DFP_insn
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-24 16:40:23 +00:00
Paul Floyd
23c8f59703 Darwin regtest: make a variant of none require-text-symbol-2
This test looks for a bogus symbol in libc.so. But Darwin
has no libc.so, so make this variant that looks in libsystem_c.dylib.
The -2 variant now has a !os_test darwin prereq and the new -3 variant
has an os_test darwin prereq.
2025-11-24 12:55:15 +01:00
Florian Krohm
610f0e4b5d s390: floating-point-extension facility related cleanups (BZ 509562)
The floating-point-extension facility is always present on the supported
machines.
- Remove s390_host_has_fpext and VEX_HWCAPS_S390X_FPEXT
- Remove EmWarn_S390X_fpext_rounding and EmFail_S390X_fpext
- Remove testscases none/tests/s390x/fpext_fail and fpext_warn
- Update tests/s390x_features.c and memcheck/tests/vbit-test

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-23 22:54:18 +00:00
Philippe Waroquiers
10e067acf1 Ensure none/tests/linux/mremap[456].c remove the shared memory
As otherwise, each execution of a test leaves some shared memory lingering.

Verified by doing:
   ipcs -m | wc
   mremap4
   ipcs -m | wc

and that the nr does not increase after the fix.
2025-11-23 16:49:01 +01:00
Florian Krohm
1bd977bff8 s390: STFLE related cleanups (BZ 509562)
The STFLE insn is always present on the supported machines.
- Remove s390_host_has_stfle, VEX_HWCAPS_S390X_STFLE, and EmFail_S390X_stfle
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-21 16:54:13 +00:00
Florian Krohm
346881fb0a s390: long displacement facility related cleanups (BZ 509562)
The long displacement facilities are always present on the supported
machines.
- Remove s390_host_has_ldisp and VEX_HWCAPS_S390X_LDISP
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-21 15:51:53 +00:00
Florian Krohm
d254814f3f s390: Code cleanup due to availability of STCKF insn. (BZ 509562)
Remove EmFail_S390X_ecag, s390_host_has_stckf, and VEX_HWCAPS_S390X_STCKF.
Update none/tests/s390x/stckf.vgtest and tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-20 23:06:31 +00:00
Mark Wielaard
009022b182 none/tests/s390x/Makefile.am (EXTRA_DIST): Remove ecag.stdout.exp-z10ec
Fixes: 3a1a378eec ("s390: Code cleanup due to availability of ECAG insn")
2025-11-20 02:17:26 +01:00
Florian Krohm
3a1a378eec s390: Code cleanup due to availability of ECAG insn. (BZ 509562)
Remove EmFail_S390X_ecag
Remove none/tests/s390x/ecag.stdout.exp-z10ec because z10-EC predates Z196

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562
2025-11-19 14:26:15 +00:00
Paul Floyd
fafb6efd4b Linux arm regtest: add another leak suppression and broaden filter 2025-11-16 17:41:31 +00:00
Florian Krohm
e97cbcaf59 s390x: Support FPC rounding mode 0b111
When get_bfp_rounding_mode_from_fpc was added Irrm_PREPARE_SHORTER was
not available. The rounding mode 0x111 in the FPC was mapped to Irrm_NEAREST
with fingers crossed.
When Irrm_PREPARE_SHORTER was added later on it was forgotten to adjust this
function. Now fixed. Comments and bfp-convert testcase  adjusted.
2025-11-15 12:27:27 +00:00
Paul Floyd
a8e1583c93 Warnings: fix executable stack warnings from x86 assmebler tests. 2025-11-11 13:15:51 +00:00
Paul Floyd
ba27d633e8 Bug 413369 - unhandled amd64-darwin syscall: unix:151 (getpgid) 2025-11-02 17:46:57 +01:00
Paul Floyd
fcb0bd5045 regtest: broadan none fdleak_cmsg_supp accept suppression 2025-10-29 21:18:54 +01:00
Florian Krohm
c862aa8c1a s390x: Testcase workaround
GCC 14.2.0 does not recognize convert to fixed/logical opcodes:

bfp-convert.c: Assembler messages:
bfp-convert.c:205: Error: Unrecognized opcode: `cfebra'
bfp-convert.c:210: Error: Unrecognized opcode: `cgebra'
...
bfp-convert.c:314: Error: Unrecognized opcode: `clfebr'
bfp-convert.c:314: Error: Unrecognized opcode: `clgebr'
...
2025-10-27 13:11:58 +00:00
Florian Krohm
9942278f3a Remove a FIXME.
538 to go.
2025-10-26 22:08:48 +00:00
Florian Krohm
dffded0f2e s390x: Enable "convert to logical" BFP test
This was disabled because I had thought that a negative
operand value should result in a condition code of 1. Not so.
Additionally the operand value must be 0 after rounding.
2025-10-26 21:45:32 +00:00