CVS commit: src/share/wscons/keymaps
Module Name:src Committed By: gson Date: Thu May 16 14:11:42 UTC 2024 Modified Files: src/share/wscons/keymaps: pckbd.sv.svascii Log Message: Fix typo in comment To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/wscons/keymaps/pckbd.sv.svascii Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/wscons/keymaps
Module Name:src Committed By: gson Date: Thu May 16 14:11:42 UTC 2024 Modified Files: src/share/wscons/keymaps: pckbd.sv.svascii Log Message: Fix typo in comment To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/wscons/keymaps/pckbd.sv.svascii Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/wscons/keymaps/pckbd.sv.svascii diff -u src/share/wscons/keymaps/pckbd.sv.svascii:1.1 src/share/wscons/keymaps/pckbd.sv.svascii:1.2 --- src/share/wscons/keymaps/pckbd.sv.svascii:1.1 Wed May 2 15:08:35 2001 +++ src/share/wscons/keymaps/pckbd.sv.svascii Thu May 16 14:11:42 2024 @@ -1,7 +1,7 @@ -# $NetBSD: pckbd.sv.svascii,v 1.1 2001/05/02 15:08:35 drochner Exp $ +# $NetBSD: pckbd.sv.svascii,v 1.2 2024/05/16 14:11:42 gson Exp $ # # This is an overlay to the swedish keymap which maps -# the natinal characters to their ASCII counterparts. +# the national characters to their ASCII counterparts. # From Michael Eriksson per PR kern/8456. keycode 5 = 4 dollar currency
CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: gson Date: Wed May 1 11:40:25 UTC 2024 Modified Files: src/tests/lib/libc/stdio: t_intr.sh Log Message: Increase the estimate of disk space required for the test, as the old estimate recently proved too optimistic on the amd64 testbed on b4. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/stdio/t_intr.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdio/t_intr.sh diff -u src/tests/lib/libc/stdio/t_intr.sh:1.6 src/tests/lib/libc/stdio/t_intr.sh:1.7 --- src/tests/lib/libc/stdio/t_intr.sh:1.6 Sun Oct 31 11:36:26 2021 +++ src/tests/lib/libc/stdio/t_intr.sh Wed May 1 11:40:25 2024 @@ -1,4 +1,4 @@ -# $NetBSD: t_intr.sh,v 1.6 2021/10/31 11:36:26 gson Exp $ +# $NetBSD: t_intr.sh,v 1.7 2024/05/01 11:40:25 gson Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,7 +37,10 @@ TMOUT=20 h_test() { local avail=$( df -m . | awk '{if (int($4) > 0) print $4}' ) - local need=$(( 2 * $MAX * 8 / 100 )) + # The test data are stored in triplicate: numbers.in, numbers.out, + # and a temporary "stdout" file created by ATF. Each line consists + # of up to 7 digits and a newline for a total of 8 bytes. + local need=$(( 3 * $MAX * 8 / 100 )) if [ $avail -lt $need ]; then atf_skip "not enough free space in working directory" fi
CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: gson Date: Wed May 1 11:40:25 UTC 2024 Modified Files: src/tests/lib/libc/stdio: t_intr.sh Log Message: Increase the estimate of disk space required for the test, as the old estimate recently proved too optimistic on the amd64 testbed on b4. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/stdio/t_intr.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Fri Apr 12 07:16:50 UTC 2024 Modified Files: src/tests/lib/libc/sys: t_getrusage.c Log Message: Require at least 64 MB RAM to run the getrusage_maxrss test case as it allocates 40 MB and we should leave some for the system, too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/t_getrusage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_getrusage.c diff -u src/tests/lib/libc/sys/t_getrusage.c:1.8 src/tests/lib/libc/sys/t_getrusage.c:1.9 --- src/tests/lib/libc/sys/t_getrusage.c:1.8 Wed May 9 08:45:03 2018 +++ src/tests/lib/libc/sys/t_getrusage.c Fri Apr 12 07:16:50 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_getrusage.c,v 1.8 2018/05/09 08:45:03 mrg Exp $ */ +/* $NetBSD: t_getrusage.c,v 1.9 2024/04/12 07:16:50 gson Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_getrusage.c,v 1.8 2018/05/09 08:45:03 mrg Exp $"); +__RCSID("$NetBSD: t_getrusage.c,v 1.9 2024/04/12 07:16:50 gson Exp $"); #include #include @@ -126,6 +126,7 @@ ATF_TC(getrusage_maxrss); ATF_TC_HEAD(getrusage_maxrss, tc) { atf_tc_set_md_var(tc, "descr", "Test maxrss growing with getrusage(2)"); + atf_tc_set_md_var(tc, "require.memory", "64M"); } ATF_TC_BODY(getrusage_maxrss, tc)
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Fri Apr 12 07:16:50 UTC 2024 Modified Files: src/tests/lib/libc/sys: t_getrusage.c Log Message: Require at least 64 MB RAM to run the getrusage_maxrss test case as it allocates 40 MB and we should leave some for the system, too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/t_getrusage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/audio/common
Module Name:src Committed By: gson Date: Tue Feb 27 21:05:34 UTC 2024 Modified Files: src/usr.bin/audio/common: audio.c decode.c sun.c wav.c Log Message: Clean up lines containing only tabs. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/audio/common/audio.c cvs rdiff -u -r1.1 -r1.2 src/usr.bin/audio/common/decode.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/audio/common/sun.c cvs rdiff -u -r1.17 -r1.18 src/usr.bin/audio/common/wav.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/common/audio.c diff -u src/usr.bin/audio/common/audio.c:1.26 src/usr.bin/audio/common/audio.c:1.27 --- src/usr.bin/audio/common/audio.c:1.26 Sat Nov 9 12:46:44 2019 +++ src/usr.bin/audio/common/audio.c Tue Feb 27 21:05:34 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.26 2019/11/09 12:46:44 mrg Exp $ */ +/* $NetBSD: audio.c,v 1.27 2024/02/27 21:05:34 gson Exp $ */ /* * Copyright (c) 1999, 2013, 2015, 2019 Matthew R. Green @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: audio.c,v 1.26 2019/11/09 12:46:44 mrg Exp $"); +__RCSID("$NetBSD: audio.c,v 1.27 2024/02/27 21:05:34 gson Exp $"); #endif @@ -205,7 +205,7 @@ write_header(struct track_info *ti) veclen = 0; tlen = 0; - + if (hdrlen != 0) { iv[veclen].iov_base = hdr; iv[veclen].iov_len = hdrlen; Index: src/usr.bin/audio/common/decode.c diff -u src/usr.bin/audio/common/decode.c:1.1 src/usr.bin/audio/common/decode.c:1.2 --- src/usr.bin/audio/common/decode.c:1.1 Sun Jun 21 06:06:01 2015 +++ src/usr.bin/audio/common/decode.c Tue Feb 27 21:05:34 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: decode.c,v 1.1 2015/06/21 06:06:01 mrg Exp $ */ +/* $NetBSD: decode.c,v 1.2 2024/02/27 21:05:34 gson Exp $ */ /* * Copyright (c) 1999 Matthew R. Green @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: decode.c,v 1.1 2015/06/21 06:06:01 mrg Exp $"); +__RCSID("$NetBSD: decode.c,v 1.2 2024/02/27 21:05:34 gson Exp $"); #endif #include @@ -85,7 +85,7 @@ decode_time(const char *arg, struct time tvp->tv_sec = tvp->tv_usec = 0; s = copy; - + /* handle [hh:]mm:ss.dd */ if ((colon = strchr(s, ':')) != NULL) { *colon++ = '\0'; Index: src/usr.bin/audio/common/sun.c diff -u src/usr.bin/audio/common/sun.c:1.10 src/usr.bin/audio/common/sun.c:1.11 --- src/usr.bin/audio/common/sun.c:1.10 Sat Nov 9 12:46:44 2019 +++ src/usr.bin/audio/common/sun.c Tue Feb 27 21:05:34 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sun.c,v 1.10 2019/11/09 12:46:44 mrg Exp $ */ +/* $NetBSD: sun.c,v 1.11 2024/02/27 21:05:34 gson Exp $ */ /* * Copyright (c) 2002, 2013, 2015 Matthew R. Green @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: sun.c,v 1.10 2019/11/09 12:46:44 mrg Exp $"); +__RCSID("$NetBSD: sun.c,v 1.11 2024/02/27 21:05:34 gson Exp $"); #endif @@ -149,7 +149,7 @@ sun_prepare_header(struct track_info *ti break; #endif } - + /* if we can't express this as a Sun header, don't write any */ if (audio_encoding_to_sun(ti->encoding, ti->precision, ) != 0) { if (!ti->qflag && !warned) { Index: src/usr.bin/audio/common/wav.c diff -u src/usr.bin/audio/common/wav.c:1.17 src/usr.bin/audio/common/wav.c:1.18 --- src/usr.bin/audio/common/wav.c:1.17 Tue Feb 27 20:40:29 2024 +++ src/usr.bin/audio/common/wav.c Tue Feb 27 21:05:34 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: wav.c,v 1.17 2024/02/27 20:40:29 gson Exp $ */ +/* $NetBSD: wav.c,v 1.18 2024/02/27 21:05:34 gson Exp $ */ /* * Copyright (c) 2002, 2009, 2013, 2015, 2019 Matthew R. Green @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: wav.c,v 1.17 2024/02/27 20:40:29 gson Exp $"); +__RCSID("$NetBSD: wav.c,v 1.18 2024/02/27 21:05:34 gson Exp $"); #endif @@ -374,7 +374,7 @@ wav_prepare_header(struct track_info *ti abps = (double)align*ti->sample_rate / (double)1 + 0.5; nsample = (datalen / ti->precision) / ti->sample_rate; - + /* * now we've calculated the info, write it out! */
CVS commit: src/usr.bin/audio/common
Module Name:src Committed By: gson Date: Tue Feb 27 21:05:34 UTC 2024 Modified Files: src/usr.bin/audio/common: audio.c decode.c sun.c wav.c Log Message: Clean up lines containing only tabs. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/audio/common/audio.c cvs rdiff -u -r1.1 -r1.2 src/usr.bin/audio/common/decode.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/audio/common/sun.c cvs rdiff -u -r1.17 -r1.18 src/usr.bin/audio/common/wav.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/audio
Module Name:src Committed By: gson Date: Tue Feb 27 20:40:30 UTC 2024 Modified Files: src/usr.bin/audio/common: wav.c src/usr.bin/audio/record: record.c Log Message: Clean up lines containing only spaces. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/audio/common/wav.c cvs rdiff -u -r1.57 -r1.58 src/usr.bin/audio/record/record.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/common/wav.c diff -u src/usr.bin/audio/common/wav.c:1.16 src/usr.bin/audio/common/wav.c:1.17 --- src/usr.bin/audio/common/wav.c:1.16 Sat Apr 15 12:39:44 2023 +++ src/usr.bin/audio/common/wav.c Tue Feb 27 20:40:29 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: wav.c,v 1.16 2023/04/15 12:39:44 mlelstv Exp $ */ +/* $NetBSD: wav.c,v 1.17 2024/02/27 20:40:29 gson Exp $ */ /* * Copyright (c) 2002, 2009, 2013, 2015, 2019 Matthew R. Green @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: wav.c,v 1.16 2023/04/15 12:39:44 mlelstv Exp $"); +__RCSID("$NetBSD: wav.c,v 1.17 2024/02/27 20:40:29 gson Exp $"); #endif @@ -108,7 +108,7 @@ audio_wav_parse_hdr(void *hdr, size_t sz strRIFF[4] = "RIFF", strWAVE[4] = "WAVE", strdata[4] = "data"; - + if (sz < 32) return (AUDIO_ENOENT); Index: src/usr.bin/audio/record/record.c diff -u src/usr.bin/audio/record/record.c:1.57 src/usr.bin/audio/record/record.c:1.58 --- src/usr.bin/audio/record/record.c:1.57 Sat Apr 15 12:39:44 2023 +++ src/usr.bin/audio/record/record.c Tue Feb 27 20:40:30 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: record.c,v 1.57 2023/04/15 12:39:44 mlelstv Exp $ */ +/* $NetBSD: record.c,v 1.58 2024/02/27 20:40:30 gson Exp $ */ /* * Copyright (c) 1999, 2002, 2003, 2005, 2010 Matthew R. Green @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: record.c,v 1.57 2023/04/15 12:39:44 mlelstv Exp $"); +__RCSID("$NetBSD: record.c,v 1.58 2024/02/27 20:40:30 gson Exp $"); #endif @@ -332,7 +332,7 @@ main(int argc, char *argv[]) s = "change sign (big-endian, 32 bit)"; else if (conv_func == change_sign32_swap_bytes_le) s = "change sign & swap bytes (little-endian, 32 bit)"; - + if (s) fprintf(stderr, "%s: converting, using function: %s\n", getprogname(), s);
CVS commit: src/usr.bin/audio
Module Name:src Committed By: gson Date: Tue Feb 27 20:40:30 UTC 2024 Modified Files: src/usr.bin/audio/common: wav.c src/usr.bin/audio/record: record.c Log Message: Clean up lines containing only spaces. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/audio/common/wav.c cvs rdiff -u -r1.57 -r1.58 src/usr.bin/audio/record/record.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: gson Date: Tue Jan 16 21:04:26 UTC 2024 Modified Files: src/usr.sbin/sysinst/arch/i386: msg.md.en Log Message: The serial bootblocks use the selected serial port, not the first serial port. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/i386/msg.md.en Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/arch/i386/msg.md.en diff -u src/usr.sbin/sysinst/arch/i386/msg.md.en:1.4 src/usr.sbin/sysinst/arch/i386/msg.md.en:1.5 --- src/usr.sbin/sysinst/arch/i386/msg.md.en:1.4 Sat Nov 16 21:25:14 2019 +++ src/usr.sbin/sysinst/arch/i386/msg.md.en Tue Jan 16 21:04:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.md.en,v 1.4 2019/11/16 21:25:14 martin Exp $ */ +/* $NetBSD: msg.md.en,v 1.5 2024/01/16 21:04:26 gson Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -53,7 +53,7 @@ message getboottype {Would you like to install the normal set of bootblocks or serial bootblocks? Normal bootblocks use the BIOS console device as the console -(usually the monitor and keyboard). Serial bootblocks use the first +(usually the monitor and keyboard). Serial bootblocks use the selected serial port as the console. Selected bootblock: }
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: gson Date: Tue Jan 16 21:04:26 UTC 2024 Modified Files: src/usr.sbin/sysinst/arch/i386: msg.md.en Log Message: The serial bootblocks use the selected serial port, not the first serial port. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/i386/msg.md.en Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/carp
Module Name:src Committed By: gson Date: Tue Sep 19 11:55:14 UTC 2023 Modified Files: src/tests/net/carp: t_basic.sh Log Message: Don't expect the net/carp/t_basic/carp_handover_ipv6_halt_nocarpdevip and carp_handover_ipv6_ifdown_nocarpdevip test cases to fail. At least on the TNF i386 and amd64 testbeds, they pass more often than not since the commit of src/sys/netinet/ip_carp.c 1.119 by mlelstv on 2023.04.07.06.44.08. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/net/carp/t_basic.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/carp
Module Name:src Committed By: gson Date: Tue Sep 19 11:55:14 UTC 2023 Modified Files: src/tests/net/carp: t_basic.sh Log Message: Don't expect the net/carp/t_basic/carp_handover_ipv6_halt_nocarpdevip and carp_handover_ipv6_ifdown_nocarpdevip test cases to fail. At least on the TNF i386 and amd64 testbeds, they pass more often than not since the commit of src/sys/netinet/ip_carp.c 1.119 by mlelstv on 2023.04.07.06.44.08. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/net/carp/t_basic.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/carp/t_basic.sh diff -u src/tests/net/carp/t_basic.sh:1.8 src/tests/net/carp/t_basic.sh:1.9 --- src/tests/net/carp/t_basic.sh:1.8 Mon Aug 19 03:22:05 2019 +++ src/tests/net/carp/t_basic.sh Tue Sep 19 11:55:14 2023 @@ -1,4 +1,4 @@ -# $NetBSD: t_basic.sh,v 1.8 2019/08/19 03:22:05 ozaki-r Exp $ +# $NetBSD: t_basic.sh,v 1.9 2023/09/19 11:55:14 gson Exp $ # # Copyright (c) 2017 Internet Initiative Japan Inc. # All rights reserved. @@ -328,9 +328,6 @@ add_test_case() name="${name}_nocarpdevip" desc="$desc without carpdev IP" fi - if [ $ipproto = ipv6 -a $carpdevip = no ]; then - expected_failure_code="atf_expect_fail 'nd6 needs to be fixed';" - fi atf_test_case ${name} cleanup eval "
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Wed Apr 6 10:02:55 UTC 2022 Modified Files: src/tests/lib/libc/sys: Makefile t_mmap.c Log Message: Add a regression test for PR kern/52239, "Changing protections of already mmap'ed region can fail", based on the test program in the PR. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/tests/lib/libc/sys/Makefile cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libc/sys/t_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/Makefile diff -u src/tests/lib/libc/sys/Makefile:1.70 src/tests/lib/libc/sys/Makefile:1.71 --- src/tests/lib/libc/sys/Makefile:1.70 Mon Nov 1 14:33:41 2021 +++ src/tests/lib/libc/sys/Makefile Wed Apr 6 10:02:55 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.70 2021/11/01 14:33:41 hannken Exp $ +# $NetBSD: Makefile,v 1.71 2022/04/06 10:02:55 gson Exp $ MKMAN= no @@ -97,6 +97,7 @@ SRCS.t_mprotect= t_mprotect.c ${SRCS_EXE LDADD.t_eventfd+= -lpthread LDADD.t_getpid+= -lpthread +LDADD.t_mmap+= -lpthread LDADD.t_timerfd+= -lpthread LDADD.t_ptrace_sigchld+= -pthread -lm Index: src/tests/lib/libc/sys/t_mmap.c diff -u src/tests/lib/libc/sys/t_mmap.c:1.16 src/tests/lib/libc/sys/t_mmap.c:1.17 --- src/tests/lib/libc/sys/t_mmap.c:1.16 Tue Apr 5 15:59:22 2022 +++ src/tests/lib/libc/sys/t_mmap.c Wed Apr 6 10:02:55 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.16 2022/04/05 15:59:22 gson Exp $ */ +/* $NetBSD: t_mmap.c,v 1.17 2022/04/06 10:02:55 gson Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.16 2022/04/05 15:59:22 gson Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.17 2022/04/06 10:02:55 gson Exp $"); #include #include @@ -74,6 +74,7 @@ __RCSID("$NetBSD: t_mmap.c,v 1.16 2022/0 #include #include #include +#include static long page = 0; static char path[] = "mmap"; @@ -413,6 +414,65 @@ ATF_TC_CLEANUP(mmap_prot_3, tc) (void)unlink(path); } +ATF_TC(mmap_reprotect_race); + +ATF_TC_HEAD(mmap_reprotect_race, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test for the race condition of PR 52239"); +} + +const int mmap_reprotect_race_npages = 13; +const int mmap_reprotect_iterations = 100; + +static void * +mmap_reprotect_race_thread(void *arg) +{ + int i, r; + void *p; + + for (i = 0; i < mmap_reprotect_iterations; i++) { + /* Get some unrelated memory */ + p = mmap(0, mmap_reprotect_race_npages * page, + PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); + ATF_REQUIRE(p); + r = munmap(p, mmap_reprotect_race_npages * page); + ATF_REQUIRE(r == 0); + } + return 0; +} + +ATF_TC_BODY(mmap_reprotect_race, tc) +{ + pthread_t thread; + void *p, *q; + int i, r; + + r = pthread_create(, 0, mmap_reprotect_race_thread, 0); + ATF_REQUIRE(r == 0); + + for (i = 0; i < mmap_reprotect_iterations; i++) { + /* Get a placeholder region */ + p = mmap(0, mmap_reprotect_race_npages * page, + PROT_NONE, MAP_ANON|MAP_PRIVATE, -1, 0); + if (p == MAP_FAILED) + atf_tc_fail("mmap: %s", strerror(errno)); + + /* Upgrade placeholder to read/write access */ + q = mmap(p, mmap_reprotect_race_npages * page, + PROT_READ|PROT_WRITE, + MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, 0); + if (q == MAP_FAILED) + atf_tc_fail("update mmap: %s", strerror(errno)); + ATF_REQUIRE(q == p); + + /* Free it */ + r = munmap(q, mmap_reprotect_race_npages * page); + if (r != 0) + atf_tc_fail("munmap: %s", strerror(errno)); + } + pthread_join(thread, NULL); +} + ATF_TC_WITH_CLEANUP(mmap_truncate); ATF_TC_HEAD(mmap_truncate, tc) { @@ -570,6 +630,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, mmap_prot_1); ATF_TP_ADD_TC(tp, mmap_prot_2); ATF_TP_ADD_TC(tp, mmap_prot_3); + ATF_TP_ADD_TC(tp, mmap_reprotect_race); ATF_TP_ADD_TC(tp, mmap_truncate); ATF_TP_ADD_TC(tp, mmap_truncate_signal); ATF_TP_ADD_TC(tp, mmap_va0);
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Wed Apr 6 10:02:55 UTC 2022 Modified Files: src/tests/lib/libc/sys: Makefile t_mmap.c Log Message: Add a regression test for PR kern/52239, "Changing protections of already mmap'ed region can fail", based on the test program in the PR. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/tests/lib/libc/sys/Makefile cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libc/sys/t_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Tue Apr 5 15:59:22 UTC 2022 Modified Files: src/tests/lib/libc/sys: t_mmap.c Log Message: In the mmap_err test case, mmap the address, not the address of the address. Should fix PR kern/56780. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libc/sys/t_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_mmap.c diff -u src/tests/lib/libc/sys/t_mmap.c:1.15 src/tests/lib/libc/sys/t_mmap.c:1.16 --- src/tests/lib/libc/sys/t_mmap.c:1.15 Tue Apr 5 13:09:54 2022 +++ src/tests/lib/libc/sys/t_mmap.c Tue Apr 5 15:59:22 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.15 2022/04/05 13:09:54 gson Exp $ */ +/* $NetBSD: t_mmap.c,v 1.16 2022/04/05 15:59:22 gson Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.15 2022/04/05 13:09:54 gson Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.16 2022/04/05 15:59:22 gson Exp $"); #include #include @@ -215,7 +215,7 @@ ATF_TC_HEAD(mmap_err, tc) ATF_TC_BODY(mmap_err, tc) { - size_t addr = SIZE_MAX; + void *addr = (void *)-1; void *map; errno = 0; @@ -225,7 +225,7 @@ ATF_TC_BODY(mmap_err, tc) ATF_REQUIRE(errno == EBADF); errno = 0; - map = mmap(, page, PROT_READ, MAP_FIXED|MAP_PRIVATE, -1, 0); + map = mmap(addr, page, PROT_READ, MAP_FIXED|MAP_PRIVATE, -1, 0); ATF_REQUIRE(map == MAP_FAILED); ATF_REQUIRE_MSG(errno == EINVAL, "errno %d != EINVAL", errno);
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Tue Apr 5 15:59:22 UTC 2022 Modified Files: src/tests/lib/libc/sys: t_mmap.c Log Message: In the mmap_err test case, mmap the address, not the address of the address. Should fix PR kern/56780. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libc/sys/t_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Tue Apr 5 13:09:54 UTC 2022 Modified Files: src/tests/lib/libc/sys: t_mmap.c Log Message: When the t_mmap:mmap_err test fails due to errno not having the expected value of EINVAL, print the actual value. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/sys/t_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_mmap.c diff -u src/tests/lib/libc/sys/t_mmap.c:1.14 src/tests/lib/libc/sys/t_mmap.c:1.15 --- src/tests/lib/libc/sys/t_mmap.c:1.14 Fri Jun 26 07:50:11 2020 +++ src/tests/lib/libc/sys/t_mmap.c Tue Apr 5 13:09:54 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $ */ +/* $NetBSD: t_mmap.c,v 1.15 2022/04/05 13:09:54 gson Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.15 2022/04/05 13:09:54 gson Exp $"); #include #include @@ -228,7 +228,7 @@ ATF_TC_BODY(mmap_err, tc) map = mmap(, page, PROT_READ, MAP_FIXED|MAP_PRIVATE, -1, 0); ATF_REQUIRE(map == MAP_FAILED); - ATF_REQUIRE(errno == EINVAL); + ATF_REQUIRE_MSG(errno == EINVAL, "errno %d != EINVAL", errno); errno = 0; map = mmap(NULL, page, PROT_READ, MAP_ANON|MAP_PRIVATE, INT_MAX, 0);
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Tue Apr 5 13:09:54 UTC 2022 Modified Files: src/tests/lib/libc/sys: t_mmap.c Log Message: When the t_mmap:mmap_err test fails due to errno not having the expected value of EINVAL, print the actual value. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/sys/t_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/sys/rc
Module Name:src Committed By: gson Date: Sat Feb 26 16:21:59 UTC 2022 Modified Files: src/tests/sys/rc: t_rc_d_cli.sh Log Message: Mark randomly failing test cases as expected failures with a reference to PR bin/56506. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/sys/rc/t_rc_d_cli.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sys/rc/t_rc_d_cli.sh diff -u src/tests/sys/rc/t_rc_d_cli.sh:1.4 src/tests/sys/rc/t_rc_d_cli.sh:1.5 --- src/tests/sys/rc/t_rc_d_cli.sh:1.4 Sun Nov 7 17:51:21 2010 +++ src/tests/sys/rc/t_rc_d_cli.sh Sat Feb 26 16:21:59 2022 @@ -1,4 +1,4 @@ -# $NetBSD: t_rc_d_cli.sh,v 1.4 2010/11/07 17:51:21 jmmv Exp $ +# $NetBSD: t_rc_d_cli.sh,v 1.5 2022/02/26 16:21:59 gson Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -48,8 +48,10 @@ default_start_no_args_body() { export h_simple=YES rc_helper=$(atf_get_srcdir)/h_simple + atf_expect_fail "PR bin/56506" atf_check -s eq:0 -o ignore -e empty ${rc_helper} start ${rc_helper} forcestop + atf_fail "random failure did not happen this time" } atf_test_case default_start_with_args @@ -77,8 +79,10 @@ default_stop_no_args_body() { export h_simple=YES rc_helper=$(atf_get_srcdir)/h_simple + atf_expect_fail "PR bin/56506" ${rc_helper} start atf_check -s eq:0 -o ignore -e empty ${rc_helper} stop + atf_fail "random failure did not happen this time" } atf_test_case default_stop_with_args @@ -108,9 +112,11 @@ default_restart_no_args_body() { export h_simple=YES rc_helper=$(atf_get_srcdir)/h_simple + atf_expect_fail "PR bin/56506" ${rc_helper} start atf_check -s eq:0 -o ignore -e empty ${rc_helper} restart ${rc_helper} forcestop + atf_fail "random failure did not happen this time" } atf_test_case default_restart_with_args
CVS commit: src/tests/sys/rc
Module Name:src Committed By: gson Date: Sat Feb 26 16:21:59 UTC 2022 Modified Files: src/tests/sys/rc: t_rc_d_cli.sh Log Message: Mark randomly failing test cases as expected failures with a reference to PR bin/56506. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/sys/rc/t_rc_d_cli.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: gson Date: Wed Dec 15 09:19:28 UTC 2021 Modified Files: src/tests/lib/libc/gen: isqemu.h Log Message: When running the tests under "qemu -accel kvm" on a Linux host, isQEMU_TCG() should return false. Fixes multiple test cases that were failing with "Test case was expecting a failure but none were raised" on that platform. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/isqemu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/isqemu.h diff -u src/tests/lib/libc/gen/isqemu.h:1.5 src/tests/lib/libc/gen/isqemu.h:1.6 --- src/tests/lib/libc/gen/isqemu.h:1.5 Sun Aug 23 11:00:18 2020 +++ src/tests/lib/libc/gen/isqemu.h Wed Dec 15 09:19:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: isqemu.h,v 1.5 2020/08/23 11:00:18 gson Exp $ */ +/* $NetBSD: isqemu.h,v 1.6 2021/12/15 09:19:28 gson Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -72,10 +72,18 @@ isQEMU_TCG(void) { return false; err(EXIT_FAILURE, "sysctl"); } - return strstr(name, "QEMU") != NULL; -#else - return false; + if (strstr(name, "QEMU") == NULL) + return false; + if (sysctlbyname("machdep.hypervisor", name, , NULL, 0) == -1) { + if (errno == ENOENT) + return true; + err(EXIT_FAILURE, "sysctl"); + } + if (strcmp(name, "KVM") == 0) + return false; + return true; #endif + return false; } #ifdef TEST
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: gson Date: Wed Dec 15 09:19:28 UTC 2021 Modified Files: src/tests/lib/libc/gen: isqemu.h Log Message: When running the tests under "qemu -accel kvm" on a Linux host, isQEMU_TCG() should return false. Fixes multiple test cases that were failing with "Test case was expecting a failure but none were raised" on that platform. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/isqemu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/librumpuser
Module Name:src Committed By: gson Date: Tue Dec 7 10:39:33 UTC 2021 Modified Files: src/lib/librumpuser: sp_common.c Log Message: In unix_parse(), always allocate memory for the entire struct sockaddr_un and not just the part used by the present pathname, because the entire struct will be passed to bind() and an EFAULT can result if not all of it is a valid allocation. Fixes PR kern/56533. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/lib/librumpuser/sp_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/sp_common.c diff -u src/lib/librumpuser/sp_common.c:1.42 src/lib/librumpuser/sp_common.c:1.43 --- src/lib/librumpuser/sp_common.c:1.42 Sat Jun 13 16:51:59 2020 +++ src/lib/librumpuser/sp_common.c Tue Dec 7 10:39:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sp_common.c,v 1.42 2020/06/13 16:51:59 kamil Exp $ */ +/* $NetBSD: sp_common.c,v 1.43 2021/12/07 10:39:33 gson Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -670,12 +670,10 @@ unix_parse(const char *addr, struct sock } } strcat(s_un.sun_path, addr); -#if defined(__linux__) || defined(__sun__) || defined(__CYGWIN__) - slen = sizeof(s_un); -#else +#if !(defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)) s_un.sun_len = SUN_LEN(_un); - slen = s_un.sun_len+1; /* get the 0 too */ #endif + slen = sizeof(s_un); if (savepath && *parsedurl == '\0') { snprintf(parsedurl, sizeof(parsedurl),
CVS commit: src/lib/librumpuser
Module Name:src Committed By: gson Date: Tue Dec 7 10:39:33 UTC 2021 Modified Files: src/lib/librumpuser: sp_common.c Log Message: In unix_parse(), always allocate memory for the entire struct sockaddr_un and not just the part used by the present pathname, because the entire struct will be passed to bind() and an EFAULT can result if not all of it is a valid allocation. Fixes PR kern/56533. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/lib/librumpuser/sp_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: gson Date: Fri Dec 3 08:33:30 UTC 2021 Modified Files: src/sys/kern: kern_hook.c Log Message: Only one space after comma To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/kern/kern_hook.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_hook.c diff -u src/sys/kern/kern_hook.c:1.11 src/sys/kern/kern_hook.c:1.12 --- src/sys/kern/kern_hook.c:1.11 Thu Sep 30 07:15:02 2021 +++ src/sys/kern/kern_hook.c Fri Dec 3 08:33:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_hook.c,v 1.11 2021/09/30 07:15:02 skrll Exp $ */ +/* $NetBSD: kern_hook.c,v 1.12 2021/12/03 08:33:30 gson Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.11 2021/09/30 07:15:02 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.12 2021/12/03 08:33:30 gson Exp $"); #include #include @@ -524,7 +524,7 @@ simplehook_dohooks(khook_list_t *l) } khook_t * -simplehook_establish(khook_list_t *l, void (*fn)(void *), void *arg) +simplehook_establish(khook_list_t *l, void (*fn)(void *), void *arg) { struct hook_desc *hd;
CVS commit: src/sys/kern
Module Name:src Committed By: gson Date: Fri Dec 3 08:33:30 UTC 2021 Modified Files: src/sys/kern: kern_hook.c Log Message: Only one space after comma To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/kern/kern_hook.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/fs/vfs
Module Name:src Committed By: gson Date: Sat Nov 27 15:23:33 UTC 2021 Modified Files: src/tests/fs/vfs: t_renamerace.c Log Message: Force failure of the nfs_renamerace_cycle, p2k_ffs_renamerace_cycle, and puffs_renamerace_cycle test cases as they fail only randomly or only on some systems. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/tests/fs/vfs/t_renamerace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/vfs/t_renamerace.c diff -u src/tests/fs/vfs/t_renamerace.c:1.42 src/tests/fs/vfs/t_renamerace.c:1.43 --- src/tests/fs/vfs/t_renamerace.c:1.42 Sat Oct 23 17:43:08 2021 +++ src/tests/fs/vfs/t_renamerace.c Sat Nov 27 15:23:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_renamerace.c,v 1.42 2021/10/23 17:43:08 hannken Exp $ */ +/* $NetBSD: t_renamerace.c,v 1.43 2021/11/27 15:23:33 gson Exp $ */ /* * Modified for rump and atf from a program supplied @@ -253,6 +253,12 @@ renamerace_cycle(const atf_tc_t *tc, con if (FSTYPE_UDF(tc)) atf_tc_fail("PR kern/56253 did not trigger this time"); + if (FSTYPE_P2K_FFS(tc)) + atf_tc_fail("did not fail this time"); + if (FSTYPE_PUFFS(tc)) + atf_tc_fail("did not fail this time"); + if (FSTYPE_NFS(tc)) + atf_tc_fail("did not fail this time"); } ATF_TC_FSAPPLY(renamerace, "rename(2) race with file unlinked mid-operation");
CVS commit: src/tests/fs/vfs
Module Name:src Committed By: gson Date: Sat Nov 27 15:23:33 UTC 2021 Modified Files: src/tests/fs/vfs: t_renamerace.c Log Message: Force failure of the nfs_renamerace_cycle, p2k_ffs_renamerace_cycle, and puffs_renamerace_cycle test cases as they fail only randomly or only on some systems. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/tests/fs/vfs/t_renamerace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/if_wg
Module Name:src Committed By: gson Date: Fri Nov 26 20:02:35 UTC 2021 Modified Files: src/tests/net/if_wg: t_misc.sh Log Message: The wg_handshake_timeout test case was failing because it contained atf_fail "failed to trigger PR kern/56252" without a corresponding atf_expect_fail "PR kern/56252", which makes no sense. Since the test case does occasionally fail on real hardware, fix this by adding the atf_expect_fail rather than by removing the atf_fail. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/net/if_wg/t_misc.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if_wg/t_misc.sh diff -u src/tests/net/if_wg/t_misc.sh:1.10 src/tests/net/if_wg/t_misc.sh:1.11 --- src/tests/net/if_wg/t_misc.sh:1.10 Thu Jun 17 12:45:58 2021 +++ src/tests/net/if_wg/t_misc.sh Fri Nov 26 20:02:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_misc.sh,v 1.10 2021/06/17 12:45:58 riastradh Exp $ +# $NetBSD: t_misc.sh,v 1.11 2021/11/26 20:02:35 gson Exp $ # # Copyright (c) 2018 Ryota Ozaki # All rights reserved. @@ -198,6 +198,8 @@ wg_handshake_timeout_body() n=$(grep "$ip_local.$port > $ip_peer.$port" $outfile |wc -l) + atf_expect_fail "PR kern/56252" + # Give up handshaking after three attempts atf_check_equal $n 3
CVS commit: src/tests/net/if_wg
Module Name:src Committed By: gson Date: Fri Nov 26 20:02:35 UTC 2021 Modified Files: src/tests/net/if_wg: t_misc.sh Log Message: The wg_handshake_timeout test case was failing because it contained atf_fail "failed to trigger PR kern/56252" without a corresponding atf_expect_fail "PR kern/56252", which makes no sense. Since the test case does occasionally fail on real hardware, fix this by adding the atf_expect_fail rather than by removing the atf_fail. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/net/if_wg/t_misc.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/if
Module Name:src Committed By: gson Date: Fri Nov 26 15:45:52 UTC 2021 Modified Files: src/tests/net/if: t_compat.c Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/net/if/t_compat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if/t_compat.c diff -u src/tests/net/if/t_compat.c:1.4 src/tests/net/if/t_compat.c:1.5 --- src/tests/net/if/t_compat.c:1.4 Sat Nov 12 15:12:59 2016 +++ src/tests/net/if/t_compat.c Fri Nov 26 15:45:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_compat.c,v 1.4 2016/11/12 15:12:59 kre Exp $ */ +/* $NetBSD: t_compat.c,v 1.5 2021/11/26 15:45:52 gson Exp $ */ #include #include @@ -25,9 +25,9 @@ struct oifreq { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; -short ifru_flags; +short ifru_flags; int ifru_metric; -int ifru_mtu; +int ifru_mtu; int ifru_dlt; u_int ifru_value; void * ifru_data; @@ -36,7 +36,7 @@ struct oifreq { void*b_buf; } ifru_b; } ifr_ifru; -}; +}; #define OOSIOCGIFBRDADDR _IOWR('i', 18, struct oifreq) ATF_TC(OOSIOCGIFBRDADDR);
CVS commit: src/tests/net/if
Module Name:src Committed By: gson Date: Fri Nov 26 15:45:52 UTC 2021 Modified Files: src/tests/net/if: t_compat.c Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/net/if/t_compat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/librumphijack
Module Name:src Committed By: gson Date: Thu Nov 11 07:38:21 UTC 2021 Modified Files: src/tests/lib/librumphijack: t_tcpip.sh Log Message: The nfs_autoload test case has now been broken for more than four years. Mark it as an expected failure with a reference to PR kern/54184. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tests/lib/librumphijack/t_tcpip.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/librumphijack/t_tcpip.sh diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.20 src/tests/lib/librumphijack/t_tcpip.sh:1.21 --- src/tests/lib/librumphijack/t_tcpip.sh:1.20 Fri Sep 10 21:21:35 2021 +++ src/tests/lib/librumphijack/t_tcpip.sh Thu Nov 11 07:38:21 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_tcpip.sh,v 1.20 2021/09/10 21:21:35 christos Exp $ +# $NetBSD: t_tcpip.sh,v 1.21 2021/11/11 07:38:21 gson Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -254,6 +254,7 @@ nfs_autoload_head() nfs_autoload_body() { [ `uname -m` = "i386" ] || atf_skip "test currently valid only on i386" + atf_expect_fail "PR lib/54184" test_nfs -lrumpvfs -lrumpdev -lrumpnet -lrumpnet_net \ -lrumpnet_netinet -lrumpnet_local -lrumpnet_shmif \ -lrumpdev_disk -d key=/dk,hostpath=ffs.img,size=host
CVS commit: src/tests/lib/librumphijack
Module Name:src Committed By: gson Date: Thu Nov 11 07:38:21 UTC 2021 Modified Files: src/tests/lib/librumphijack: t_tcpip.sh Log Message: The nfs_autoload test case has now been broken for more than four years. Mark it as an expected failure with a reference to PR kern/54184. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tests/lib/librumphijack/t_tcpip.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: gson Date: Sun Oct 31 11:36:26 UTC 2021 Modified Files: src/tests/lib/libc/stdio: t_intr.sh Log Message: Skip the test when there is insufficient disk space. Fixes PR misc/56324. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdio/t_intr.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: gson Date: Sun Oct 31 11:36:26 UTC 2021 Modified Files: src/tests/lib/libc/stdio: t_intr.sh Log Message: Skip the test when there is insufficient disk space. Fixes PR misc/56324. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdio/t_intr.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdio/t_intr.sh diff -u src/tests/lib/libc/stdio/t_intr.sh:1.5 src/tests/lib/libc/stdio/t_intr.sh:1.6 --- src/tests/lib/libc/stdio/t_intr.sh:1.5 Thu Sep 9 21:47:47 2021 +++ src/tests/lib/libc/stdio/t_intr.sh Sun Oct 31 11:36:26 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_intr.sh,v 1.5 2021/09/09 21:47:47 rillig Exp $ +# $NetBSD: t_intr.sh,v 1.6 2021/10/31 11:36:26 gson Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,6 +36,12 @@ SSIZE=256000 TMOUT=20 h_test() { + local avail=$( df -m . | awk '{if (int($4) > 0) print $4}' ) + local need=$(( 2 * $MAX * 8 / 100 )) + if [ $avail -lt $need ]; then + atf_skip "not enough free space in working directory" + fi + "${DIR}/h_makenumbers" "$1" > numbers.in "${DIR}/h_intr" \ -p "$2" -a ${SSIZE} -b ${BSIZE} -t ${TMOUT} \
CVS commit: src/tests/sbin/resize_ffs
Module Name:src Committed By: gson Date: Sat Oct 30 13:50:12 UTC 2021 Modified Files: src/tests/sbin/resize_ffs: common.sh Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/sbin/resize_ffs/common.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sbin/resize_ffs/common.sh diff -u src/tests/sbin/resize_ffs/common.sh:1.17 src/tests/sbin/resize_ffs/common.sh:1.18 --- src/tests/sbin/resize_ffs/common.sh:1.17 Sun Mar 15 11:17:59 2020 +++ src/tests/sbin/resize_ffs/common.sh Sat Oct 30 13:50:12 2021 @@ -1,6 +1,6 @@ # Common settings and functions for the various resize_ffs tests. -# +# # called from atf_init_test_cases setupvars()
CVS commit: src/tests/sbin/resize_ffs
Module Name:src Committed By: gson Date: Sat Oct 30 13:50:12 UTC 2021 Modified Files: src/tests/sbin/resize_ffs: common.sh Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/sbin/resize_ffs/common.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Thu Oct 21 17:02:38 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_ptrace_syscall_wait.h Log Message: Skip the lib/libc/sys/t_ptrace_waitid:syscall_signal_on_sce test case with a reference to PR lib/55087. Marking it as an expected failure would be more appropriate, but that doesn't work for test cases that fail by timing out. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_ptrace_syscall_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_syscall_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_syscall_wait.h:1.1 src/tests/lib/libc/sys/t_ptrace_syscall_wait.h:1.2 --- src/tests/lib/libc/sys/t_ptrace_syscall_wait.h:1.1 Mon May 4 21:21:30 2020 +++ src/tests/lib/libc/sys/t_ptrace_syscall_wait.h Thu Oct 21 17:02:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_syscall_wait.h,v 1.1 2020/05/04 21:21:30 kamil Exp $ */ +/* $NetBSD: t_ptrace_syscall_wait.h,v 1.2 2021/10/21 17:02:37 gson Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019, 2020 The NetBSD Foundation, Inc. @@ -55,11 +55,13 @@ syscall_body(const char *op) memset(, 0, sizeof(info)); -#if defined(TWAIT_HAVE_STATUS) if (strstr(op, "signal") != NULL) { +#if defined(TWAIT_HAVE_STATUS) atf_tc_expect_fail("XXX: behavior under investigation"); - } +#else + atf_tc_skip("PR lib/55087"); #endif + } DPRINTF("Before forking process PID=%d\n", getpid()); SYSCALL_REQUIRE((child = fork()) != -1);
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Thu Oct 21 17:02:38 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_ptrace_syscall_wait.h Log Message: Skip the lib/libc/sys/t_ptrace_waitid:syscall_signal_on_sce test case with a reference to PR lib/55087. Marking it as an expected failure would be more appropriate, but that doesn't work for test cases that fail by timing out. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_ptrace_syscall_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Thu Oct 14 13:50:36 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_ptrace_register_wait.h Log Message: Remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_ptrace_register_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_register_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_register_wait.h:1.3 src/tests/lib/libc/sys/t_ptrace_register_wait.h:1.4 --- src/tests/lib/libc/sys/t_ptrace_register_wait.h:1.3 Mon May 11 12:17:57 2020 +++ src/tests/lib/libc/sys/t_ptrace_register_wait.h Thu Oct 14 13:50:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_register_wait.h,v 1.3 2020/05/11 12:17:57 kamil Exp $ */ +/* $NetBSD: t_ptrace_register_wait.h,v 1.4 2021/10/14 13:50:36 gson Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019, 2020 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ access_regs(const char *regset, const ch #if defined(HAVE_FPREGS) struct fpreg fpr; #endif - + #if !defined(HAVE_GPREGS) if (strcmp(regset, "regs") == 0) atf_tc_fail("Impossible test scenario!");
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Thu Oct 14 13:50:36 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_ptrace_register_wait.h Log Message: Remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_ptrace_register_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/progress
Module Name:src Committed By: gson Date: Tue Aug 17 07:18:43 UTC 2021 Modified Files: src/usr.bin/progress: progress.c Log Message: Add missing check for error returns from read(). Found by inspection while reviewing the changes suggested by RVP in PR install/56303, but not believed to be the cause of the failure reported in that PR. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/progress/progress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/progress/progress.c diff -u src/usr.bin/progress/progress.c:1.24 src/usr.bin/progress/progress.c:1.25 --- src/usr.bin/progress/progress.c:1.24 Mon Aug 9 10:46:39 2021 +++ src/usr.bin/progress/progress.c Tue Aug 17 07:18:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $ */ +/* $NetBSD: progress.c,v 1.25 2021/08/17 07:18:43 gson Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $"); +__RCSID("$NetBSD: progress.c,v 1.25 2021/08/17 07:18:43 gson Exp $"); #endif/* not lint */ #include @@ -231,7 +231,11 @@ main(int argc, char *argv[]) do { nr = read(fd, fb_buf, buffersize); } while (nr < 0 && errno == EINTR); - if (nr <= 0) + if (nr < 0) { + progressmeter(1); + err(1, "reading input"); + } + if (nr == 0) break; for (off = 0; nr; nr -= nw, off += nw, bytes += nw) if ((nw = write(outpipe[1], fb_buf + off,
CVS commit: src/usr.bin/progress
Module Name:src Committed By: gson Date: Tue Aug 17 07:18:43 UTC 2021 Modified Files: src/usr.bin/progress: progress.c Log Message: Add missing check for error returns from read(). Found by inspection while reviewing the changes suggested by RVP in PR install/56303, but not believed to be the cause of the failure reported in that PR. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/progress/progress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/progress
Module Name:src Committed By: gson Date: Mon Aug 9 10:46:39 UTC 2021 Modified Files: src/usr.bin/progress: progress.c Log Message: Test errno when the return value from wait() indicates an error, not when it indicates success. PR install/56303. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/progress/progress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/progress/progress.c diff -u src/usr.bin/progress/progress.c:1.23 src/usr.bin/progress/progress.c:1.24 --- src/usr.bin/progress/progress.c:1.23 Thu Jan 7 12:02:52 2021 +++ src/usr.bin/progress/progress.c Mon Aug 9 10:46:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $ */ +/* $NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $"); +__RCSID("$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $"); #endif/* not lint */ #include @@ -259,7 +259,7 @@ main(int argc, char *argv[]) */ ws = WIFSIGNALED(ws) ? WTERMSIG(ws) : WEXITSTATUS(ws); - if (deadpid != -1 && errno == EINTR) + if (deadpid == -1 && errno == EINTR) continue; if (deadpid == pid) { pid = 0;
CVS commit: src/usr.bin/progress
Module Name:src Committed By: gson Date: Mon Aug 9 10:46:39 UTC 2021 Modified Files: src/usr.bin/progress: progress.c Log Message: Test errno when the return value from wait() indicates an error, not when it indicates success. PR install/56303. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/progress/progress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Thu Jul 29 14:58:35 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Skip the test when the dtrace_syscall module is not loaded and can't be autoloaded, as may be the case on arm because securelevel. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.11 --- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10 Tue Jul 27 15:29:22 2021 +++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh Thu Jul 29 14:58:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_execsnoop.sh,v 1.10 2021/07/27 15:29:22 gson Exp $ +# $NetBSD: t_execsnoop.sh,v 1.11 2021/07/29 14:58:35 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,6 +38,13 @@ basic_head() { } basic_body() { + if + ! modstat dtrace_syscall | grep dtrace_syscall && + ! modstat -A + then + atf_skip "dtrace_syscall module not loaded and can't be autoloaded" + fi + n=10 atf_check -s exit:0 -o ignore -e empty -x "execsnoop >$stdout 2>$stderr &" sleep 5
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Thu Jul 29 14:58:35 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Skip the test when the dtrace_syscall module is not loaded and can't be autoloaded, as may be the case on arm because securelevel. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Tue Jul 27 15:29:22 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Show the stderr from execsnoop so that we can see why it fails on arm. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.9 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10 --- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.9 Tue Jul 27 11:05:39 2021 +++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh Tue Jul 27 15:29:22 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_execsnoop.sh,v 1.9 2021/07/27 11:05:39 skrll Exp $ +# $NetBSD: t_execsnoop.sh,v 1.10 2021/07/27 15:29:22 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,7 +27,8 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -tmp="execsnoop.out" +stdout="execsnoop.out" +stderr="execsnoop.stderr" atf_test_case basic cleanup basic_head() { @@ -38,7 +39,7 @@ basic_head() { basic_body() { n=10 - atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &" + atf_check -s exit:0 -o ignore -e empty -x "execsnoop >$stdout 2>$stderr &" sleep 5 while [ $n -gt 0 ]; do @@ -48,7 +49,9 @@ basic_body() { sleep 5 - if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then + cat $stderr >&2 + + if [ ! $(cat $stdout | grep "whoami" | wc -l) -eq 10 ]; then atf_fail "execsnoop does not work" fi
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Tue Jul 27 15:29:22 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Show the stderr from execsnoop so that we can see why it fails on arm. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Sun Jul 25 15:51:32 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Only expect failure on ARM To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.7 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.8 --- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.7 Sun Jul 25 10:21:44 2021 +++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh Sun Jul 25 15:51:32 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_execsnoop.sh,v 1.7 2021/07/25 10:21:44 gson Exp $ +# $NetBSD: t_execsnoop.sh,v 1.8 2021/07/25 15:51:32 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,7 +37,10 @@ basic_head() { } basic_body() { - atf_expect_fail "PR kern/53417" + case `uname -p` in + *arm*) + atf_expect_fail "PR kern/53417" ;; + esac n=10 atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &"
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Sun Jul 25 15:51:32 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Only expect failure on ARM To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Sun Jul 25 10:21:44 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Remove "pkill -9 execsnoop". It's wrong on so many levels: first of all, it does not actually kill anything because the process executing the execsnoop script is called "sh", not "execsnoop". And even if it would somehow kill the shell running the execsnoop script, it still would not kill the dtrace child process. On the other hand, if there happened to be an unrelated process actually called "execsnoop", it would kill that. The actual killing of the execsnoop sh and dtrace processes happens in the ATF cleanup stage (as it always has). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Sun Jul 25 10:21:44 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Remove "pkill -9 execsnoop". It's wrong on so many levels: first of all, it does not actually kill anything because the process executing the execsnoop script is called "sh", not "execsnoop". And even if it would somehow kill the shell running the execsnoop script, it still would not kill the dtrace child process. On the other hand, if there happened to be an unrelated process actually called "execsnoop", it would kill that. The actual killing of the execsnoop sh and dtrace processes happens in the ATF cleanup stage (as it always has). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.6 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.7 --- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.6 Sun Jul 25 10:11:32 2021 +++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh Sun Jul 25 10:21:44 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_execsnoop.sh,v 1.6 2021/07/25 10:11:32 gson Exp $ +# $NetBSD: t_execsnoop.sh,v 1.7 2021/07/25 10:21:44 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,8 +49,6 @@ basic_body() { done sleep 5 - pkill -9 execsnoop - sleep 1 if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then atf_fail "execsnoop does not work"
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Sun Jul 25 10:11:32 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Increase sleep waiting for execsnoop to start; one second is not sufficient on a Dell Latitude D400 i386 laptop. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.sbin/execsnoop
Module Name:src Committed By: gson Date: Sun Jul 25 10:11:32 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh Log Message: Increase sleep waiting for execsnoop to start; one second is not sufficient on a Dell Latitude D400 i386 laptop. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.sbin/execsnoop/t_execsnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.5 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.6 --- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.5 Sat Jul 24 15:56:05 2021 +++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh Sun Jul 25 10:11:32 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_execsnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $ +# $NetBSD: t_execsnoop.sh,v 1.6 2021/07/25 10:11:32 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,7 +41,7 @@ basic_body() { n=10 atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &" - sleep 1 + sleep 5 while [ $n -gt 0 ]; do whoami
CVS commit: src/tests/usr.sbin
Module Name:src Committed By: gson Date: Sat Jul 24 15:56:06 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh src/tests/usr.sbin/opensnoop: t_opensnoop.sh Log Message: Create temporary files in . rather than /tmp so that they get cleaned up automatically by atf. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/execsnoop/t_execsnoop.sh cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/opensnoop/t_opensnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.4 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.5 --- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.4 Sun Jul 18 06:24:58 2021 +++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh Sat Jul 24 15:56:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_execsnoop.sh,v 1.4 2021/07/18 06:24:58 dholland Exp $ +# $NetBSD: t_execsnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,7 +27,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -tmp="/tmp/execsnoop" +tmp="execsnoop.out" atf_test_case basic cleanup basic_head() { @@ -60,10 +60,6 @@ basic_body() { } basic_cleanup() { - - if [ -f $tmp ]; then - rm $tmp - fi } atf_init_test_cases() { Index: src/tests/usr.sbin/opensnoop/t_opensnoop.sh diff -u src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.4 src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.5 --- src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.4 Sat Jul 11 09:55:26 2020 +++ src/tests/usr.sbin/opensnoop/t_opensnoop.sh Sat Jul 24 15:56:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_opensnoop.sh,v 1.4 2020/07/11 09:55:26 jruoho Exp $ +# $NetBSD: t_opensnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,7 +27,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -tmp="/tmp/opensnoop" +tmp="opensnoop.out" atf_test_case basic cleanup basic_head() { @@ -62,10 +62,6 @@ basic_body() { } basic_cleanup() { - - if [ -f $tmp ]; then - rm $tmp - fi } atf_init_test_cases() {
CVS commit: src/tests/usr.sbin
Module Name:src Committed By: gson Date: Sat Jul 24 15:56:06 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh src/tests/usr.sbin/opensnoop: t_opensnoop.sh Log Message: Create temporary files in . rather than /tmp so that they get cleaned up automatically by atf. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/execsnoop/t_execsnoop.sh cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/opensnoop/t_opensnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/atf/dist/tools
Module Name:src Committed By: gson Date: Thu Jul 8 18:10:52 UTC 2021 Modified Files: src/external/bsd/atf/dist/tools: atf-run.cpp Log Message: When running an individual test case under isolation, make the test case count on the tp-start line of the output match the number of test cases actually executed (one) so that the atf-run output is valid input to atf-report. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/tools/atf-run.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/tools/atf-run.cpp diff -u src/external/bsd/atf/dist/tools/atf-run.cpp:1.6 src/external/bsd/atf/dist/tools/atf-run.cpp:1.7 --- src/external/bsd/atf/dist/tools/atf-run.cpp:1.6 Sat Apr 10 10:32:57 2021 +++ src/external/bsd/atf/dist/tools/atf-run.cpp Thu Jul 8 18:10:52 2021 @@ -388,7 +388,22 @@ atf_run::run_test_program(const tools::f tools::fs::temp_dir resdir( tools::fs::path(tools::config::get("atf_workdir")) / "atf-run.XX"); -w.start_tp(tp.str(), md.test_cases.size()); +size_t nseltcs; +if (tc.empty()) { +nseltcs = md.test_cases.size(); +} else { +nseltcs = 0; +for (std::map< std::string, vars_map >::const_iterator iter + = md.test_cases.begin(); iter != md.test_cases.end(); iter++) { +const std::string& tcname = (*iter).first; +if (tcname == tc) +nseltcs++; +} +if (nseltcs == 0) +throw std::runtime_error("No such test case"); +} + +w.start_tp(tp.str(), nseltcs); if (md.test_cases.empty()) { w.end_tp("Bogus test program: reported 0 test cases"); errcode = EXIT_FAILURE;
CVS commit: src/external/bsd/atf/dist/tools
Module Name:src Committed By: gson Date: Thu Jul 8 18:10:52 UTC 2021 Modified Files: src/external/bsd/atf/dist/tools: atf-run.cpp Log Message: When running an individual test case under isolation, make the test case count on the tp-start line of the output match the number of test cases actually executed (one) so that the atf-run output is valid input to atf-report. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/tools/atf-run.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/fs/tmpfs
Module Name:src Committed By: gson Date: Sat Jun 5 06:40:59 UTC 2021 Modified Files: src/tests/fs/tmpfs: t_vnd.sh Log Message: Use the correct pathname when cleaning up the inner mount on test failure. Fixes the ATF crash reported in PR bin/56221, but not the issue causing the test to fail in the first place. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/fs/tmpfs/t_vnd.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/tmpfs/t_vnd.sh diff -u src/tests/fs/tmpfs/t_vnd.sh:1.10 src/tests/fs/tmpfs/t_vnd.sh:1.11 --- src/tests/fs/tmpfs/t_vnd.sh:1.10 Thu Mar 23 08:18:17 2017 +++ src/tests/fs/tmpfs/t_vnd.sh Sat Jun 5 06:40:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_vnd.sh,v 1.10 2017/03/23 08:18:17 martin Exp $ +# $NetBSD: t_vnd.sh,v 1.11 2021/06/05 06:40:59 gson Exp $ # # Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -69,7 +69,7 @@ basic_body() { } basic_cleanup() { if [ ! -f done ]; then - umount mnt 2>/dev/null 1>&2 + umount mntpt/mnt 2>/dev/null 1>&2 vndconfig -u ${vnddev} 2>/dev/null 1>&2 fi }
CVS commit: src/tests/fs/tmpfs
Module Name:src Committed By: gson Date: Sat Jun 5 06:40:59 UTC 2021 Modified Files: src/tests/fs/tmpfs: t_vnd.sh Log Message: Use the correct pathname when cleaning up the inner mount on test failure. Fixes the ATF crash reported in PR bin/56221, but not the issue causing the test to fail in the first place. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/fs/tmpfs/t_vnd.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Mon May 24 10:44:06 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.h Log Message: On mips, avoid deliberately executing an illegal instruction for now because it causes GXemul to exit rather than generating a trap. A bug report has been sent to the GXemul author. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/tests/lib/libc/sys/t_ptrace_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.32 src/tests/lib/libc/sys/t_ptrace_wait.h:1.33 --- src/tests/lib/libc/sys/t_ptrace_wait.h:1.32 Mon Jun 22 12:21:02 2020 +++ src/tests/lib/libc/sys/t_ptrace_wait.h Mon May 24 10:44:06 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.h,v 1.32 2020/06/22 12:21:02 rin Exp $ */ +/* $NetBSD: t_ptrace_wait.h,v 1.33 2021/05/24 10:44:06 gson Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -648,7 +648,9 @@ trigger_ill(void) /* Illegal instruction causes CPU trap, translated to SIGILL */ #ifdef PTRACE_ILLEGAL_ASM +#ifndef __mips__ /* To avoid GXemul crash */ PTRACE_ILLEGAL_ASM; +#endif #else /* port me */ #endif
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: gson Date: Mon May 24 10:44:06 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.h Log Message: On mips, avoid deliberately executing an illegal instruction for now because it causes GXemul to exit rather than generating a trap. A bug report has been sent to the GXemul author. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/tests/lib/libc/sys/t_ptrace_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/atf/dist/tools
Module Name:src Committed By: gson Date: Sat Apr 10 10:32:57 UTC 2021 Modified Files: src/external/bsd/atf/dist/tools: atf-run.1 atf-run.cpp Log Message: Add support for running individual test cases under isolation. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/atf-run.1 cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/tools/atf-run.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/tools/atf-run.1 diff -u src/external/bsd/atf/dist/tools/atf-run.1:1.4 src/external/bsd/atf/dist/tools/atf-run.1:1.5 --- src/external/bsd/atf/dist/tools/atf-run.1:1.4 Sat Feb 8 19:13:44 2014 +++ src/external/bsd/atf/dist/tools/atf-run.1 Sat Apr 10 10:32:57 2021 @@ -26,23 +26,22 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 1, 2010 +.Dd April 10, 2021 .Dt ATF-RUN 1 .Os .Sh NAME .Nm atf-run -.Nd executes a collection of test programs +.Nd executes a collection of tests .Sh SYNOPSIS .Nm .Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN -.Op Ar test_program1 Op Ar .. test_programN +.Op Ar test1 Op Ar .. testN .Nm .Fl h .Sh DESCRIPTION .Nm -executes a collection of test programs or, in other words, a complete -test suite. -The results of each test program are collected by the tool, and are then +executes a collection of test cases, test programs, or a complete test suite. +The results of each test are collected by the tool, and are then multiplexed into a single machine-parseable report; see .Xr atf-formats 5 for more details. @@ -70,8 +69,14 @@ In the first synopsis form, parses the .Pa Atffile in the current directory and runs all the test programs specified in it. -If any test program names are given as part of the command line, those are -the ones executed instead of the complete list. +If any +.Ar test +arguments are given as part of the command line, those tests are +executed instead of the complete list. Each +.Ar test +argument can be either the name of a test program, or a string of the form +.Ar test_program:test_case +to execute a single test case. .Pp In the second synopsis form, .Nm Index: src/external/bsd/atf/dist/tools/atf-run.cpp diff -u src/external/bsd/atf/dist/tools/atf-run.cpp:1.5 src/external/bsd/atf/dist/tools/atf-run.cpp:1.6 --- src/external/bsd/atf/dist/tools/atf-run.cpp:1.5 Tue Feb 11 18:13:45 2014 +++ src/external/bsd/atf/dist/tools/atf-run.cpp Sat Apr 10 10:32:57 2021 @@ -81,11 +81,13 @@ class atf_run : public tools::applicatio size_t count_tps(std::vector< std::string >) const; -int run_test(const tools::fs::path&, tools::test_program::atf_tps_writer&, +int run_test(const tools::fs::path&, const std::string &, + tools::test_program::atf_tps_writer&, const vars_map&); int run_test_directory(const tools::fs::path&, tools::test_program::atf_tps_writer&); int run_test_program(const tools::fs::path&, + const std::string tc, tools::test_program::atf_tps_writer&, const vars_map&); @@ -179,7 +181,7 @@ std::string atf_run::specific_args(void) const { -return "[test-program1 .. test-programN]"; +return "[test1 .. testN]"; } atf_run::options_set @@ -214,6 +216,7 @@ atf_run::parse_vflag(const std::string& int atf_run::run_test(const tools::fs::path& tp, + const std::string , tools::test_program::atf_tps_writer& w, const vars_map& config) { @@ -226,7 +229,7 @@ atf_run::run_test(const tools::fs::path& const vars_map effective_config = tools::config_file::merge_configs(config, m_cmdline_vars); -errcode = run_test_program(tp, w, effective_config); +errcode = run_test_program(tp, tc, w, effective_config); } return errcode; } @@ -247,7 +250,7 @@ atf_run::run_test_directory(const tools: bool ok = true; for (std::vector< std::string >::const_iterator iter = af.tps().begin(); iter != af.tps().end(); iter++) { -const bool result = run_test(tp / *iter, w, +const bool result = run_test(tp / *iter, "", w, tools::config_file::merge_configs(af.conf(), test_suite_vars)); ok &= (result == EXIT_SUCCESS); } @@ -362,6 +365,7 @@ atf_run::get_test_case_result(const std: int atf_run::run_test_program(const tools::fs::path& tp, + const std::string tc, tools::test_program::atf_tps_writer& w, const vars_map& config) { @@ -394,6 +398,9 @@ atf_run::run_test_program(const tools::f const std::string& tcname = (*iter).first; const vars_map& tcmd = (*iter).second; +
CVS commit: src/external/bsd/atf/dist/tools
Module Name:src Committed By: gson Date: Sat Apr 10 10:32:57 UTC 2021 Modified Files: src/external/bsd/atf/dist/tools: atf-run.1 atf-run.cpp Log Message: Add support for running individual test cases under isolation. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/atf-run.1 cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/tools/atf-run.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libossaudio
Module Name:src Committed By: gson Date: Sat Dec 26 15:28:52 UTC 2020 Modified Files: src/tests/lib/libossaudio: t_ossaudio.c Log Message: Disable the lib/libossaudio/t_ossaudio:oss_dsp_trigger_read test case on sparc until PR port-sparc/55876 gets fixed. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libossaudio/t_ossaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libossaudio/t_ossaudio.c diff -u src/tests/lib/libossaudio/t_ossaudio.c:1.2 src/tests/lib/libossaudio/t_ossaudio.c:1.3 --- src/tests/lib/libossaudio/t_ossaudio.c:1.2 Mon Dec 14 10:58:08 2020 +++ src/tests/lib/libossaudio/t_ossaudio.c Sat Dec 26 15:28:52 2020 @@ -292,6 +292,10 @@ ATF_TC_BODY(oss_dsp_trigger_read, tc) struct audio_info info; int fd, bits; +#if defined(__sparc__) + atf_tc_skip("PR port-sparc/55876"); +#endif + if ((fd = open("/dev/audio", O_RDONLY)) == -1) atf_tc_skip("Audio device unavailable for recording");
CVS commit: src/tests/lib/libossaudio
Module Name:src Committed By: gson Date: Sat Dec 26 15:28:52 UTC 2020 Modified Files: src/tests/lib/libossaudio: t_ossaudio.c Log Message: Disable the lib/libossaudio/t_ossaudio:oss_dsp_trigger_read test case on sparc until PR port-sparc/55876 gets fixed. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libossaudio/t_ossaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/string
Module Name:src Committed By: gson Date: Fri Nov 27 15:37:06 UTC 2020 Modified Files: src/tests/lib/libc/string: t_memmem.c Log Message: delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/string/t_memmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/string/t_memmem.c diff -u src/tests/lib/libc/string/t_memmem.c:1.4 src/tests/lib/libc/string/t_memmem.c:1.5 --- src/tests/lib/libc/string/t_memmem.c:1.4 Mon Oct 15 17:55:28 2018 +++ src/tests/lib/libc/string/t_memmem.c Fri Nov 27 15:37:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: t_memmem.c,v 1.4 2018/10/15 17:55:28 christos Exp $ */ +/* $NetBSD: t_memmem.c,v 1.5 2020/11/27 15:37:06 gson Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -107,7 +107,7 @@ ATF_TC_BODY(memmem_oob, tc) size_t pg = getpagesize(); char *src = mmap(NULL, pg, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, (off_t)0); - ATF_CHECK(src != MAP_FAILED); + ATF_CHECK(src != MAP_FAILED); char *guard = mmap(src + pg, pg, PROT_NONE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, (off_t)0); for (size_t i = 2; i < 5; i++) {
CVS commit: src/tests/lib/libc/string
Module Name:src Committed By: gson Date: Fri Nov 27 15:37:06 UTC 2020 Modified Files: src/tests/lib/libc/string: t_memmem.c Log Message: delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/string/t_memmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin
Module Name:src Committed By: gson Date: Tue Nov 17 08:25:57 UTC 2020 Modified Files: src/tests/usr.bin/c++: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh t_tsan_thread_leak.sh t_tsan_vptr_race.sh src/tests/usr.bin/cc: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh t_tsan_thread_leak.sh Log Message: Mark t_tsan_*:*profile test cases as expected failures as discussed in PR toolchain/55760. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/c++/t_tsan_data_race.sh \ src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh \ src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh \ src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh \ src/tests/usr.bin/c++/t_tsan_signal_errno.sh cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/c++/t_tsan_thread_leak.sh \ src/tests/usr.bin/c++/t_tsan_vptr_race.sh cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/cc/t_tsan_data_race.sh \ src/tests/usr.bin/cc/t_tsan_heap_use_after_free.sh \ src/tests/usr.bin/cc/t_tsan_lock_order_inversion.sh \ src/tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh \ src/tests/usr.bin/cc/t_tsan_signal_errno.sh \ src/tests/usr.bin/cc/t_tsan_thread_leak.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/c++/t_tsan_data_race.sh diff -u src/tests/usr.bin/c++/t_tsan_data_race.sh:1.4 src/tests/usr.bin/c++/t_tsan_data_race.sh:1.5 --- src/tests/usr.bin/c++/t_tsan_data_race.sh:1.4 Tue Sep 15 09:33:12 2020 +++ src/tests/usr.bin/c++/t_tsan_data_race.sh Tue Nov 17 08:25:57 2020 @@ -79,6 +79,7 @@ EOF } data_race_profile_body(){ + atf_expect_fail "PR toolchain/55760" cat > test.cc << EOF #include int GlobalData; pthread_barrier_t barrier; Index: src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh diff -u src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.4 src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.5 --- src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.4 Tue Sep 15 09:33:12 2020 +++ src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh Tue Nov 17 08:25:57 2020 @@ -105,6 +105,7 @@ EOF } heap_use_after_free_profile_body(){ + atf_expect_fail "PR toolchain/55760" cat > test.cc << EOF #include #include Index: src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh diff -u src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.4 src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.5 --- src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.4 Tue Sep 15 09:33:12 2020 +++ src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh Tue Nov 17 08:25:57 2020 @@ -85,6 +85,7 @@ EOF } lock_order_inversion_profile_body(){ + atf_expect_fail "PR toolchain/55760" cat > test.cc << EOF #include Index: src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh diff -u src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh:1.4 src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh:1.5 --- src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh:1.4 Tue Sep 15 09:33:12 2020 +++ src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh Tue Nov 17 08:25:57 2020 @@ -89,6 +89,7 @@ EOF } locked_mutex_destroy_profile_body(){ + atf_expect_fail "PR toolchain/55760" cat > test.cc << EOF #include #include Index: src/tests/usr.bin/c++/t_tsan_signal_errno.sh diff -u src/tests/usr.bin/c++/t_tsan_signal_errno.sh:1.4 src/tests/usr.bin/c++/t_tsan_signal_errno.sh:1.5 --- src/tests/usr.bin/c++/t_tsan_signal_errno.sh:1.4 Tue Sep 15 09:33:12 2020 +++ src/tests/usr.bin/c++/t_tsan_signal_errno.sh Tue Nov 17 08:25:57 2020 @@ -85,6 +85,7 @@ EOF } signal_errno_profile_body(){ + atf_expect_fail "PR toolchain/55760" cat > test.cc << EOF #include #include Index: src/tests/usr.bin/c++/t_tsan_thread_leak.sh diff -u src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.3 src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.4 --- src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.3 Mon Sep 14 15:17:53 2020 +++ src/tests/usr.bin/c++/t_tsan_thread_leak.sh Tue Nov 17 08:25:57 2020 @@ -93,6 +93,7 @@ EOF } thread_leak_profile_body(){ + atf_expect_fail "PR toolchain/55760" cat > test.cc << EOF #include #include Index: src/tests/usr.bin/c++/t_tsan_vptr_race.sh diff -u src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.3 src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.4 --- src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.3 Mon Sep 14 15:17:53 2020 +++ src/tests/usr.bin/c++/t_tsan_vptr_race.sh Tue Nov 17 08:25:57 2020 @@ -99,6 +99,7 @@ EOF } vptr_race_profile_body(){ + atf_expect_fail "PR toolchain/55760" cat > test.cc << EOF #include pthread_barrier_t barrier; Index: src/tests/usr.bin/cc/t_tsan_data_race.sh diff -u src/tests/usr.bin/cc/t_tsan_data_race.sh:1.4
CVS commit: src/tests/usr.bin
Module Name:src Committed By: gson Date: Tue Nov 17 08:25:57 UTC 2020 Modified Files: src/tests/usr.bin/c++: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh t_tsan_thread_leak.sh t_tsan_vptr_race.sh src/tests/usr.bin/cc: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh t_tsan_thread_leak.sh Log Message: Mark t_tsan_*:*profile test cases as expected failures as discussed in PR toolchain/55760. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/c++/t_tsan_data_race.sh \ src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh \ src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh \ src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh \ src/tests/usr.bin/c++/t_tsan_signal_errno.sh cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/c++/t_tsan_thread_leak.sh \ src/tests/usr.bin/c++/t_tsan_vptr_race.sh cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/cc/t_tsan_data_race.sh \ src/tests/usr.bin/cc/t_tsan_heap_use_after_free.sh \ src/tests/usr.bin/cc/t_tsan_lock_order_inversion.sh \ src/tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh \ src/tests/usr.bin/cc/t_tsan_signal_errno.sh \ src/tests/usr.bin/cc/t_tsan_thread_leak.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external
Module Name:src Committed By: gson Date: Tue Nov 10 11:00:02 UTC 2020 Modified Files: src/external: README Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/README diff -u src/external/README:1.17 src/external/README:1.18 --- src/external/README:1.17 Sun Apr 8 16:57:07 2018 +++ src/external/README Tue Nov 10 11:00:02 2020 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.17 2018/04/08 16:57:07 jmcneill Exp $ +$NetBSD: README,v 1.18 2020/11/10 11:00:02 gson Exp $ Organization of Sources: @@ -26,7 +26,7 @@ and is organized as follows: Makefile Build the package. - + dist/ The third-party source for a given package. @@ -63,7 +63,7 @@ The licenses currently used are: historical Lucent's old license: http://www.opensource.org/licenses/historical.php - + ibm-public IBM's public license: http://www.opensource.org/licenses/ibmpl.php
CVS commit: src/external
Module Name:src Committed By: gson Date: Tue Nov 10 11:00:02 UTC 2020 Modified Files: src/external: README Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: gson Date: Tue Nov 10 09:14:01 UTC 2020 Modified Files: src/usr.sbin/sysinst: util.c Log Message: Fix typos in comment To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: gson Date: Tue Nov 10 09:14:01 UTC 2020 Modified Files: src/usr.sbin/sysinst: util.c Log Message: Fix typos in comment To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/util.c diff -u src/usr.sbin/sysinst/util.c:1.55 src/usr.sbin/sysinst/util.c:1.56 --- src/usr.sbin/sysinst/util.c:1.55 Wed Nov 4 16:26:35 2020 +++ src/usr.sbin/sysinst/util.c Tue Nov 10 09:14:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.55 2020/11/04 16:26:35 martin Exp $ */ +/* $NetBSD: util.c,v 1.56 2020/11/10 09:14:01 gson Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1181,12 +1181,12 @@ entropy_add_manual(void) } /* - * Get a file by some means and return a (potentioally only + * Get a file by some means and return a (potentially only * temporary valid) path to the local copy. - * If mountpt is non empty, the caller should unmount that + * If mountpt is nonempty, the caller should unmount that * directory after processing the file. * Return success if the file is available, or failure if - * the user canelled the request or network transfer failed. + * the user cancelled the request or network transfer failed. */ static bool entropy_get_file(bool use_netbsd_seed, char *path)
CVS commit: src/tests/lib/libc/stdlib
Module Name:src Committed By: gson Date: Sun Nov 1 18:19:54 UTC 2020 Modified Files: src/tests/lib/libc/stdlib: t_mktemp.c Log Message: Make the mkstemps_basic and mkostemps_basic test cases not randomly fail when the replacement string happens to contain the letter "y". To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_mktemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdlib/t_mktemp.c diff -u src/tests/lib/libc/stdlib/t_mktemp.c:1.2 src/tests/lib/libc/stdlib/t_mktemp.c:1.3 --- src/tests/lib/libc/stdlib/t_mktemp.c:1.2 Wed Jul 1 05:37:25 2020 +++ src/tests/lib/libc/stdlib/t_mktemp.c Sun Nov 1 18:19:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mktemp.c,v 1.2 2020/07/01 05:37:25 jruoho Exp $ */ +/* $NetBSD: t_mktemp.c,v 1.3 2020/11/01 18:19:54 gson Exp $ */ /*- * Copyright (c) 2013, 2020 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mktemp.c,v 1.2 2020/07/01 05:37:25 jruoho Exp $"); +__RCSID("$NetBSD: t_mktemp.c,v 1.3 2020/11/01 18:19:54 gson Exp $"); #include @@ -136,6 +136,7 @@ ATF_TC_HEAD(mkstemps_basic, tc) ATF_TC_BODY(mkstemps_basic, tc) { char template[] = "/tmp/mktemp.XXXyyy"; + char *suffix = strchr(template, 'y'); struct stat sa; int fd; @@ -145,10 +146,7 @@ ATF_TC_BODY(mkstemps_basic, tc) ATF_REQUIRE(fd != -1); ATF_REQUIRE(strncmp(template, "/tmp/mktemp.", 12) == 0); - - char *str = strchr(template, 'y'); - - ATF_REQUIRE(strcmp(str, "yyy") == 0); + ATF_REQUIRE(strcmp(suffix, "yyy") == 0); ATF_REQUIRE(write(fd, "X", 1) == 1); ATF_REQUIRE(fstat(fd, ) == 0); ATF_REQUIRE(check_mode(sa, 0600, 0) == 0); @@ -227,6 +225,7 @@ ATF_TC_BODY(mkostemps_basic, tc) }; char template[] = "/tmp/mktemp.XXXyyy"; + char *suffix = strchr(template, 'y'); struct stat sa; size_t i; int fd; @@ -239,10 +238,7 @@ ATF_TC_BODY(mkostemps_basic, tc) ATF_REQUIRE(fd != -1); ATF_REQUIRE(strncmp(template, "/tmp/mktemp.", 12) == 0); - - char *str = strchr(template, 'y'); - - ATF_REQUIRE(strcmp(str, "yyy") == 0); + ATF_REQUIRE(strcmp(suffix, "yyy") == 0); ATF_REQUIRE(write(fd, "X", 1) == 1); ATF_REQUIRE(fstat(fd, ) == 0); ATF_REQUIRE(check_mode(sa, 0600 | flags[i], 0) == 0);
CVS commit: src/tests/lib/libc/stdlib
Module Name:src Committed By: gson Date: Sun Nov 1 18:19:54 UTC 2020 Modified Files: src/tests/lib/libc/stdlib: t_mktemp.c Log Message: Make the mkstemps_basic and mkostemps_basic test cases not randomly fail when the replacement string happens to contain the letter "y". To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_mktemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: gson Date: Sun Oct 18 13:07:31 UTC 2020 Modified Files: src/sys/net: radix.c Log Message: Suppress the "rn_init: radix functions require max_keylen be set" message when _KERNEL is defined, to avoid spurious messages from kernels that have no routable network domains. Fixes PR kern/55691. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/net/radix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/radix.c diff -u src/sys/net/radix.c:1.48 src/sys/net/radix.c:1.49 --- src/sys/net/radix.c:1.48 Mon Sep 3 16:29:35 2018 +++ src/sys/net/radix.c Sun Oct 18 13:07:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: radix.c,v 1.48 2018/09/03 16:29:35 riastradh Exp $ */ +/* $NetBSD: radix.c,v 1.49 2020/10/18 13:07:31 gson Exp $ */ /* * Copyright (c) 1988, 1989, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radix.c,v 1.48 2018/09/03 16:29:35 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radix.c,v 1.49 2020/10/18 13:07:31 gson Exp $"); #ifndef _NET_RADIX_H_ #include @@ -1119,8 +1119,10 @@ rn_init(void) } #endif if (max_keylen == 0) { +#ifndef _KERNEL log(LOG_ERR, "rn_init: radix functions require max_keylen be set\n"); +#endif return; }
CVS commit: src/sys/net
Module Name:src Committed By: gson Date: Sun Oct 18 13:07:31 UTC 2020 Modified Files: src/sys/net: radix.c Log Message: Suppress the "rn_init: radix functions require max_keylen be set" message when _KERNEL is defined, to avoid spurious messages from kernels that have no routable network domains. Fixes PR kern/55691. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/net/radix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/crypto/external/bsd/openssl
Christos Zoulas committed: > Module Name:src > Committed By: christos > Date: Sun Oct 4 19:32:48 UTC 2020 > > Modified Files: > src/crypto/external/bsd/openssl/dist/crypto/bn: bn_print.c > src/crypto/external/bsd/openssl/dist/include/openssl: bn.h > src/crypto/external/bsd/openssl/lib/libcrypto: crypto.map > > Log Message: > Add BN_oct2bn(3) for factor(6) > > > To generate a diff of this commit: > cvs rdiff -u -r1.1.1.10 -r1.2 \ > src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c > cvs rdiff -u -r1.1.1.3 -r1.2 \ > src/crypto/external/bsd/openssl/dist/include/openssl/bn.h > cvs rdiff -u -r1.8 -r1.9 \ > src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map I was going to ask for this to be reverted, but I see that it has already been done - thank you. I will nonetheless state my reasons for wanting it reverted, to keep everyone vigilant in case someone tries something like this again. Although it's not stated in the commit message, this commit also changes the behavior of BN_asc2bn() to interpret numbers with a leading zero as octal rather than decimal. This raises a huge red flag. OpenSSL is security critical code, and BN_asc2bn() is likely used for parsing numbers in text representations of security critical data. This change makes is possible to deliberately construct a text representation that will be interpreted differently on NetBSD vs. other systems, or when parsed using OpenSSL vs. another parser. For example, if an RSA key modulus is stored in a file in text form and parsed using BN_asc2bn(), it is likely possible to construct a key file that results in a secure key on another system, but a trivially factorable one on NetBSD. A large number of vulnerabilities have been caused by similar minor differences between implementations of parsers for Unicode, HTTP, SMTP, and JSON. We should not introduce another one in OpenSSL. Also, the behavior of BN_asc2bn() after the change is different from that specified in the man page. -- Andreas Gustafsson, g...@gson.org
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: gson Date: Tue Sep 29 14:08:43 UTC 2020 Modified Files: src/usr.sbin/syslogd: syslogd.c Log Message: When reporting an error before daemonizing, prefix the error message with the program name. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/usr.sbin/syslogd/syslogd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: gson Date: Tue Sep 29 14:08:43 UTC 2020 Modified Files: src/usr.sbin/syslogd: syslogd.c Log Message: When reporting an error before daemonizing, prefix the error message with the program name. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/usr.sbin/syslogd/syslogd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.132 src/usr.sbin/syslogd/syslogd.c:1.133 --- src/usr.sbin/syslogd/syslogd.c:1.132 Thu Dec 26 04:53:12 2019 +++ src/usr.sbin/syslogd/syslogd.c Tue Sep 29 14:08:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.132 2019/12/26 04:53:12 msaitoh Exp $ */ +/* $NetBSD: syslogd.c,v 1.133 2020/09/29 14:08:43 gson Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.132 2019/12/26 04:53:12 msaitoh Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.133 2020/09/29 14:08:43 gson Exp $"); #endif #endif /* not lint */ @@ -2881,7 +2881,7 @@ logerror(const char *fmt, ...) if (!daemonized && Debug) DPRINTF(D_MISC, "%s\n", outbuf); if (!daemonized && !Debug) - printf("%s\n", outbuf); + printf("%s: %s\n", getprogname(), outbuf); logerror_running = 0; }
CVS commit: src/sys/kern
Module Name:src Committed By: gson Date: Tue Sep 29 07:51:01 UTC 2020 Modified Files: src/sys/kern: kern_entropy.c Log Message: Log a message when a process blocks due to a lack of entropy. Discussed on tech-kern. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/kern/kern_entropy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_entropy.c diff -u src/sys/kern/kern_entropy.c:1.23 src/sys/kern/kern_entropy.c:1.24 --- src/sys/kern/kern_entropy.c:1.23 Fri Aug 14 00:53:16 2020 +++ src/sys/kern/kern_entropy.c Tue Sep 29 07:51:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_entropy.c,v 1.23 2020/08/14 00:53:16 riastradh Exp $ */ +/* $NetBSD: kern_entropy.c,v 1.24 2020/09/29 07:51:01 gson Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.23 2020/08/14 00:53:16 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.24 2020/09/29 07:51:01 gson Exp $"); #include #include @@ -1297,6 +1297,9 @@ entropy_extract(void *buf, size_t len, i /* Wait for some entropy to come in and try again. */ KASSERT(E->stage >= ENTROPY_WARM); + printf("entropy: pid %d (%s) blocking due to lack of entropy\n", + curproc->p_pid, curproc->p_comm); + if (ISSET(flags, ENTROPY_SIG)) { error = cv_wait_sig(>cv, >lock); if (error)
CVS commit: src/sys/kern
Module Name:src Committed By: gson Date: Tue Sep 29 07:51:01 UTC 2020 Modified Files: src/sys/kern: kern_entropy.c Log Message: Log a message when a process blocks due to a lack of entropy. Discussed on tech-kern. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/kern/kern_entropy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: gson Date: Sun Sep 20 09:08:01 UTC 2020 Modified Files: src/sys/dev/usb: ehci.c Log Message: Talk Like a Pirate Day was yesterday. To generate a diff of this commit: cvs rdiff -u -r1.281 -r1.282 src/sys/dev/usb/ehci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: gson Date: Sun Sep 20 09:08:01 UTC 2020 Modified Files: src/sys/dev/usb: ehci.c Log Message: Talk Like a Pirate Day was yesterday. To generate a diff of this commit: cvs rdiff -u -r1.281 -r1.282 src/sys/dev/usb/ehci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.281 src/sys/dev/usb/ehci.c:1.282 --- src/sys/dev/usb/ehci.c:1.281 Sun May 17 08:38:37 2020 +++ src/sys/dev/usb/ehci.c Sun Sep 20 09:08:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.281 2020/05/17 08:38:37 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.282 2020/09/20 09:08:01 gson Exp $ */ /* * Copyright (c) 2004-2012,2016,2020 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.281 2020/05/17 08:38:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.282 2020/09/20 09:08:01 gson Exp $"); #include "ohci.h" #include "uhci.h" @@ -3218,7 +3218,7 @@ ehci_close_pipe(struct usbd_pipe *pipe, } /* - * Arrrange for the hardware to tells us that it is not still + * Arrange for the hardware to tells us that it is not still * processing the TDs by setting the QH halted bit and wait for the ehci * door bell */
CVS commit: src/tests/rump/rumpnet
Module Name:src Committed By: gson Date: Wed Sep 9 09:17:14 UTC 2020 Modified Files: src/tests/rump/rumpnet: t_shmif.sh Log Message: Disable reverse DNS lookups in ping to avoid spurious test failures due to unresponsive DNS servers. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpnet/t_shmif.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpnet/t_shmif.sh diff -u src/tests/rump/rumpnet/t_shmif.sh:1.4 src/tests/rump/rumpnet/t_shmif.sh:1.5 --- src/tests/rump/rumpnet/t_shmif.sh:1.4 Mon May 13 17:55:09 2019 +++ src/tests/rump/rumpnet/t_shmif.sh Wed Sep 9 09:17:14 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_shmif.sh,v 1.4 2019/05/13 17:55:09 bad Exp $ +# $NetBSD: t_shmif.sh,v 1.5 2020/09/09 09:17:14 gson Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -61,7 +61,7 @@ crossping_body() do [ ${y} -eq ${x} ] && continue atf_check -s exit:0 -o ignore -e ignore \ - rump.ping -c 1 1.1.1.${y} + rump.ping -n -c 1 1.1.1.${y} done done }
CVS commit: src/tests/rump/rumpnet
Module Name:src Committed By: gson Date: Wed Sep 9 09:17:14 UTC 2020 Modified Files: src/tests/rump/rumpnet: t_shmif.sh Log Message: Disable reverse DNS lookups in ping to avoid spurious test failures due to unresponsive DNS servers. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpnet/t_shmif.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/rump/rumpkern
Module Name:src Committed By: gson Date: Tue Sep 1 18:40:09 UTC 2020 Modified Files: src/tests/rump/rumpkern: t_sp.sh Log Message: Format PR references consistently so that they can be automatically turned into links in HTML reports. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tests/rump/rumpkern/t_sp.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/t_sp.sh diff -u src/tests/rump/rumpkern/t_sp.sh:1.16 src/tests/rump/rumpkern/t_sp.sh:1.17 --- src/tests/rump/rumpkern/t_sp.sh:1.16 Fri Aug 28 19:35:07 2020 +++ src/tests/rump/rumpkern/t_sp.sh Tue Sep 1 18:40:09 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_sp.sh,v 1.16 2020/08/28 19:35:07 martin Exp $ +# $NetBSD: t_sp.sh,v 1.17 2020/09/01 18:40:09 gson Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -53,18 +53,18 @@ test_case_skip() test_case basic basic # test_case stress_short stress 1 -test_case_skip stress_short 50350 "fails after insane long time" +test_case_skip stress_short kern/50350 "fails after insane long time" # test_case stress_long stress 2 -test_case_skip stress_long 50350 "leftover rump_server" +test_case_skip stress_long kern/50350 "leftover rump_server" # test_case stress_killer stress 5 kill -test_case_skip stress_killer 55356 "leftover rump_server" +test_case_skip stress_killer kern/55356 "leftover rump_server" test_case fork_simple fork simple test_case fork_pipecomm fork pipecomm test_case fork_fakeauth fork fakeauth test_case sigsafe sigsafe sigsafe test_case signal signal # test_case reconnect reconnect -test_case_skip reconnect 55304 "leftover rump_server" +test_case_skip reconnect kern/55304 "leftover rump_server" basic() {
CVS commit: src/tests/rump/rumpkern
Module Name:src Committed By: gson Date: Tue Sep 1 18:40:09 UTC 2020 Modified Files: src/tests/rump/rumpkern: t_sp.sh Log Message: Format PR references consistently so that they can be automatically turned into links in HTML reports. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tests/rump/rumpkern/t_sp.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/nfsd
Module Name:src Committed By: gson Date: Wed Aug 26 13:35:12 UTC 2020 Modified Files: src/usr.sbin/nfsd: nfsd.c Log Message: Fix indentation To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/usr.sbin/nfsd/nfsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/nfsd
Module Name:src Committed By: gson Date: Wed Aug 26 13:35:12 UTC 2020 Modified Files: src/usr.sbin/nfsd: nfsd.c Log Message: Fix indentation To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/usr.sbin/nfsd/nfsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/nfsd/nfsd.c diff -u src/usr.sbin/nfsd/nfsd.c:1.71 src/usr.sbin/nfsd/nfsd.c:1.72 --- src/usr.sbin/nfsd/nfsd.c:1.71 Wed Aug 26 13:33:42 2020 +++ src/usr.sbin/nfsd/nfsd.c Wed Aug 26 13:35:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $ */ +/* $NetBSD: nfsd.c,v 1.72 2020/08/26 13:35:12 gson Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95"; #else -__RCSID("$NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $"); +__RCSID("$NetBSD: nfsd.c,v 1.72 2020/08/26 13:35:12 gson Exp $"); #endif #endif /* not lint */ @@ -329,7 +329,7 @@ daemon2_fork(void) /* child */ (void)close(detach_msg_pipe[0]); (void)write(detach_msg_pipe[1], "", 1); - return detach_msg_pipe[1]; + return detach_msg_pipe[1]; default: break; }
CVS commit: src/usr.sbin/nfsd
Module Name:src Committed By: gson Date: Wed Aug 26 13:33:42 UTC 2020 Modified Files: src/usr.sbin/nfsd: nfsd.c Log Message: Remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/usr.sbin/nfsd/nfsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/nfsd/nfsd.c diff -u src/usr.sbin/nfsd/nfsd.c:1.70 src/usr.sbin/nfsd/nfsd.c:1.71 --- src/usr.sbin/nfsd/nfsd.c:1.70 Wed Aug 26 13:32:56 2020 +++ src/usr.sbin/nfsd/nfsd.c Wed Aug 26 13:33:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $ */ +/* $NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95"; #else -__RCSID("$NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $"); +__RCSID("$NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $"); #endif #endif /* not lint */ @@ -284,7 +284,7 @@ out: * is called to complete the daemonization and signal the parent * process to exit. * - * These functions could potentially be moved to a library and + * These functions could potentially be moved to a library and * shared by other daemons. * * The return value from daemon2_fork() is a file descriptor to
CVS commit: src/usr.sbin/nfsd
Module Name:src Committed By: gson Date: Wed Aug 26 13:33:42 UTC 2020 Modified Files: src/usr.sbin/nfsd: nfsd.c Log Message: Remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/usr.sbin/nfsd/nfsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/nfsd
Module Name:src Committed By: gson Date: Wed Aug 26 13:32:57 UTC 2020 Modified Files: src/usr.sbin/nfsd: nfsd.c Log Message: Remove superfluous empty line To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/usr.sbin/nfsd/nfsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/nfsd/nfsd.c diff -u src/usr.sbin/nfsd/nfsd.c:1.69 src/usr.sbin/nfsd/nfsd.c:1.70 --- src/usr.sbin/nfsd/nfsd.c:1.69 Wed Jun 17 00:16:22 2020 +++ src/usr.sbin/nfsd/nfsd.c Wed Aug 26 13:32:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsd.c,v 1.69 2020/06/17 00:16:22 kamil Exp $ */ +/* $NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95"; #else -__RCSID("$NetBSD: nfsd.c,v 1.69 2020/06/17 00:16:22 kamil Exp $"); +__RCSID("$NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $"); #endif #endif /* not lint */ @@ -548,7 +548,6 @@ main(int argc, char *argv[]) setupsock([i], [i], i); if (set[i].fd != -1) connect_type_cnt++; - } pthread_setname_np(pthread_self(), "master", NULL);
CVS commit: src/usr.sbin/nfsd
Module Name:src Committed By: gson Date: Wed Aug 26 13:32:57 UTC 2020 Modified Files: src/usr.sbin/nfsd: nfsd.c Log Message: Remove superfluous empty line To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/usr.sbin/nfsd/nfsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: gson Date: Tue Aug 25 13:39:16 UTC 2020 Modified Files: src/tests/lib/libm: t_fmod.c Log Message: Only expect the fmod test case to fail when using qemu's TCG CPU emulation, and not under hardware virtualization such as qemu -accel nvmm. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_fmod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.