You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(83) |
Oct
(89) |
Nov
(97) |
Dec
(30) |
2024 |
Jan
(25) |
Feb
(73) |
Mar
(76) |
Apr
(122) |
May
(46) |
Jun
(44) |
Jul
(27) |
Aug
(30) |
Sep
(33) |
Oct
(67) |
Nov
(91) |
Dec
(70) |
2025 |
Jan
(44) |
Feb
(36) |
Mar
(85) |
Apr
(100) |
May
(138) |
Jun
(55) |
Jul
(107) |
Aug
(22) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Yao Zi <zi...@di...> - 2025-05-17 10:52:42
|
The inline assembly chunk contains abosulute address references to zz_int, which isn't practical in PIE files and results in text relocations. ld.bfd may throw out some warnings, depending on build-time configuration, warning: relocation in read-only section `.text' warning: creating DT_TEXTREL in a PIE and LLVM ld.lld doesn't even allow text relocations by default. Additionally, dynamic loader of musl-libc doesn't support text relocations, thus the test will segfault on musl even built successfully. Let's just apply @FLAG_NO_PIE@ for it and disable PIE. Signed-off-by: Yao Zi <zi...@di...> --- memcheck/tests/amd64-linux/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/memcheck/tests/amd64-linux/Makefile.am b/memcheck/tests/amd64-linux/Makefile.am index 26e8c8ed549c..240517f6258d 100644 --- a/memcheck/tests/amd64-linux/Makefile.am +++ b/memcheck/tests/amd64-linux/Makefile.am @@ -28,4 +28,5 @@ AM_CCASFLAGS += @FLAG_M64@ defcfaexpr_SOURCES = defcfaexpr.S defcfaexpr_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@ +int3_amd64_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@ reallocarray_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ -- 2.49.0 |
From: Mark W. <ma...@so...> - 2025-05-16 22:37:51
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2045aefbb0261bd5844b693e5d390affcffb8749 commit 2045aefbb0261bd5844b693e5d390affcffb8749 Author: Martin Cermak <mc...@re...> Date: Fri May 16 22:12:39 2025 +0200 PR503969: make ltpchecks: flatten the log structure Flatten the directory structure of make ltpchecks logs per PR503969#c9. Individual syscall tests are numbered, so that no testcase naming conflicts should show up. Demo upload: https://builder.sourceware.org/testrun/5b8f868b3e3c84801814dcd4ea963690f94fd2d1 Diff: --- auxprogs/ltp-tester.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/auxprogs/ltp-tester.sh b/auxprogs/ltp-tester.sh index 036f196ce2..54d807b0c2 100755 --- a/auxprogs/ltp-tester.sh +++ b/auxprogs/ltp-tester.sh @@ -9,7 +9,7 @@ fi ORIG_PATH=$PATH SCRIPT_SRC=$(dirname $0) -LOGDIR=${LOGDIR:-$LTP_SRC_DIR/ltp} +LOGDIR=${LOGDIR:-$LTP_SRC_DIR/ltp/tests} DIFFCMD="diff -u" VALGRIND="${VALGRIND:-$LTP_SRC_DIR/../../../vg-in-place}" # For parallel testing, consider IO intensive jobs, take nproc into account @@ -36,11 +36,9 @@ doTest () echo "[$nr/$c] Testing $exe ..." pushd $dir >/dev/null PATH="$ORIG_PATH:$PWD" - t1=$(date +%s) ./$exe >$l/log1std 2>$l/log1err ||: $VALGRIND -q --tool=none --log-file=$l/log2 ./$exe >$l/log2std 2>$l/log2err ||: $VALGRIND -q --tool=memcheck --log-file=$l/log3 ./$exe >$l/log3std 2>$l/log3err ||: - t2=$(date +%s) # We want to make sure that LTP syscall tests give identical # results with and without valgrind. The test logs go to the @@ -56,34 +54,35 @@ doTest () # Check logs, report errors pushd $l >/dev/null if test -s log2; then - echo -e "${exe}: unempty log2:\n$(cat log2)" | tee -a $l/$exe.log + echo -e "${exe}: unempty log2:\n$(cat log2)" | tee -a $LOGDIR/$exe.log rv="FAIL" fi if grep -f $SCRIPT_SRC/ltp-error-patterns.txt log* > error-patterns-found.txt; then - echo -e "${exe}: error string found:\n$(cat error-patterns-found.txt)" | tee -a $l/$exe.log + echo -e "${exe}: error string found:\n$(cat error-patterns-found.txt)" | tee -a $LOGDIR/$exe.log rv="FAIL" fi if ! ${DIFFCMD} log1summary log2summary >/dev/null; then - echo -e "${exe}: ${DIFFCMD} log1summary log2summary:\n$(${DIFFCMD} log1summary log2summary)" | tee -a $l/$exe.log + echo -e "${exe}: ${DIFFCMD} log1summary log2summary:\n$(${DIFFCMD} log1summary log2summary)" | tee -a $LOGDIR/$exe.log rv="FAIL" fi if ! ${DIFFCMD} log2summary log3summary >/dev/null; then - echo -e "${exe}: ${DIFFCMD} log2summary log3summary:\n$(${DIFFCMD} log2summary log3summary)" | tee -a $l/$exe.log + echo -e "${exe}: ${DIFFCMD} log2summary log3summary:\n$(${DIFFCMD} log2summary log3summary)" | tee -a $LOGDIR/$exe.log rv="FAIL" fi # synthetize automake style testlogs for bunsen import - echo ":test-result: $rv" | tee -a $l/$exe.log > $l/$exe.trs - echo "Test time secs: $((t2 - t1))" > $l/test-suite.log + echo ":test-result: $rv" | tee -a $LOGDIR/$exe.log > $LOGDIR/$exe.trs popd >/dev/null popd >/dev/null } cd $LTP_SRC_DIR +echo "See *.log files for details on each test in this directory." > $LOGDIR/test-suite.log + if [ -n "$TESTS" ]; then echo "Running individual syscall tests specified in the TESTS env var ..." mapfile -t files < <(find testcases/kernel/syscalls -executable -and -type f \ |
From: Florian K. <fk...@so...> - 2025-05-16 20:40:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4d0f42954087a4b5320a3364f61172dfdfc9e5b8 commit 4d0f42954087a4b5320a3364f61172dfdfc9e5b8 Author: Florian Krohm <fl...@ei...> Date: Fri May 16 20:39:42 2025 +0000 s390x: disasm-test: add forgotten opcodes SRNMT, LDE, and LDER Diff: --- none/tests/s390x/disasm-test/disasm-test.post.exp | 4 ++-- none/tests/s390x/disasm-test/opcode.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index 34722229c0..0f31f36ca6 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,4 +1,4 @@ -Total: 148751 tests generated -Total: 148659 insns verified +Total: 148776 tests generated +Total: 148684 insns verified Total: 0 disassembly mismatches Total: 92 specification exceptions diff --git a/none/tests/s390x/disasm-test/opcode.c b/none/tests/s390x/disasm-test/opcode.c index ef06491334..e98a5e9e5e 100644 --- a/none/tests/s390x/disasm-test/opcode.c +++ b/none/tests/s390x/disasm-test/opcode.c @@ -965,6 +965,7 @@ static const char *opcodes[] = { "pfpo", // pfpo "srnm d12(b2)", "srnmb d12(b2)", // fpext + "srnmt d12(b2)", "sfpc r1", // sfasr not implemented "ste f1,d12(x2,b2)", @@ -976,6 +977,8 @@ static const char *opcodes[] = { // Chapter 10: Control Instructions not implemented // Chapter 14: I/O Instructions not implemented // Chapter 18: Hexadecimal-Floating-Point Instructions not implemented + "lder f1,f2", + "lde f1,d12(x2,b2)", // Chapter 19: Binary-Floating-Point Instructions // Register pairs: 0-2 1-3 4-6 5-7 8-10 9-11 12-14 13-15 |
From: Martin C. <mc...@re...> - 2025-05-16 20:29:59
|
On Thu 2025-05-15 12:34 , Cyril Hrubis wrote: > Hi! > > LTP_COLORIZE_OUTPUT allows more complicated setup (y/1 always, n/0: never), > > but any value here enables the feature (e.g. LTP_COLORIZE_OUTPUT=0). > > This would be nice to unify, but I'm ok to ignore it as it's before release. > > We also have LTP_ENABLE_DEBUG that has the same values so let's keep the > API the same. I've send v3 with this and the docs changes. > > > > + > > > assert_test_fn(); > > > > > TCID = tid = get_tid(argv); > > > > Adding docs (+ sort variables while at it). > > I've only added the docs for LTP_REPRODUCIBLE_OUTPUT in v3, the sorting > should go in a separate patch. We also miss at least TST_ENABLE_DEBUG in > the output of -h switch as well. Thank-you, guys. I've added a preparation to the valgrind-ltp tester: https://sourceware.org/git/?p=valgrind.git;a=blob;f=auxprogs/ltp-tester.sh;h=036f196ce21ae6cc692de205ab49774638cfb925;hb=5894abc5fa9de30c6b4dde453bff3ac1034aa330#l19 Once the new version of LTP ships, we can try dropping our workarounds. Cheers, Martin |
From: Paul F. <pa...@so...> - 2025-05-16 19:35:59
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=8dbf86733e76d30c194f5321a72c6b44f1055e20 commit 8dbf86733e76d30c194f5321a72c6b44f1055e20 Author: Paul Floyd <pj...@wa...> Date: Fri May 16 21:32:02 2025 +0200 FreeBSD regtest: updates for FreeBSD 15.0-CURRENT Mostly minor expected/filter changes. Helgrind did detect a race condition in a Valgrind file static variable. Teh DRD dlopen test needs to be linked with the thread library. In a VirtualBox environment I'm getting 4 hanging testcases (3 in gdbserver_tests and none/freebsd/bug452274). Diff: --- drd/tests/Makefile.am | 4 +++- freebsd-helgrind.supp | 7 ++++++- helgrind/tests/Makefile.am | 1 + helgrind/tests/filter_fiw | 8 ++++++++ helgrind/tests/free_is_write.stderr.exp | 2 +- helgrind/tests/free_is_write.vgtest | 1 + memcheck/tests/Makefile.am | 2 +- memcheck/tests/filter_sendmsg | 5 +++++ memcheck/tests/sendmsg.stderr.exp | 2 +- memcheck/tests/sendmsg.stderr.exp-freebsd | 7 +++---- memcheck/tests/sendmsg.stderr.exp-freebsd-x86 | 20 -------------------- memcheck/tests/sendmsg.stderr.exp-solaris | 2 +- memcheck/tests/sendmsg.vgtest | 1 + none/tests/fdleak_cmsg_supp.supp | 2 +- 14 files changed, 33 insertions(+), 31 deletions(-) diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index e2030ad157..7fa1611a97 100755 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -550,7 +550,9 @@ bug322621_SOURCES = bug322621.cpp condvar_SOURCES = condvar.cpp condvar_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x concurrent_close_SOURCES = concurrent_close.cpp -if !VGCONF_OS_IS_FREEBSD +if VGCONF_OS_IS_FREEBSD +dlopen_main_LDADD = ${LDADD} +else dlopen_main_LDADD = -ldl endif dlopen_lib_so_SOURCES = dlopen_lib.c diff --git a/freebsd-helgrind.supp b/freebsd-helgrind.supp index dd998f15c5..1a6f372492 100644 --- a/freebsd-helgrind.supp +++ b/freebsd-helgrind.supp @@ -238,4 +238,9 @@ Helgrind:Race fun:thr_exit } - +# sigh, this is our own variable in coregrind/m_replacemalloc/vg_replace_malloc.c +{ + FREEBSD15-AMD64-MALLOC + Helgrind:Race + fun:malloc +} diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 817e08a728..b8c5fd0e78 100755 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -5,6 +5,7 @@ dist_noinst_SCRIPTS = \ filter_stderr_solaris \ filter_helgrind \ filter_xml \ + filter_fiw \ filter_freebsd.awk \ filter_stderr_freebsd \ filter_bug392331 diff --git a/helgrind/tests/filter_fiw b/helgrind/tests/filter_fiw new file mode 100755 index 0000000000..9ff7ae79a5 --- /dev/null +++ b/helgrind/tests/filter_fiw @@ -0,0 +1,8 @@ +#! /bin/sh + +# free_is_write may have different arena sizes + +./filter_stderr "$@" | + +sed 's/size [^ ]* in arena/size ... in arena/' + diff --git a/helgrind/tests/free_is_write.stderr.exp b/helgrind/tests/free_is_write.stderr.exp index daa327ce01..5d05242aca 100644 --- a/helgrind/tests/free_is_write.stderr.exp +++ b/helgrind/tests/free_is_write.stderr.exp @@ -23,7 +23,7 @@ Locks held: none This conflicts with a previous read of size 1 by thread #x Locks held: none at 0x........: main (free_is_write.c:36) - Address 0x........ is 5 bytes inside an unallocated block of size 16 in arena "client" + Address 0x........ is 5 bytes inside an unallocated block of size ... in arena "client" Done. diff --git a/helgrind/tests/free_is_write.vgtest b/helgrind/tests/free_is_write.vgtest index 5ba9d3423e..1e68c6054e 100644 --- a/helgrind/tests/free_is_write.vgtest +++ b/helgrind/tests/free_is_write.vgtest @@ -1,2 +1,3 @@ prog: free_is_write vgopts: --free-is-write=yes +stderr_filter: filter_fiw diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index eb3b6f9ee0..928ac16e6a 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -86,6 +86,7 @@ dist_noinst_SCRIPTS = \ filter_varinfo3 \ filter_memcheck \ filter_malloc_free \ + filter_sendmsg \ filter_size_t \ filter_stanza \ filter_stanza.awk \ @@ -385,7 +386,6 @@ EXTRA_DIST = \ sem.stderr.exp sem.vgtest \ sendmsg.stderr.exp sendmsg.stderr.exp-solaris sendmsg.vgtest \ sendmsg.stderr.exp-freebsd \ - sendmsg.stderr.exp-freebsd-x86 \ sh-mem.stderr.exp sh-mem.vgtest \ sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ sh-mem-random.stdout.exp sh-mem-random.vgtest \ diff --git a/memcheck/tests/filter_sendmsg b/memcheck/tests/filter_sendmsg new file mode 100755 index 0000000000..c11650dd08 --- /dev/null +++ b/memcheck/tests/filter_sendmsg @@ -0,0 +1,5 @@ +#! /bin/sh + +./filter_stderr "$@" | +sed -e "s/frame #./frame #.../" \ + -e "/by 0x........: sendmsg (in \/...libc...)/d" diff --git a/memcheck/tests/sendmsg.stderr.exp b/memcheck/tests/sendmsg.stderr.exp index 397a57996c..1268300b2b 100644 --- a/memcheck/tests/sendmsg.stderr.exp +++ b/memcheck/tests/sendmsg.stderr.exp @@ -2,6 +2,6 @@ Syscall param sendmsg(msg) points to uninitialised byte(s) at 0x........: sendmsg (in /...libc...) by 0x........: main (sendmsg.c:46) Address 0x........ is on thread 1's stack - in frame #1, created by main (sendmsg.c:13) + in frame #..., created by main (sendmsg.c:13) sendmsg: 6 diff --git a/memcheck/tests/sendmsg.stderr.exp-freebsd b/memcheck/tests/sendmsg.stderr.exp-freebsd index 7cf17e625e..d65f86f055 100644 --- a/memcheck/tests/sendmsg.stderr.exp-freebsd +++ b/memcheck/tests/sendmsg.stderr.exp-freebsd @@ -2,19 +2,18 @@ Syscall param socketcall.connect(serv_addr.sa_len) points to uninitialised byte( ... by 0x........: main (sendmsg.c:29) Address 0x........ is on thread 1's stack - in frame #1, created by main (sendmsg.c:13) + in frame #..., created by main (sendmsg.c:13) Syscall param sendmsg(sendmsg) points to uninitialised byte(s) at 0x........: _sendmsg (in /...libc...) - by 0x........: sendmsg (in /...libc...) by 0x........: main (sendmsg.c:46) Address 0x........ is on thread 1's stack - in frame #2, created by main (sendmsg.c:13) + in frame #..., created by main (sendmsg.c:13) Syscall param socketcall.connect(serv_addr.sa_len) points to uninitialised byte(s) ... by 0x........: main (sendmsg.c:59) Address 0x........ is on thread 1's stack - in frame #1, created by main (sendmsg.c:13) + in frame #..., created by main (sendmsg.c:13) sendmsg: 6 diff --git a/memcheck/tests/sendmsg.stderr.exp-freebsd-x86 b/memcheck/tests/sendmsg.stderr.exp-freebsd-x86 deleted file mode 100644 index 9aafb02afd..0000000000 --- a/memcheck/tests/sendmsg.stderr.exp-freebsd-x86 +++ /dev/null @@ -1,20 +0,0 @@ -Syscall param socketcall.connect(serv_addr.sa_len) points to uninitialised byte(s) - ... - by 0x........: main (sendmsg.c:29) - Address 0x........ is on thread 1's stack - in frame #2, created by main (sendmsg.c:13) - -Syscall param sendmsg(sendmsg) points to uninitialised byte(s) - at 0x........: _sendmsg (in /...libc...) - by 0x........: sendmsg (in /...libc...) - by 0x........: main (sendmsg.c:46) - Address 0x........ is on thread 1's stack - in frame #2, created by main (sendmsg.c:13) - -Syscall param socketcall.connect(serv_addr.sa_len) points to uninitialised byte(s) - ... - by 0x........: main (sendmsg.c:59) - Address 0x........ is on thread 1's stack - in frame #2, created by main (sendmsg.c:13) - -sendmsg: 6 diff --git a/memcheck/tests/sendmsg.stderr.exp-solaris b/memcheck/tests/sendmsg.stderr.exp-solaris index f00e76e402..3ef45c16ad 100644 --- a/memcheck/tests/sendmsg.stderr.exp-solaris +++ b/memcheck/tests/sendmsg.stderr.exp-solaris @@ -3,6 +3,6 @@ Syscall param sendmsg(msg) points to uninitialised byte(s) by 0x........: __xnet_sendmsg (in /...libc...) by 0x........: main (sendmsg.c:46) Address 0x........ is on thread 1's stack - in frame #2, created by main (sendmsg.c:13) + in frame #..., created by main (sendmsg.c:13) sendmsg: 6 diff --git a/memcheck/tests/sendmsg.vgtest b/memcheck/tests/sendmsg.vgtest index f252b62b95..562fc968fe 100644 --- a/memcheck/tests/sendmsg.vgtest +++ b/memcheck/tests/sendmsg.vgtest @@ -1,2 +1,3 @@ prog: sendmsg vgopts: -q +stderr_filter: filter_sendmsg diff --git a/none/tests/fdleak_cmsg_supp.supp b/none/tests/fdleak_cmsg_supp.supp index 95f0a31de6..cc0daca187 100644 --- a/none/tests/fdleak_cmsg_supp.supp +++ b/none/tests/fdleak_cmsg_supp.supp @@ -52,7 +52,7 @@ sup5 CoreError:FdNotClosed ... - fun:recvmsg + fun:*recvmsg fun:client fun:main } |
From: Mark W. <ma...@so...> - 2025-05-16 16:33:15
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5894abc5fa9de30c6b4dde453bff3ac1034aa330 commit 5894abc5fa9de30c6b4dde453bff3ac1034aa330 Author: Martin Cermak <mc...@re...> Date: Fri May 16 11:46:06 2025 +0200 PR503969: Make test results of make ltpchecks compatible with bunsen Synthesize automake-like testcase log format for bunsen compatibility. Each testcase now produces a triplet of <testcase>.{log,trs}, and a test-suite.log file. This way test results can be uploaded to bunsen using the t-upload-git-push command. The <testcase>.log file contains the actual testcase log. The .trs file contains automake-encoded test result. The test-suite.log file contains testcase timing information. The log directory tree respect the one of the LTP testcases to avoid naming collisions. Here is how the test result was uploaded to Bunsen: > TESTING FINISHED, logs in /home/mcermak/WORK/valgrind/valgrind/auxprogs/auxchecks/ltp-full-20250130/ltp > make[1]: Leaving directory '/home/mcermak/WORK/valgrind/valgrind/auxprogs' > > real 8m27.467s > user 44m46.416s > sys 6m46.405s > 41$ cd /home/mcermak/WORK/valgrind/valgrind/auxprogs/auxchecks/ltp-full-20250130/ltp > 41$ t-upload-git-push ssh://builder.sourceware.org/git/bunsendb.git mcermak/PR503969-$(date +%s) \ > $(find . -type f -name '*.log' -o -name '*.trs' -o -name 'test-suite.log') > 3036eba2de1cc44a1942f9681720ea234da9029e refs/tags/mcermak/PR503969-1747389329 > 41$ Here's the resulting bunsen upload: https://builder.sourceware.org/testrun/3036eba2de1cc44a1942f9681720ea234da9029e Diff: --- NEWS | 1 + auxprogs/ltp-tester.sh | 51 +++++++++++++++++++++++++------------------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/NEWS b/NEWS index bae5f6fcff..d6fbbb41b9 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 504101 Add a "vgstack" script 504177 FILE DESCRIPTORS banner shows when closing some inherited fds 501741 syscall cachestat not wrapped +503969 Make test results of make ltpchecks compatible with bunsen 504265 FreeBSD: missing syscall wrappers for fchroot and setcred To see details of a given bug, visit diff --git a/auxprogs/ltp-tester.sh b/auxprogs/ltp-tester.sh index b5ba83c0b0..036f196ce2 100755 --- a/auxprogs/ltp-tester.sh +++ b/auxprogs/ltp-tester.sh @@ -8,24 +8,21 @@ if [ -z "${LTP_SRC_DIR:-}" ]; then fi ORIG_PATH=$PATH -ORIG_PWD=$PWD -LOGDIR=${LOGDIR:-$LTP_SRC_DIR/valgrind-ltp-logs} -SUMMARY_LOG="$LOGDIR/summary.log" +SCRIPT_SRC=$(dirname $0) +LOGDIR=${LOGDIR:-$LTP_SRC_DIR/ltp} DIFFCMD="diff -u" VALGRIND="${VALGRIND:-$LTP_SRC_DIR/../../../vg-in-place}" # For parallel testing, consider IO intensive jobs, take nproc into account PARALLEL_JOBS=${PARALLEL_JOBS:-$(nproc)} # TESTS env var may be specified to restrict testing to selected test cases +# Configure the LTP testsuite behavior per +# https://lore.kernel.org/ltp/20250505195003.GB137650@pevik/T/#t +export LTP_COLORIZE_OUTPUT=0 +export LTP_REPRODUCIBLE_OUTPUT=1 -# Initialize LOGDIR +# Initialize LOGDIR for bunsen upload (https://sourceware.org/bunsen/) mkdir -p $LOGDIR; rm -rf ${LOGDIR:?}/* -myLog () -{ - msg="$1" - echo "$msg" - echo -e "FAIL: $msg" >> summary -} doTest () { @@ -33,14 +30,17 @@ doTest () nr=$2 dir=$(dirname $t) exe=$(basename $t) - l="$LOGDIR/$exe" + l="$LOGDIR/$dir/$exe" + rv="PASS" mkdir -p $l - echo "[$nr/$c] Testing $exe ..." | tee -a $l/summary + echo "[$nr/$c] Testing $exe ..." pushd $dir >/dev/null PATH="$ORIG_PATH:$PWD" + t1=$(date +%s) ./$exe >$l/log1std 2>$l/log1err ||: $VALGRIND -q --tool=none --log-file=$l/log2 ./$exe >$l/log2std 2>$l/log2err ||: $VALGRIND -q --tool=memcheck --log-file=$l/log3 ./$exe >$l/log3std 2>$l/log3err ||: + t2=$(date +%s) # We want to make sure that LTP syscall tests give identical # results with and without valgrind. The test logs go to the @@ -56,20 +56,28 @@ doTest () # Check logs, report errors pushd $l >/dev/null if test -s log2; then - myLog "${exe}: unempty log2:\n$(cat log2)" + echo -e "${exe}: unempty log2:\n$(cat log2)" | tee -a $l/$exe.log + rv="FAIL" fi - if grep -f $ORIG_PWD/ltp-error-patterns.txt log* > error-patterns-found.txt; then - myLog "${exe}: error string found:\n$(cat error-patterns-found.txt)" + if grep -f $SCRIPT_SRC/ltp-error-patterns.txt log* > error-patterns-found.txt; then + echo -e "${exe}: error string found:\n$(cat error-patterns-found.txt)" | tee -a $l/$exe.log + rv="FAIL" fi if ! ${DIFFCMD} log1summary log2summary >/dev/null; then - myLog "${exe}: ${DIFFCMD} log1summary log2summary:\n$(${DIFFCMD} log1summary log2summary)" + echo -e "${exe}: ${DIFFCMD} log1summary log2summary:\n$(${DIFFCMD} log1summary log2summary)" | tee -a $l/$exe.log + rv="FAIL" fi if ! ${DIFFCMD} log2summary log3summary >/dev/null; then - myLog "${exe}: ${DIFFCMD} log2summary log3summary:\n$(${DIFFCMD} log2summary log3summary)" + echo -e "${exe}: ${DIFFCMD} log2summary log3summary:\n$(${DIFFCMD} log2summary log3summary)" | tee -a $l/$exe.log + rv="FAIL" fi + + # synthetize automake style testlogs for bunsen import + echo ":test-result: $rv" | tee -a $l/$exe.log > $l/$exe.trs + echo "Test time secs: $((t2 - t1))" > $l/test-suite.log popd >/dev/null popd >/dev/null } @@ -83,7 +91,7 @@ if [ -n "$TESTS" ]; then else echo "Running whole the LTP syscall testsuite ..." mapfile -t files < <(find testcases/kernel/syscalls -executable -and -type f \ - | sort | grep -v -f $ORIG_PWD/ltp-excludes.txt) + | sort | grep -v -f $SCRIPT_SRC/ltp-excludes.txt) fi c=${#files[@]}; i=0 @@ -97,11 +105,4 @@ done wait -# Reconstruct $SUMMARY_LOG -for test in "${files[@]}"; do - exe=$(basename $test) - l="$LOGDIR/$exe" - cat $l/summary >> $SUMMARY_LOG -done - echo "TESTING FINISHED, logs in $LOGDIR" |
From: Petr V. <pv...@su...> - 2025-05-16 12:22:23
|
Hi Mark, > Hi Petr, Hi Cyril, > On Fri, 2025-05-16 at 14:09 +0200, Petr Vorel wrote: > > > On Fri, May 16, 2025 at 10:45:50AM +0200, Cyril Hrubis wrote: > > > > > valgrind-developers has heavy traffic, use valgrind-announce. > > > > Was this requested by valgrind devs? I suppose this is fine as long as > > > > we get their ack. > > > I think valgrind-developers is a better place for announcing new > > > versions of LTP. We can then update our own valgrind testing. > > > valgrind-announce is really for users when valgrind itself has a new > > > release. > > Sure, let's keep valgrind-developers. Thanks for feedback. > > I would consider it disturbing for myself to need to subscribe on > > valgrind-developers before the release and unsubscribe then, but > > it's Cyril who is going to send the announcement mail anyway. > You don't really need to subscribe tp valgrind-developers. If you > aren't subscribed then the message goes to moderation and will normally > be approved within a day (and the sender is normally added to the > approved list). I think this is similar to the ltp list (I am not > subscribed, but seem able to post anyway). Great, we can rely on you looking at the "pending moderator requests". This is also maintained on our side, mostly by Cyril. When I notice valid mail (there is a lot of spam of course) I approve the sender to be able to send without a subscription. I got used to mailing lists on lore.kernel.org to which one can post without any subscription. Also kernel developers got used to it (as they often send to LTP ML without a subscription). But I'm never sure if the "pending moderator requests" on other MLs is actively monitored. Kind regards, Petr > Cheers, > Mark |
From: Mark W. <ma...@kl...> - 2025-05-16 12:12:55
|
Hi Petr, Hi Cyril, On Fri, 2025-05-16 at 14:09 +0200, Petr Vorel wrote: > > On Fri, May 16, 2025 at 10:45:50AM +0200, Cyril Hrubis wrote: > > > > valgrind-developers has heavy traffic, use valgrind-announce. > > > > Was this requested by valgrind devs? I suppose this is fine as long as > > > we get their ack. > > > I think valgrind-developers is a better place for announcing new > > versions of LTP. We can then update our own valgrind testing. > > valgrind-announce is really for users when valgrind itself has a new > > release. > > Sure, let's keep valgrind-developers. Thanks for feedback. > > I would consider it disturbing for myself to need to subscribe on > valgrind-developers before the release and unsubscribe then, but > it's Cyril who is going to send the announcement mail anyway. You don't really need to subscribe tp valgrind-developers. If you aren't subscribed then the message goes to moderation and will normally be approved within a day (and the sender is normally added to the approved list). I think this is similar to the ltp list (I am not subscribed, but seem able to post anyway). Cheers, Mark |
From: Petr V. <pv...@su...> - 2025-05-16 12:09:57
|
Hi Mark, Cyril, all, > Hi, > On Fri, May 16, 2025 at 10:45:50AM +0200, Cyril Hrubis wrote: > > > valgrind-developers has heavy traffic, use valgrind-announce. > > Was this requested by valgrind devs? I suppose this is fine as long as > > we get their ack. > I think valgrind-developers is a better place for announcing new > versions of LTP. We can then update our own valgrind testing. > valgrind-announce is really for users when valgrind itself has a new > release. Sure, let's keep valgrind-developers. Thanks for feedback. I would consider it disturbing for myself to need to subscribe on valgrind-developers before the release and unsubscribe then, but it's Cyril who is going to send the announcement mail anyway. Kind regards, Petr > Cheers, > Mark |
From: Mark W. <ma...@kl...> - 2025-05-16 09:41:27
|
Hi Paul, On Fri, May 16, 2025 at 08:37:38AM +0200, Paul Floyd via Valgrind-developers wrote: > > On 5/10/25 02:13, Mark Wielaard wrote: > >Hi developers and packagers, > ... > >Please let me know if you find other fixes on trunk you believe really > >should be backported to the 3.25 branch/3.25.1 release. > > I've been rather neglecting the FreeBSD development branch of late. > Last night I took a look and there are > > - 2 new syscalls (done) > > - about 12 regression failures (not all different causes) varying > from minor (expected needs a bit of filtering) to annoying > (gdbserver testcases hanging). > > When I've dealt with as many of those as possible then a 3.25.1 > release would be good for FreeBSD. OK, on irc Sam, the gentoo valgrind maintainer, convinced me that doing a minor release from that branch would be a good thing because distros don't always follow the stable branch. And we have some regression fixes. So lets do a release early next week? How many commit are there for freebsd to cherry-pick? If you give me a list I can do them for you. Thanks, Mark |
From: Mark W. <ma...@kl...> - 2025-05-16 09:31:37
|
Hi, On Fri, May 16, 2025 at 10:45:50AM +0200, Cyril Hrubis wrote: > > valgrind-developers has heavy traffic, use valgrind-announce. > > Was this requested by valgrind devs? I suppose this is fine as long as > we get their ack. I think valgrind-developers is a better place for announcing new versions of LTP. We can then update our own valgrind testing. valgrind-announce is really for users when valgrind itself has a new release. Cheers, Mark |
From: Cyril H. <ch...@su...> - 2025-05-16 09:07:52
|
Hi! > + fprintf(stderr, "LTP_REPRODUCIBLE_OUTPUT When set to 1 or y discards the actual content of the messages printed by the test\n"); > > nit: "When set to 1 or y" is slightly verbose to me. Maybe just "1/y discards > the actual content of the messages printed by the test" ? I've shortened it to "Values 1 or y discard ..." and pushed the patch. -- Cyril Hrubis ch...@su... |
From: Cyril H. <ch...@su...> - 2025-05-16 08:45:24
|
Hi! > valgrind-developers has heavy traffic, use valgrind-announce. Was this requested by valgrind devs? I suppose this is fine as long as we get their ack. -- Cyril Hrubis ch...@su... |
From: Petr V. <pv...@su...> - 2025-05-16 07:51:29
|
valgrind-developers has heavy traffic, use valgrind-announce. Fixes: 93039e4384 ("doc: ltp_release_procedure: Add valgrind-developers ML") Signed-off-by: Petr Vorel <pv...@su...> --- doc/maintainers/ltp_release_procedure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/maintainers/ltp_release_procedure.rst b/doc/maintainers/ltp_release_procedure.rst index 6dbafa4f81..24ea864b03 100644 --- a/doc/maintainers/ltp_release_procedure.rst +++ b/doc/maintainers/ltp_release_procedure.rst @@ -157,7 +157,7 @@ The announcement is sent to: * ltp at lists.linux.it (requires a subscription) * linux-kernel at vger.kernel.org * libc-alpha at sourceware.org (requires a subscription) -* valgrind-developers at lists.sourceforge.net (requires a subscription) +* valgrind-announce at lists.sourceforge.net (requires a subscription) CCed to: -- 2.49.0 |
From: Paul F. <pj...@wa...> - 2025-05-16 06:37:47
|
On 5/10/25 02:13, Mark Wielaard wrote: > Hi developers and packagers, ... > Please let me know if you find other fixes on trunk you believe really > should be backported to the 3.25 branch/3.25.1 release. Hi Mark I've been rather neglecting the FreeBSD development branch of late. Last night I took a look and there are - 2 new syscalls (done) - about 12 regression failures (not all different causes) varying from minor (expected needs a bit of filtering) to annoying (gdbserver testcases hanging). When I've dealt with as many of those as possible then a 3.25.1 release would be good for FreeBSD. A+ Paul |
From: Paul F. <pa...@so...> - 2025-05-16 06:04:57
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c0f090af75d0235b2df775a89c238021021253f4 commit c0f090af75d0235b2df775a89c238021021253f4 Author: Paul Floyd <pj...@wa...> Date: Fri May 16 08:04:06 2025 +0200 FreeBSD regtest: update 32bit scalar Diff: --- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 6a532ae8e0..091a1770d6 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -5812,6 +5812,28 @@ Syscall param getrlimitusage(res) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +590: SYS_fchroot 1s, 0m +--------------------------------------------------------- +Syscall param fchroot(fd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +591: SYS_setcred 3s, 1m +--------------------------------------------------------- +Syscall param setcred(flags) contains uninitialised byte(s) + ... + +Syscall param setcred(wcred) contains uninitialised byte(s) + ... + +Syscall param setcred(size) contains uninitialised byte(s) + ... + +Syscall param setcred(wcred) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- |
From: Paul F. <pa...@so...> - 2025-05-16 05:58:55
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4f3f688a31ef1a213bd1a3a9e897e99cfe3950f6 commit 4f3f688a31ef1a213bd1a3a9e897e99cfe3950f6 Author: Paul Floyd <pj...@wa...> Date: Fri May 16 07:58:02 2025 +0200 Bug 504265 - FreeBSD: missing syscall wrappers for fchroot and setcred Diff: --- .gitignore | 2 ++ NEWS | 1 + configure.ac | 8 +++++++- coregrind/m_syswrap/priv_syswrap-freebsd.h | 3 +++ coregrind/m_syswrap/syswrap-freebsd.c | 25 +++++++++++++++++++++++ include/vki/vki-freebsd.h | 17 ++++++++++++++++ include/vki/vki-scnums-freebsd.h | 2 ++ memcheck/tests/freebsd/Makefile.am | 15 ++++++++++++++ memcheck/tests/freebsd/fchroot.cpp | 17 ++++++++++++++++ memcheck/tests/freebsd/fchroot.stderr.exp | 4 ++++ memcheck/tests/freebsd/fchroot.vgtest | 3 +++ memcheck/tests/freebsd/scalar.c | 32 +++++++++++++++++++++++++++++- memcheck/tests/freebsd/scalar.stderr.exp | 22 ++++++++++++++++++++ memcheck/tests/freebsd/setcred.cpp | 31 +++++++++++++++++++++++++++++ memcheck/tests/freebsd/setcred.stderr.exp | 30 ++++++++++++++++++++++++++++ memcheck/tests/freebsd/setcred.vgtest | 3 +++ 16 files changed, 213 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 962c97606b..be8c1a2687 100644 --- a/.gitignore +++ b/.gitignore @@ -1435,6 +1435,7 @@ /memcheck/tests/freebsd/eventfd2 /memcheck/tests/freebsd/extattr /memcheck/tests/freebsd/fbsd278566 +/memcheck/tests/freebsd/fchroot /memcheck/tests/freebsd/fexecve /memcheck/tests/freebsd/file_locking_wait6 /memcheck/tests/freebsd/get_set_context @@ -1461,6 +1462,7 @@ /memcheck/tests/freebsd/scalar_vfork /memcheck/tests/freebsd/sctp /memcheck/tests/freebsd/sctp2 +/memcheck/tests/freebsd/setcred /memcheck/tests/freebsd/setproctitle /memcheck/tests/freebsd/sigwait /memcheck/tests/freebsd/stat diff --git a/NEWS b/NEWS index a1a5fa24d3..bae5f6fcff 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 504101 Add a "vgstack" script 504177 FILE DESCRIPTORS banner shows when closing some inherited fds 501741 syscall cachestat not wrapped +504265 FreeBSD: missing syscall wrappers for fchroot and setcred To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/configure.ac b/configure.ac index 00cf62d47c..caa79c0147 100755 --- a/configure.ac +++ b/configure.ac @@ -5006,7 +5006,9 @@ AC_CHECK_FUNCS([ \ fdatasync \ getrandom \ getrlimitusage \ - timer_delete + timer_delete \ + fchroot \ + setcred ]) # AC_CHECK_LIB adds any library found to the variable LIBS, and links these @@ -5064,6 +5066,10 @@ AM_CONDITIONAL([HAVE_GETRLIMITUSAGE], [test x$ac_cv_func_getrlimitusage = xyes]) AM_CONDITIONAL([HAVE_TIMER_DELETE], [test x$ac_cv_func_timer_delete = xyes]) +AM_CONDITIONAL([HAVE_FCHROOT], + [test x$ac_cv_func_fchroot = xyes]) +AM_CONDITIONAL([HAVE_SETCRED], + [test x$ac_cv_func_setcred = xyes]) if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \ -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX \ diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h index 8b78c5d742..f8d404239d 100644 --- a/coregrind/m_syswrap/priv_syswrap-freebsd.h +++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h @@ -538,7 +538,10 @@ DECL_TEMPLATE(freebsd, sys_timerfd_settime) // 587 // __FreeBSD_version 1400507 and 1500012 DECL_TEMPLATE(freebsd, sys_kcmp) // 588 + DECL_TEMPLATE(freebsd, sys_getrlimitusage) // 589 +DECL_TEMPLATE(freebsd, sys_fchroot) // 590 +DECL_TEMPLATE(freebsd, sys_setcred) // 591 DECL_TEMPLATE(freebsd, sys_fake_sigreturn) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 41cd075619..8fcfe10904 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -7001,6 +7001,28 @@ POST(sys_getrlimitusage) } } +// SYS_fchroot 590 +// int fchroot(int fd); +PRE(sys_fchroot) +{ + PRINT("sys_fchroot(%ld)", ARG1); + PRE_REG_READ1(int, "fchroot", int, fd); + + /* Be strict. */ + if (!ML_(fd_allowed)(ARG1, "fchroot", tid, False)) + SET_STATUS_Failure(VKI_EBADF); +} + +// SYS_setcred +// int setcred(u_int flags, const struct setcred *wcred, size_t size); +PRE(sys_setcred) +{ + PRINT("sys_setcred(%ld, %#" FMT_REGWORD "x, %lu)", ARG1, ARG2, ARG3); + PRE_REG_READ3(int, "setcred", u_int, flags, const struct setcred*, wcred, size_t, size); + PRE_MEM_READ("setcred(wcred)", ARG2, sizeof(struct vki_setcred)); +} + + #undef PRE #undef POST @@ -7694,6 +7716,9 @@ const SyscallTableEntry ML_(syscall_table)[] = { BSDX_(__NR_kcmp, sys_kcmp), // 588 BSDXY(__NR_getrlimitusage, sys_getrlimitusage), // 589 + BSDX_(__NR_fchroot, sys_fchroot), // 590 + BSDX_(__NR_setcred, sys_setcred), // 591 + BSDX_(__NR_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn }; diff --git a/include/vki/vki-freebsd.h b/include/vki/vki-freebsd.h index b870025f0f..2539979995 100644 --- a/include/vki/vki-freebsd.h +++ b/include/vki/vki-freebsd.h @@ -3257,6 +3257,23 @@ union vki_ccb { #define VKI_CAMIOCOMMAND _VKI_IOWR(VKI_CAM_VERSION, 2, union vki_ccb) +//---------------------------------------------------------------------- +// From cam/scsi/scsi_all.h +//---------------------------------------------------------------------- +struct vki_setcred { + vki_uid_t sc_uid; /* effective user id */ + vki_uid_t sc_ruid; /* real user id */ + vki_uid_t sc_svuid; /* saved user id */ + vki_gid_t sc_gid; /* effective group id */ + vki_gid_t sc_rgid; /* real group id */ + vki_gid_t sc_svgid; /* saved group id */ + vki_u_int sc_pad; /* see 32-bit compat structure */ + vki_u_int sc_supp_groups_nb; /* number of supplementary groups */ + vki_gid_t *sc_supp_groups; /* supplementary groups */ + struct vki_mac *sc_label; /* MAC label */ +}; + + /*--------------------------------------------------------------------*/ /*--- end ---*/ diff --git a/include/vki/vki-scnums-freebsd.h b/include/vki/vki-scnums-freebsd.h index 098b722f48..a92abb9a15 100644 --- a/include/vki/vki-scnums-freebsd.h +++ b/include/vki/vki-scnums-freebsd.h @@ -627,6 +627,8 @@ #define __NR_kcmp 588 #define __NR_getrlimitusage 589 +#define __NR_fchroot 590 +#define __NR_setcred 591 #define __NR_fake_sigreturn 1000 diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index b362d6148a..091d056785 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -53,6 +53,8 @@ EXTRA_DIST = \ extattr.stderr.exp \ fbsd278566.vgtest \ fbsd278566.stderr.exp \ + fchroot.vgtest \ + fchroot.stderr.exp \ fexecve.vgtest \ fexecve.stderr.exp \ file_locking_wait6.vgtest \ @@ -109,6 +111,8 @@ EXTRA_DIST = \ sctp2.vgtest \ sctp2.stderr.exp \ sctp2.stdout.exp \ + setcred.vgtest \ + setcred.stderr.exp \ setproctitle.vgtest \ setproctitle.stderr.exp \ setproctitle.stdout.exp \ @@ -176,6 +180,11 @@ if HAVE_AIO_READV check_PROGRAMS += aiov endif +if HAVE_FCHROOT +check_PROGRAMS += fchroot +fchroot_SOURCES = fchroot.cpp +endif + if HAVE_GETRLIMITUSAGE check_PROGRAMS += getrlimitusage endif @@ -203,6 +212,12 @@ if FREEBSD_KQUEUEX_SYSCALL check_PROGRAMS += kqueuex endif +if HAVE_SETCRED +check_PROGRAMS += setcred +setcred_SOURCES = setcred.cpp +setcred_CXXFLAGS = ${AM_CXXFLAGS} @FLAG_W_NO_UNINITIALIZED@ +endif + if FREEBSD_TIMERFD_SYSCALL check_PROGRAMS += timerfd timerfd_LDFLAGS = -lm diff --git a/memcheck/tests/freebsd/fchroot.cpp b/memcheck/tests/freebsd/fchroot.cpp new file mode 100644 index 0000000000..84b7ee7ad5 --- /dev/null +++ b/memcheck/tests/freebsd/fchroot.cpp @@ -0,0 +1,17 @@ +#include <unistd.h> +#include <fcntl.h> + +int main() +{ + int fd1; + int* fd2{new int}; + + fd1 = open("..", O_DIRECTORY | O_RDONLY); + // will fail unless run as root + fchroot(fd1); + + fchroot(*fd2); + + delete fd2; +} + diff --git a/memcheck/tests/freebsd/fchroot.stderr.exp b/memcheck/tests/freebsd/fchroot.stderr.exp new file mode 100644 index 0000000000..938d3474f9 --- /dev/null +++ b/memcheck/tests/freebsd/fchroot.stderr.exp @@ -0,0 +1,4 @@ +Syscall param fchroot(fd) contains uninitialised byte(s) + at 0x........: fchroot (in /...libc...) + by 0x........: main (fchroot.cpp:13) + diff --git a/memcheck/tests/freebsd/fchroot.vgtest b/memcheck/tests/freebsd/fchroot.vgtest new file mode 100644 index 0000000000..a07103eed1 --- /dev/null +++ b/memcheck/tests/freebsd/fchroot.vgtest @@ -0,0 +1,3 @@ +prereq: test -e ./fchroot +prog: fchroot +vgopts: -q diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index 65348c232a..eddde2f428 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -2450,7 +2450,37 @@ int main(void) FAKE_SY(" ...\n"); FAKE_SY(" Address 0x........ is not stack'd, malloc'd or (recently) free'd\n"); FAKE_SY("\n"); -#endif +#endif + +#if defined(SYS_fchroot) + GO(SYS_fchroot, "1s, 0m"); + SY(SYS_fchroot, x0+1000); +#else + FAKE_GO("590: SYS_fchroot 1s, 0m"); + FAKE_SY("Syscall param fchroot(fd) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); +#endif + +#if defined(SYS_setcred) + GO(SYS_setcred, "3s, 1m"); + SY(SYS_setcred, x0+100, x0+3, x0+50); +#else + FAKE_GO("591: SYS_setcred 3s, 1m"); + FAKE_SY("Syscall param setcred(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param setcred(wcred) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param setcred(size) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param setcred(wcred) points to unaddressable byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY(" Address 0x........ is not stack'd, malloc'd or (recently) free'd\n"); + FAKE_SY("\n"); +#endif /* SYS_exit 1 */ GO(SYS_exit, "1s 0m"); diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 0e47fe1aac..59ed185242 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -5740,6 +5740,28 @@ Syscall param getrlimitusage(res) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +590: SYS_fchroot 1s, 0m +--------------------------------------------------------- +Syscall param fchroot(fd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +591: SYS_setcred 3s, 1m +--------------------------------------------------------- +Syscall param setcred(flags) contains uninitialised byte(s) + ... + +Syscall param setcred(wcred) contains uninitialised byte(s) + ... + +Syscall param setcred(size) contains uninitialised byte(s) + ... + +Syscall param setcred(wcred) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/setcred.cpp b/memcheck/tests/freebsd/setcred.cpp new file mode 100644 index 0000000000..7553599dfc --- /dev/null +++ b/memcheck/tests/freebsd/setcred.cpp @@ -0,0 +1,31 @@ +#include <sys/ucred.h> +#include <cstring> + +int main() +{ + struct setcred cred1; + struct setcred* cred2; + int flags1{0}; + int flags2; + size_t size1{sizeof(cred1)}; + size_t size2; + + std::memset(&cred1, 250, sizeof(cred1)); + + // needs to be root to work correctly + setcred(flags1, &cred1, size1); + + // not accessible + setcred(flags1, nullptr, size1); + + // uninit + setcred(flags2, cred2, size2); + + cred2 = new struct setcred; + + // uninit memory + setcred(flags1, cred2, size1); + + delete cred2; +} + diff --git a/memcheck/tests/freebsd/setcred.stderr.exp b/memcheck/tests/freebsd/setcred.stderr.exp new file mode 100644 index 0000000000..1d9cecf8e3 --- /dev/null +++ b/memcheck/tests/freebsd/setcred.stderr.exp @@ -0,0 +1,30 @@ +Syscall param setcred(wcred) points to unaddressable byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:19) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param setcred(flags) contains uninitialised byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:22) + +Syscall param setcred(wcred) contains uninitialised byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:22) + +Syscall param setcred(size) contains uninitialised byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:22) + +Syscall param setcred(wcred) points to uninitialised byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:22) + Address 0x........ is on thread 1's stack + in frame #2, created by __libc_start1 (???:) + +Syscall param setcred(wcred) points to uninitialised byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:27) + Address 0x........ is 0 bytes inside a block of size 48 alloc'd + at 0x........: ...operator new... (vg_replace_malloc.c:...) + by 0x........: main (setcred.cpp:24) + diff --git a/memcheck/tests/freebsd/setcred.vgtest b/memcheck/tests/freebsd/setcred.vgtest new file mode 100644 index 0000000000..8c4f4d36f0 --- /dev/null +++ b/memcheck/tests/freebsd/setcred.vgtest @@ -0,0 +1,3 @@ +prereq: test -e ./setcred +prog: setcred +vgopts: -q |
From: Florian K. <fk...@so...> - 2025-05-15 21:47:04
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b429488ff5aa59bc684d48755bf6e6d866262cd7 commit b429488ff5aa59bc684d48755bf6e6d866262cd7 Author: Florian Krohm <fl...@ei...> Date: Thu May 15 21:42:19 2025 +0000 Compile code that gets linked with libc by adding -fhosted. The use of -fno-builtin interfers with -Wformat: no format warnings will be given when both options are present. Because -fno-builtin means: when you encounter a function that has the same name as a built-in function, forget everything you know about that function. That includes functions attributes. And without __attribute__((format...)) there will be no -Wformat warnings. The fix is to append -fhosted when compiling something that gets linked with libc. As command line options are processed left to right adding -fhosted at the end overrides any earlier -fno-builtin option. Fix compiler warnings. Add some ugly ifdeffery to drd/drd_intercepts.c. I could not figure out how to rewrite the offensive printf to avoid testcase breakage. Diff: --- auxprogs/Makefile.am | 8 ++++---- auxprogs/valgrind-di-server.c | 2 +- auxprogs/valgrind-listener.c | 2 +- coregrind/Makefile.am | 4 ++-- coregrind/vgdb-invoker-ptrace.c | 6 +++--- coregrind/vgdb.c | 4 ++-- drd/drd_pthread_intercepts.c | 7 +++++++ helgrind/hg_intercepts.c | 6 +++--- memcheck/tests/vbit-test/Makefile.am | 4 ++-- memcheck/tests/vbit-test/irops.c | 2 +- none/tests/s390x/disasm-test/Makefile.am | 2 +- none/tests/s390x/disasm-test/opcode.c | 2 +- 12 files changed, 28 insertions(+), 21 deletions(-) diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am index 3a2d0d1762..4a10fb1cf8 100644 --- a/auxprogs/Makefile.am +++ b/auxprogs/Makefile.am @@ -33,7 +33,7 @@ bin_PROGRAMS = valgrind-listener valgrind-di-server valgrind_listener_SOURCES = valgrind-listener.c valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind -valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) +valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fhosted valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI) valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI) if VGCONF_PLATVARIANT_IS_ANDROID @@ -52,7 +52,7 @@ endif valgrind_di_server_SOURCES = valgrind-di-server.c valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind -valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) +valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fhosted valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI) valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI) if VGCONF_PLATVARIANT_IS_ANDROID @@ -87,7 +87,7 @@ endif getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fhosted getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI) getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ if HAVE_DLINFO_RTLD_DI_TLS_MODID @@ -104,7 +104,7 @@ endif if VGCONF_HAVE_PLATFORM_SEC getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = getoff.c getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) +getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -fhosted getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_SEC) getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_SEC) if HAVE_DLINFO_RTLD_DI_TLS_MODID diff --git a/auxprogs/valgrind-di-server.c b/auxprogs/valgrind-di-server.c index 1b6506e3da..a7607c0696 100644 --- a/auxprogs/valgrind-di-server.c +++ b/auxprogs/valgrind-di-server.c @@ -1172,7 +1172,7 @@ int main (int argc, char** argv) break; if (i >= M_CONNECTIONS) { - fprintf(stderr, "\n\nMore than %d concurrent connections.\n" + fprintf(stderr, "\n\nMore than %u concurrent connections.\n" "Restart the server giving --max-connect=INT on the\n" "commandline to increase the limit.\n\n", M_CONNECTIONS); diff --git a/auxprogs/valgrind-listener.c b/auxprogs/valgrind-listener.c index 158f11c088..5607e138db 100644 --- a/auxprogs/valgrind-listener.c +++ b/auxprogs/valgrind-listener.c @@ -355,7 +355,7 @@ int main (int argc, char** argv) break; if (i >= M_CONNECTIONS) { - fprintf(stderr, "\n\nMore than %d concurrent connections.\n" + fprintf(stderr, "\n\nMore than %u concurrent connections.\n" "Restart the listener giving --max-connect=INT on the\n" "commandline to increase the limit.\n\n", M_CONNECTIONS); diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 784459569d..4ead1542b0 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -62,7 +62,7 @@ AR = ${LTO_AR} RANLIB = ${LTO_RANLIB} valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI) -valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) +valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI) valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ # If there is no secondary platform, and the platforms include x86-darwin, @@ -104,7 +104,7 @@ vgdb_SOURCES += vgdb-invoker-freebsd.c endif vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI) $(GDB_SCRIPTS_DIR) -vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) +vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI) vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ if VGCONF_PLATVARIANT_IS_ANDROID diff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c index 3a6a455d03..a6df5dc07d 100644 --- a/coregrind/vgdb-invoker-ptrace.c +++ b/coregrind/vgdb-invoker-ptrace.c @@ -271,10 +271,10 @@ Bool waitstopped (pid_t pid, int signal_expected, const char *msg) msg, signal_expected); p = waitpid(pid, &status, __WALL); DEBUG(1, "after waitpid pid %d p %d status 0x%x %s\n", pid, p, - status, status_image (status)); + (unsigned)status, status_image (status)); if (p != pid) { ERROR(errno, "%s waitpid pid %d in waitstopped %d status 0x%x %s\n", - msg, pid, p, status, status_image (status)); + msg, pid, p, (unsigned)status, status_image (status)); return False; } @@ -867,7 +867,7 @@ Bool invoker_invoke_gdbserver (pid_t pid) web search '[patch] Fix syscall restarts for amd64->i386 biarch' e.g. http://sourceware.org/ml/gdb-patches/2009-11/msg00592.html */ *(long *)&user_save.regs.rax = *(int*)&user_save.regs.rax; - DEBUG(1, "Sign extending %8.8lx to %8.8lx\n", + DEBUG(1, "Sign extending %8.8llx to %8.8llx\n", user_mod.regs.rax, user_save.regs.rax); } #elif defined(VGA_arm) diff --git a/coregrind/vgdb.c b/coregrind/vgdb.c index 409ceac5d6..dab425d680 100644 --- a/coregrind/vgdb.c +++ b/coregrind/vgdb.c @@ -732,7 +732,7 @@ getpkt(char *buf, int fromfd, int ackfd) break; TSFPRINTF(stderr, "Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s\n", - (c1 << 4) + c2, csum, buf); + (unsigned)((c1 << 4) + c2), (unsigned)csum, buf); ssize_t res = 0; while (res == 0) { res = write(ackfd, "-", 1); @@ -1080,7 +1080,7 @@ receive_packet_start: if (!(csum == (c1 << 4) + c2)) { TSFPRINTF(stderr, "Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s\n", - (c1 << 4) + c2, csum, buf); + (unsigned)((c1 << 4) + c2), (unsigned)csum, buf); if (!noackmode) if (!write_to_gdb ("-", 1)) return -1; diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c index bb92101931..73b802efce 100644 --- a/drd/drd_pthread_intercepts.c +++ b/drd/drd_pthread_intercepts.c @@ -1556,7 +1556,14 @@ sem_t* sem_open_intercept(const char *name, int oflag, mode_t mode, CALL_FN_W_WWWW(ret, fn, name, oflag, mode, value); // To do: figure out why gcc 9.2.1 miscompiles this function if the printf() // call below is left out. +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-zero-length" +#endif printf(""); +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ_DRD_POST_SEM_OPEN, ret != SEM_FAILED ? ret : 0, name, oflag, mode, value); diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index e639abca84..b1082cd4b9 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -3550,7 +3550,7 @@ PTH_FUNC(sem_t*, semZuopen, if (TRACE_SEM_FNS) { fprintf(stderr, "<< sem_open(\"%s\",%ld,%lx,%lu) ", - name,oflag,mode,value); + name,oflag,(unsigned long)mode,value); fflush(stderr); } @@ -3790,7 +3790,7 @@ static long QMutex_tryLock_WRK(void* self) void *, self, long, (ret & 0xFF) ? True : False); if (TRACE_QT4_FNS) { - fprintf(stderr, " :: Q::tryLock -> %lu >>\n", ret); + fprintf(stderr, " :: Q::tryLock -> %ld >>\n", ret); } return ret; @@ -3827,7 +3827,7 @@ static long QMutex_tryLock_int_WRK(void* self, long arg2) void *, self, long, (ret & 0xFF) ? True : False); if (TRACE_QT4_FNS) { - fprintf(stderr, " :: Q::tryLock(int) -> %lu >>\n", ret); + fprintf(stderr, " :: Q::tryLock(int) -> %ld >>\n", ret); } return ret; diff --git a/memcheck/tests/vbit-test/Makefile.am b/memcheck/tests/vbit-test/Makefile.am index ded4ab1747..d406da76bd 100644 --- a/memcheck/tests/vbit-test/Makefile.am +++ b/memcheck/tests/vbit-test/Makefile.am @@ -48,7 +48,7 @@ vbit_test_CPPFLAGS = $(AM_CPPFLAGS_PRI) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/memcheck \ -I$(top_srcdir)/VEX/pub -vbit_test_CFLAGS = $(AM_CFLAGS_PRI) +vbit_test_CFLAGS = $(AM_CFLAGS_PRI) -fhosted vbit_test_DEPENDENCIES = $(top_builddir)/VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a vbit_test_LDADD = $(top_builddir)/VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a vbit_test_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ @@ -67,7 +67,7 @@ vbit_test_sec_CPPFLAGS = $(AM_CPPFLAGS_SEC) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/memcheck \ -I$(top_srcdir)/VEX/pub -vbit_test_sec_CFLAGS = $(AM_CFLAGS_SEC) \ +vbit_test_sec_CFLAGS = $(AM_CFLAGS_SEC) -fhosted \ $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) vbit_test_sec_DEPENDENCIES = $(top_builddir)/VEX/libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a \ $(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@) diff --git a/memcheck/tests/vbit-test/irops.c b/memcheck/tests/vbit-test/irops.c index 4755ce41cc..33c78fef1a 100644 --- a/memcheck/tests/vbit-test/irops.c +++ b/memcheck/tests/vbit-test/irops.c @@ -1449,6 +1449,6 @@ get_irop(IROp op) } } - fprintf(stderr, "unknown opcode %d\n", op); + fprintf(stderr, "unknown opcode %u\n", (unsigned)op); exit(1); } diff --git a/none/tests/s390x/disasm-test/Makefile.am b/none/tests/s390x/disasm-test/Makefile.am index 61d4f31963..9d3ee3a291 100644 --- a/none/tests/s390x/disasm-test/Makefile.am +++ b/none/tests/s390x/disasm-test/Makefile.am @@ -29,7 +29,7 @@ disasm_test_SOURCES = $(SOURCES) disasm_test_CPPFLAGS = $(AM_CPPFLAGS_PRI) \ -I$(top_srcdir)/VEX/pub \ -I$(top_srcdir)/VEX/priv -disasm_test_CFLAGS = $(AM_CFLAGS_PRI) +disasm_test_CFLAGS = $(AM_CFLAGS_PRI) -fhosted disasm_test_DEPENDENCIES = $(top_builddir)/VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a disasm_test_LDADD = $(top_builddir)/VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a disasm_test_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ diff --git a/none/tests/s390x/disasm-test/opcode.c b/none/tests/s390x/disasm-test/opcode.c index 6acf25ec7b..ef06491334 100644 --- a/none/tests/s390x/disasm-test/opcode.c +++ b/none/tests/s390x/disasm-test/opcode.c @@ -1968,7 +1968,7 @@ parse_opcode(const char *spec) printf("opcode: |%s|\n", opc->name); for (unsigned i = 0; i < opc->num_opnds; ++i) { const opnd *d = opc->opnds + i; - printf("opnd %2d: %-8s type: %-5s", i, d->name, + printf("opnd %2u: %-8s type: %-5s", i, d->name, opnd_kind_as_string(d->kind)); if (d->kind != OPND_D12XB && d->kind != OPND_D12B && d->kind != OPND_D20XB && d->kind != OPND_D20B && |
From: Mark W. <ma...@so...> - 2025-05-15 19:18:17
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=41f0f95d9415faa5f76fcab92f45ca05957c4032 commit 41f0f95d9415faa5f76fcab92f45ca05957c4032 Author: Martin Cermak <mc...@re...> Date: Thu May 15 12:03:55 2025 +0200 Wrap linux specific cachestat syscall cachestat takes an fd, cstat_range and flags arguments and writes out page cache statistics via the cstat struct. Declare a sys_cachestat wrapper in priv_syswrap-linux.h and hook it for {amd64,arm,arm64,mips64,nanomips,ppc32,ppc64,riscv64,s390x,x86}-linux using LINXY with PRE/POST handlers in syswrap-linux.c. Define __NR_cachestat for amd64, arm, arm64, mips32, mips64, nanomips, ppc32, ppc64, riscv64, s390x, and x86. https://bugs.kde.org/show_bug.cgi?id=501741 Diff: --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 1 + coregrind/m_syswrap/syswrap-amd64-linux.c | 1 + coregrind/m_syswrap/syswrap-arm-linux.c | 1 + coregrind/m_syswrap/syswrap-arm64-linux.c | 1 + coregrind/m_syswrap/syswrap-linux.c | 20 ++++++++++++++++++++ coregrind/m_syswrap/syswrap-mips32-linux.c | 1 + coregrind/m_syswrap/syswrap-mips64-linux.c | 1 + coregrind/m_syswrap/syswrap-nanomips-linux.c | 1 + coregrind/m_syswrap/syswrap-ppc32-linux.c | 1 + coregrind/m_syswrap/syswrap-ppc64-linux.c | 1 + coregrind/m_syswrap/syswrap-riscv64-linux.c | 1 + coregrind/m_syswrap/syswrap-s390x-linux.c | 1 + coregrind/m_syswrap/syswrap-x86-linux.c | 1 + include/vki/vki-linux.h | 13 +++++++++++++ include/vki/vki-scnums-shared-linux.h | 1 + 16 files changed, 47 insertions(+) diff --git a/NEWS b/NEWS index 065f32fd5c..a1a5fa24d3 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 503914 mount syscall param filesystemtype may be NULL 504101 Add a "vgstack" script 504177 FILE DESCRIPTORS banner shows when closing some inherited fds +501741 syscall cachestat not wrapped To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index 4dad82dfbb..966eae5437 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -59,6 +59,7 @@ DECL_TEMPLATE(linux, sys_tee); DECL_TEMPLATE(linux, sys_vmsplice); DECL_TEMPLATE(linux, sys_readahead); DECL_TEMPLATE(linux, sys_move_pages); +DECL_TEMPLATE(linux, sys_cachestat); // clone is similar enough between linux variants to have a generic // version, but which will call an extern defined in syswrap-<platform>-linux.c diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 646a832408..c226831926 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -902,6 +902,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_memfd_secret, sys_memfd_secret), // 447 + LINXY(__NR_cachestat, sys_cachestat), // 451 LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index a12053dd07..05cd1e4b65 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -1073,6 +1073,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 LINX_(__NR_landlock_restrict_self, sys_landlock_restrict_self), // 446 + LINXY(__NR_cachestat, sys_cachestat), // 451 LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index c8bb486c4b..28cb3647c4 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -853,6 +853,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_memfd_secret, sys_memfd_secret), // 447 + LINXY(__NR_cachestat, sys_cachestat), // 451 LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index afd4a618b1..d4653d0273 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -6196,6 +6196,26 @@ PRE(sys_fchmodat) PRE_MEM_RASCIIZ( "fchmodat(path)", ARG2 ); } +PRE(sys_cachestat) +{ + PRINT("sys_cachestat ( %lu, %#lx, %#lx, %lu )", ARG1, ARG2, ARG3, ARG4); + PRE_REG_READ4(long, "cachestat", + unsigned long, fd, struct vki_cachestat_range *, cstat_range, + struct vki_cachestat*, cstat, unsigned long, flags); + if (!ML_(fd_allowed)(ARG1, "cachestat", tid, False)) + SET_STATUS_Failure( VKI_EBADF ); + const struct vki_cachestat_range *cstat_range = (struct vki_cachestat_range *)(Addr)ARG2; + PRE_MEM_READ("cachestat(cstat_range)", ARG2, sizeof(*cstat_range) ); + const struct vki_cachestat *cstat = (struct vki_cachestat *)(Addr)ARG3; + PRE_MEM_WRITE("cachestat(cstat)", ARG3, sizeof(*cstat) ); +} + +POST(sys_cachestat) +{ + vg_assert(SUCCESS); + POST_MEM_WRITE(ARG3, sizeof(struct vki_cachestat)); +} + PRE(sys_fchmodat2) { FUSE_COMPATIBLE_MAY_BLOCK(); diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index 3644a088e5..d16a9a4bc1 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -1180,6 +1180,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 LINX_(__NR_landlock_restrict_self, sys_landlock_restrict_self), // 446 + LINXY(__NR_cachestat, sys_cachestat), // 451 LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index ba73b68d8f..fe1f3db7f5 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -835,6 +835,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_landlock_create_ruleset, sys_landlock_create_ruleset), LINX_ (__NR_landlock_add_rule, sys_landlock_add_rule), LINX_ (__NR_landlock_restrict_self, sys_landlock_restrict_self), + LINXY (__NR_cachestat, sys_cachestat), LINX_ (__NR_fchmodat2, sys_fchmodat2), LINXY (__NR_userfaultfd, sys_userfaultfd), }; diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c index 728607317c..87153737d3 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -840,6 +840,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_landlock_create_ruleset,sys_landlock_create_ruleset), LINX_ (__NR_landlock_add_rule, sys_landlock_add_rule), LINX_ (__NR_landlock_restrict_self, sys_landlock_restrict_self), + LINXY (__NR_cachestat, sys_cachestat), LINX_ (__NR_fchmodat2, sys_fchmodat2), }; diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 089a9a59b0..bc180b8b1c 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -1079,6 +1079,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 LINX_(__NR_landlock_restrict_self, sys_landlock_restrict_self), // 446 + LINXY(__NR_cachestat, sys_cachestat), // 451 LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index 007fa6336c..6e97358e89 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1046,6 +1046,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 LINX_(__NR_landlock_restrict_self, sys_landlock_restrict_self), // 446 + LINXY (__NR_cachestat, sys_cachestat), // 451 LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/coregrind/m_syswrap/syswrap-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index ebf9c31053..7a1ff07518 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -597,6 +597,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), /* 445 */ LINX_(__NR_landlock_restrict_self, sys_landlock_restrict_self), /* 446 */ LINXY(__NR_memfd_secret, sys_memfd_secret), /* 447 */ + LINXY(__NR_cachestat, sys_cachestat), /* 451 */ LINX_(__NR_fchmodat2, sys_fchmodat2), /* 452 */ }; diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index 9191c2093d..f4ceae4613 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -888,6 +888,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_memfd_secret, sys_memfd_secret), // 447 + LINXY (__NR_cachestat, sys_cachestat), // 451 LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index d7f173cd91..662780588a 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1674,6 +1674,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_memfd_secret, sys_memfd_secret), // 447 + LINXY(__NR_cachestat, sys_cachestat), // 451 LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 }; diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 29e62ce863..0d2bed6dc6 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -5478,6 +5478,19 @@ struct vki_open_how { #define VKI_CLOSE_RANGE_UNSHARE (1U << 1) #define VKI_CLOSE_RANGE_CLOEXEC (1U << 2) +struct vki_cachestat_range { + __vki_u64 off; + __vki_u64 len; +}; + +struct vki_cachestat { + __vki_u64 nr_cache; + __vki_u64 nr_dirty; + __vki_u64 nr_writeback; + __vki_u64 nr_evicted; + __vki_u64 nr_recently_evicted; +}; + //---------------------------------------------------------------------- // From linux/magic.h //---------------------------------------------------------------------- diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h index 20346ca716..616f8052d3 100644 --- a/include/vki/vki-scnums-shared-linux.h +++ b/include/vki/vki-scnums-shared-linux.h @@ -54,6 +54,7 @@ #define __NR_memfd_secret 447 +#define __NR_cachestat 451 #define __NR_fchmodat2 452 #endif |
From: Petr V. <pv...@su...> - 2025-05-15 13:58:52
|
Hi Cyril, + fprintf(stderr, "LTP_REPRODUCIBLE_OUTPUT When set to 1 or y discards the actual content of the messages printed by the test\n"); nit: "When set to 1 or y" is slightly verbose to me. Maybe just "1/y discards the actual content of the messages printed by the test" ? But anyway that's very minor, therefore I kept the same approach when adding LTP_ENABLE_DEBUG in the next patch I'm going to send now. Kind regards, Petr |
From: Petr V. <pv...@su...> - 2025-05-15 12:44:36
|
Hi Cyril, > This commit adds an environment variable LTP_REPRODUCIBLE_OUTPUT that > when set to 1 or y skips printing parts of the test messages that may > contain data that differ on subsequent runs (e.g. pids). > With this you can run a test twice under a different conditions and > check if the test codeflow was identical by simply doing diff of the > outputs from the two runs. Thanks for fixing n and 0 and updating the docs. Tested-by: Petr Vorel <pv...@su...> Kind regards, Petr |
From: Cyril H. <ch...@su...> - 2025-05-15 10:33:51
|
Hi! > LTP_COLORIZE_OUTPUT allows more complicated setup (y/1 always, n/0: never), > but any value here enables the feature (e.g. LTP_COLORIZE_OUTPUT=0). > This would be nice to unify, but I'm ok to ignore it as it's before release. We also have LTP_ENABLE_DEBUG that has the same values so let's keep the API the same. I've send v3 with this and the docs changes. > > + > > assert_test_fn(); > > > TCID = tid = get_tid(argv); > > Adding docs (+ sort variables while at it). I've only added the docs for LTP_REPRODUCIBLE_OUTPUT in v3, the sorting should go in a separate patch. We also miss at least TST_ENABLE_DEBUG in the output of -h switch as well. -- Cyril Hrubis ch...@su... |
From: Cyril H. <ch...@su...> - 2025-05-15 10:31:20
|
This commit adds an environment variable LTP_REPRODUCIBLE_OUTPUT that when set to 1 or y skips printing parts of the test messages that may contain data that differ on subsequent runs (e.g. pids). With this you can run a test twice under a different conditions and check if the test codeflow was identical by simply doing diff of the outputs from the two runs. Signed-off-by: Cyril Hrubis <ch...@su...> Suggested-by: Martin Doucha <md...@su...> Reviewed-by: Martin Doucha <md...@su...> Reviewed-by: Avinesh Kumar <ak...@su...> Reviewed-by: Petr Vorel <pv...@su...> CC: val...@li... --- doc/users/setup_tests.rst | 4 ++++ lib/tst_test.c | 33 ++++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/doc/users/setup_tests.rst b/doc/users/setup_tests.rst index 2766ed719..2cce85fdf 100644 --- a/doc/users/setup_tests.rst +++ b/doc/users/setup_tests.rst @@ -42,6 +42,10 @@ users. - Path to the block device to be used. C Language: ``.needs_device = 1``. Shell language: ``TST_NEEDS_DEVICE=1``. + * - LTP_REPRODUCIBLE_OUTPUT + - When set to ``1`` or ``y`` discards the actual content of the messages + printed by the test (suitable for a reproducible output). + * - LTP_SINGLE_FS_TYPE - Testing only - specifies filesystem instead all supported (for tests with ``.all_filesystems``). diff --git a/lib/tst_test.c b/lib/tst_test.c index 923ecf7be..297c376da 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -63,6 +63,7 @@ static int mntpoint_mounted; static int ovl_mounted; static struct timespec tst_start_time; /* valid only for test pid */ static int tdebug; +static int reproducible_output; struct results { int passed; @@ -316,6 +317,9 @@ static void print_result(const char *file, const int lineno, int ttype, str += ret; size -= ret; + if (reproducible_output) + goto print; + ssize = size - 2; ret = vsnprintf(str, size, fmt, va); str += MIN(ret, ssize); @@ -333,6 +337,7 @@ static void print_result(const char *file, const int lineno, int ttype, "Next message is too long and truncated:"); } +print: snprintf(str, size, "\n"); /* we might be called from signal handler, so use write() */ @@ -606,17 +611,18 @@ static void print_help(void) /* see doc/users/setup_tests.rst, which lists also shell API variables */ fprintf(stderr, "Environment Variables\n"); fprintf(stderr, "---------------------\n"); - fprintf(stderr, "KCONFIG_PATH Specify kernel config file\n"); - fprintf(stderr, "KCONFIG_SKIP_CHECK Skip kernel config check if variable set (not set by default)\n"); - fprintf(stderr, "LTPROOT Prefix for installed LTP (default: /opt/ltp)\n"); - fprintf(stderr, "LTP_COLORIZE_OUTPUT Force colorized output behaviour (y/1 always, n/0: never)\n"); - fprintf(stderr, "LTP_DEV Path to the block device to be used (for .needs_device)\n"); - fprintf(stderr, "LTP_DEV_FS_TYPE Filesystem used for testing (default: %s)\n", DEFAULT_FS_TYPE); - fprintf(stderr, "LTP_SINGLE_FS_TYPE Testing only - specifies filesystem instead all supported (for .all_filesystems)\n"); - fprintf(stderr, "LTP_TIMEOUT_MUL Timeout multiplier (must be a number >=1)\n"); - fprintf(stderr, "LTP_RUNTIME_MUL Runtime multiplier (must be a number >=1)\n"); - fprintf(stderr, "LTP_VIRT_OVERRIDE Overrides virtual machine detection (values: \"\"|kvm|microsoft|xen|zvm)\n"); - fprintf(stderr, "TMPDIR Base directory for template directory (for .needs_tmpdir, default: %s)\n", TEMPDIR); + fprintf(stderr, "KCONFIG_PATH Specify kernel config file\n"); + fprintf(stderr, "KCONFIG_SKIP_CHECK Skip kernel config check if variable set (not set by default)\n"); + fprintf(stderr, "LTPROOT Prefix for installed LTP (default: /opt/ltp)\n"); + fprintf(stderr, "LTP_COLORIZE_OUTPUT Force colorized output behaviour (y/1 always, n/0: never)\n"); + fprintf(stderr, "LTP_DEV Path to the block device to be used (for .needs_device)\n"); + fprintf(stderr, "LTP_DEV_FS_TYPE Filesystem used for testing (default: %s)\n", DEFAULT_FS_TYPE); + fprintf(stderr, "LTP_REPRODUCIBLE_OUTPUT When set to 1 or y discards the actual content of the messages printed by the test\n"); + fprintf(stderr, "LTP_SINGLE_FS_TYPE Testing only - specifies filesystem instead all supported (for .all_filesystems)\n"); + fprintf(stderr, "LTP_TIMEOUT_MUL Timeout multiplier (must be a number >=1)\n"); + fprintf(stderr, "LTP_RUNTIME_MUL Runtime multiplier (must be a number >=1)\n"); + fprintf(stderr, "LTP_VIRT_OVERRIDE Overrides virtual machine detection (values: \"\"|kvm|microsoft|xen|zvm)\n"); + fprintf(stderr, "TMPDIR Base directory for template directory (for .needs_tmpdir, default: %s)\n", TEMPDIR); fprintf(stderr, "\n"); fprintf(stderr, "Timeout and runtime\n"); @@ -1298,6 +1304,7 @@ static const char *default_fs_type(void) static void do_setup(int argc, char *argv[]) { char *tdebug_env = getenv("LTP_ENABLE_DEBUG"); + char *reproducible_env = getenv("LTP_REPRODUCIBLE_OUTPUT"); if (!tst_test) tst_brk(TBROK, "No tests to run"); @@ -1316,6 +1323,10 @@ static void do_setup(int argc, char *argv[]) if (tst_test->supported_archs && !tst_is_on_arch(tst_test->supported_archs)) tst_brk(TCONF, "This arch '%s' is not supported for test!", tst_arch.name); + if (reproducible_env && + (!strcmp(reproducible_env, "1") || !strcmp(reproducible_env, "y"))) + reproducible_output = 1; + assert_test_fn(); TCID = tid = get_tid(argv); -- 2.49.0 |
From: Cyril H. <ch...@su...> - 2025-05-15 09:07:59
|
Hi! Applied, thanks. -- Cyril Hrubis ch...@su... |
From: Li W. <li...@re...> - 2025-05-15 07:42:11
|
Reviewed-by: Li Wang <li...@re...> -- Regards, Li Wang |