Thu Jun 25 15:43:27 2020 UTC ()
Fix pastos.


(jruoho)
diff -r1.1 -r1.2 src/tests/sbin/ifconfig/t_tap.sh
diff -r1.2 -r1.3 src/tests/usr.sbin/cpuctl/t_cpuctl.sh

cvs diff -r1.1 -r1.2 src/tests/sbin/ifconfig/t_tap.sh (expand / switch to unified diff)

--- src/tests/sbin/ifconfig/t_tap.sh 2020/06/25 14:24:46 1.1
+++ src/tests/sbin/ifconfig/t_tap.sh 2020/06/25 15:43:26 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_tap.sh,v 1.1 2020/06/25 14:24:46 jruoho Exp $ 1# $NetBSD: t_tap.sh,v 1.2 2020/06/25 15:43:26 jruoho Exp $
2# 2#
3# Copyright (c) 2020 The NetBSD Foundation, Inc. 3# Copyright (c) 2020 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Jukka Ruohonen. 7# by Jukka Ruohonen.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -40,27 +40,27 @@ manytaps_body() { @@ -40,27 +40,27 @@ manytaps_body() {
40 atf_skip "The test causes a panic (PR kern/55417)" 40 atf_skip "The test causes a panic (PR kern/55417)"
41 seq 65535 64000 > $taps 41 seq 65535 64000 > $taps
42 42
43 while read tap; do 43 while read tap; do
44 44
45 ifconfig "tap$tap" 45 ifconfig "tap$tap"
46 46
47 if [ $? -eq 0 ]; then 47 if [ $? -eq 0 ]; then
48 echo "Skipping existing tap$tap" 48 echo "Skipping existing tap$tap"
49 continue 49 continue
50 fi 50 fi
51 51
52 ifconfig "tap$tap" create 52 ifconfig "tap$tap" create
53 echo "Created $tap" 53 echo "Created tap$tap"
54 54
55 done < $taps 55 done < $taps
56} 56}
57 57
58manytaps_cleanup() { 58manytaps_cleanup() {
59 59
60 if [ -f $taps ]; then 60 if [ -f $taps ]; then
61 61
62 while read tap; do 62 while read tap; do
63 63
64 ifconfig "tap$tap" 64 ifconfig "tap$tap"
65 65
66 if [ $? -eq 0 ]; then 66 if [ $? -eq 0 ]; then

cvs diff -r1.2 -r1.3 src/tests/usr.sbin/cpuctl/t_cpuctl.sh (expand / switch to unified diff)

--- src/tests/usr.sbin/cpuctl/t_cpuctl.sh 2020/06/24 10:07:13 1.2
+++ src/tests/usr.sbin/cpuctl/t_cpuctl.sh 2020/06/25 15:43:26 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_cpuctl.sh,v 1.2 2020/06/24 10:07:13 jruoho Exp $ 1# $NetBSD: t_cpuctl.sh,v 1.3 2020/06/25 15:43:26 jruoho Exp $
2# 2#
3# Copyright (c) 2020 The NetBSD Foundation, Inc. 3# Copyright (c) 2020 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Jukka Ruohonen. 7# by Jukka Ruohonen.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -116,33 +116,33 @@ err_body() { @@ -116,33 +116,33 @@ err_body() {
116 cpuctl list > $tmp 116 cpuctl list > $tmp
117 ncpu=$(sysctl -n hw.ncpu) 117 ncpu=$(sysctl -n hw.ncpu)
118 118
119 atf_check -s exit:1 -e ignore \ 119 atf_check -s exit:1 -e ignore \
120 -o empty -x cpuctl identify -1 120 -o empty -x cpuctl identify -1
121 121
122 atf_check -s exit:1 -e ignore \ 122 atf_check -s exit:1 -e ignore \
123 -o empty -x cpuctl offline -1 123 -o empty -x cpuctl offline -1
124 124
125 atf_check -s exit:1 -e ignore \ 125 atf_check -s exit:1 -e ignore \
126 -o empty -x cpuctl nointr -1 126 -o empty -x cpuctl nointr -1
127 127
128 atf_check -s exit:1 -e ignore \ 128 atf_check -s exit:1 -e ignore \
129 -o empty -x cpuctl identify $(exp ncpu + 1) 129 -o empty -x cpuctl identify $(expr ncpu + 1)
130 130
131 atf_check -s exit:1 -e ignore \ 131 atf_check -s exit:1 -e ignore \
132 -o empty -x cpuctl offline $(exp ncpu + 1) 132 -o empty -x cpuctl offline $(expr ncpu + 1)
133 133
134 atf_check -s exit:1 -e ignore \ 134 atf_check -s exit:1 -e ignore \
135 -o empty -x cpuctl nointr $(exp ncpu + 1) 135 -o empty -x cpuctl nointr $(expr ncpu + 1)
136} 136}
137 137
138err_cleanup() { 138err_cleanup() {
139 clean 139 clean
140} 140}
141 141
142# identify 142# identify
143# 143#
144atf_test_case identify 144atf_test_case identify
145identify_head() { 145identify_head() {
146 atf_require_prog cpuctl 146 atf_require_prog cpuctl
147 atf_set "descr" "Test that cpuctl(8) identifies at least " \ 147 atf_set "descr" "Test that cpuctl(8) identifies at least " \
148 "something without segfaulting (PR bin/54220)" 148 "something without segfaulting (PR bin/54220)"