xref: /freebsd/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh (revision a229b00539ac080f86f984c43bf4c231762baaac)
157718be8SEnji Cooper# $NetBSD: t_ssp.sh,v 1.7 2014/04/06 19:28:59 christos Exp $
257718be8SEnji Cooper#
357718be8SEnji Cooper# Copyright (c) 2008 The NetBSD Foundation, Inc.
457718be8SEnji Cooper# All rights reserved.
557718be8SEnji Cooper#
657718be8SEnji Cooper# Redistribution and use in source and binary forms, with or without
757718be8SEnji Cooper# modification, are permitted provided that the following conditions
857718be8SEnji Cooper# are met:
957718be8SEnji Cooper# 1. Redistributions of source code must retain the above copyright
1057718be8SEnji Cooper#    notice, this list of conditions and the following disclaimer.
1157718be8SEnji Cooper# 2. Redistributions in binary form must reproduce the above copyright
1257718be8SEnji Cooper#    notice, this list of conditions and the following disclaimer in the
1357718be8SEnji Cooper#    documentation and/or other materials provided with the distribution.
1457718be8SEnji Cooper#
1557718be8SEnji Cooper# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1657718be8SEnji Cooper# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1757718be8SEnji Cooper# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1857718be8SEnji Cooper# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
1957718be8SEnji Cooper# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2057718be8SEnji Cooper# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2157718be8SEnji Cooper# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2257718be8SEnji Cooper# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2357718be8SEnji Cooper# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2457718be8SEnji Cooper# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2557718be8SEnji Cooper# POSSIBILITY OF SUCH DAMAGE.
2657718be8SEnji Cooper#
2757718be8SEnji Cooper
2857718be8SEnji Cooperh_pass()
2957718be8SEnji Cooper{
3057718be8SEnji Cooper	echo "Executing command [ $2$1 ]"
3157718be8SEnji Cooper	eval $2 atf_check -s exit:0 -o ignore -e ignore $1
3257718be8SEnji Cooper}
3357718be8SEnji Cooper
3457718be8SEnji Cooperh_fail()
3557718be8SEnji Cooper{
3657718be8SEnji Cooper	echo "Executing command [ $2$1 ]"
37f001698bSEnji Cooper	# Begin FreeBSD
388eb42fb2SEnji Cooper	ulimit -c 0
39f001698bSEnji Cooper	if true; then
40f001698bSEnji Cooper		eval $2 atf_check -s signal -o ignore -e ignore $1
41f001698bSEnji Cooper	else
42f001698bSEnji Cooper	# End FreeBSD
4357718be8SEnji Cooper	eval $2 atf_check -s signal:6 -o ignore -e ignore $1
44f001698bSEnji Cooper	# Begin FreeBSD
45f001698bSEnji Cooper	fi
46f001698bSEnji Cooper	# End FreeBSD
4757718be8SEnji Cooper}
4857718be8SEnji Cooper
4957718be8SEnji Cooperatf_test_case sprintf
5057718be8SEnji Coopersprintf_head()
5157718be8SEnji Cooper{
5257718be8SEnji Cooper	atf_set "descr" "Checks sprintf(3)"
5357718be8SEnji Cooper}
5457718be8SEnji Coopersprintf_body()
5557718be8SEnji Cooper{
5657718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_sprintf"
5757718be8SEnji Cooper
5857718be8SEnji Cooper	h_pass "$prog ok"
59f001698bSEnji Cooper	# Begin FreeBSD
60f001698bSEnji Cooper	if true; then
61f001698bSEnji Cooper		h_fail "$prog 0123456789ab"
62f001698bSEnji Cooper	else
63f001698bSEnji Cooper	# End FreeBSD
6457718be8SEnji Cooper	h_fail "$prog 0123456789"
65f001698bSEnji Cooper	# Begin FreeBSD
66f001698bSEnji Cooper	fi
67f001698bSEnji Cooper	# End FreeBSD
6857718be8SEnji Cooper}
6957718be8SEnji Cooper
7057718be8SEnji Cooperatf_test_case vsprintf
7157718be8SEnji Coopervsprintf_head()
7257718be8SEnji Cooper{
7357718be8SEnji Cooper	atf_set "descr" "Checks vsprintf(3)"
7457718be8SEnji Cooper}
7557718be8SEnji Coopervsprintf_body()
7657718be8SEnji Cooper{
7757718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_vsprintf"
7857718be8SEnji Cooper
7957718be8SEnji Cooper	h_pass "$prog ok"
80f001698bSEnji Cooper	# Begin FreeBSD
81f001698bSEnji Cooper	if true; then
82f001698bSEnji Cooper		h_fail "$prog 0123456789ab"
83f001698bSEnji Cooper	else
84f001698bSEnji Cooper	# End FreeBSD
8557718be8SEnji Cooper	h_fail "$prog 0123456789"
86f001698bSEnji Cooper	# Begin FreeBSD
87f001698bSEnji Cooper	fi
88f001698bSEnji Cooper	# End FreeBSD
8957718be8SEnji Cooper}
9057718be8SEnji Cooper
9157718be8SEnji Cooperatf_test_case snprintf
9257718be8SEnji Coopersnprintf_head()
9357718be8SEnji Cooper{
9457718be8SEnji Cooper	atf_set "descr" "Checks snprintf(3)"
9557718be8SEnji Cooper}
9657718be8SEnji Coopersnprintf_body()
9757718be8SEnji Cooper{
9857718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_snprintf"
9957718be8SEnji Cooper
10057718be8SEnji Cooper	h_pass "$prog 10"
101f001698bSEnji Cooper	# Begin FreeBSD
102f001698bSEnji Cooper	if true; then
103f001698bSEnji Cooper		h_fail "$prog 13"
104f001698bSEnji Cooper	else
105f001698bSEnji Cooper	# End FreeBSD
10657718be8SEnji Cooper	h_fail "$prog 11"
107f001698bSEnji Cooper	# Begin FreeBSD
108f001698bSEnji Cooper	fi
109f001698bSEnji Cooper	# End FreeBSD
11057718be8SEnji Cooper}
11157718be8SEnji Cooper
11257718be8SEnji Cooperatf_test_case vsnprintf
11357718be8SEnji Coopervsnprintf_head()
11457718be8SEnji Cooper{
11557718be8SEnji Cooper	atf_set "descr" "Checks vsnprintf(3)"
11657718be8SEnji Cooper}
11757718be8SEnji Coopervsnprintf_body()
11857718be8SEnji Cooper{
11957718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_vsnprintf"
12057718be8SEnji Cooper
12157718be8SEnji Cooper	h_pass "$prog 10"
122f001698bSEnji Cooper	# Begin FreeBSD
123f001698bSEnji Cooper	if true; then
124f001698bSEnji Cooper		h_fail "$prog 13"
125f001698bSEnji Cooper	else
126f001698bSEnji Cooper	# End FreeBSD
12757718be8SEnji Cooper	h_fail "$prog 11"
128f001698bSEnji Cooper	# Begin FreeBSD
129f001698bSEnji Cooper	fi
130f001698bSEnji Cooper	# End FreeBSD
13157718be8SEnji Cooper}
13257718be8SEnji Cooper
13357718be8SEnji Cooperatf_test_case gets
13457718be8SEnji Coopergets_head()
13557718be8SEnji Cooper{
13657718be8SEnji Cooper	atf_set "descr" "Checks gets(3)"
13757718be8SEnji Cooper}
13857718be8SEnji Coopergets_body()
13957718be8SEnji Cooper{
14057718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_gets"
14157718be8SEnji Cooper
14257718be8SEnji Cooper	h_pass "$prog" "echo ok |"
143f001698bSEnji Cooper	# Begin FreeBSD
144f001698bSEnji Cooper	if true; then
145f001698bSEnji Cooper		h_fail "$prog" "echo 0123456789ab |"
146f001698bSEnji Cooper	else
147f001698bSEnji Cooper	# End FreeBSD
14857718be8SEnji Cooper	h_fail "$prog" "echo 0123456789 |"
149f001698bSEnji Cooper	# Begin FreeBSD
150f001698bSEnji Cooper	fi
151f001698bSEnji Cooper	# End FreeBSD
15257718be8SEnji Cooper}
15357718be8SEnji Cooper
15457718be8SEnji Cooperatf_test_case fgets
15557718be8SEnji Cooperfgets_head()
15657718be8SEnji Cooper{
15757718be8SEnji Cooper	atf_set "descr" "Checks fgets(3)"
15857718be8SEnji Cooper}
15957718be8SEnji Cooperfgets_body()
16057718be8SEnji Cooper{
16157718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_fgets"
16257718be8SEnji Cooper
16357718be8SEnji Cooper	h_pass "$prog 10" "echo ok |"
164f001698bSEnji Cooper	# Begin FreeBSD
165f001698bSEnji Cooper	if true; then
166f001698bSEnji Cooper		h_fail "$prog 13" "echo 0123456789abc |"
167f001698bSEnji Cooper	else
168f001698bSEnji Cooper	# End FreeBSD
16957718be8SEnji Cooper	h_fail "$prog 11" "echo busted |"
170f001698bSEnji Cooper	# Begin FreeBSD
171f001698bSEnji Cooper	fi
172f001698bSEnji Cooper	# End FreeBSD
17357718be8SEnji Cooper}
17457718be8SEnji Cooper
17557718be8SEnji Cooperatf_test_case memcpy
17657718be8SEnji Coopermemcpy_head()
17757718be8SEnji Cooper{
17857718be8SEnji Cooper	atf_set "descr" "Checks memcpy(3)"
17957718be8SEnji Cooper}
18057718be8SEnji Coopermemcpy_body()
18157718be8SEnji Cooper{
18257718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_memcpy"
18357718be8SEnji Cooper
18457718be8SEnji Cooper	h_pass "$prog 10"
185f001698bSEnji Cooper	# Begin FreeBSD
186f001698bSEnji Cooper	if true; then
187f001698bSEnji Cooper		h_fail "$prog 13"
188f001698bSEnji Cooper	else
189f001698bSEnji Cooper	# End FreeBSD
19057718be8SEnji Cooper	h_fail "$prog 11"
191f001698bSEnji Cooper	# Begin FreeBSD
192f001698bSEnji Cooper	fi
193f001698bSEnji Cooper	# End FreeBSD
19457718be8SEnji Cooper}
19557718be8SEnji Cooper
19657718be8SEnji Cooperatf_test_case memmove
19757718be8SEnji Coopermemmove_head()
19857718be8SEnji Cooper{
19957718be8SEnji Cooper	atf_set "descr" "Checks memmove(3)"
20057718be8SEnji Cooper}
20157718be8SEnji Coopermemmove_body()
20257718be8SEnji Cooper{
20357718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_memmove"
20457718be8SEnji Cooper
20557718be8SEnji Cooper	h_pass "$prog 10"
206f001698bSEnji Cooper	# Begin FreeBSD
207f001698bSEnji Cooper	if true; then
208f001698bSEnji Cooper		h_fail "$prog 13"
209f001698bSEnji Cooper	else
210f001698bSEnji Cooper	# End FreeBSD
21157718be8SEnji Cooper	h_fail "$prog 11"
212f001698bSEnji Cooper	# Begin FreeBSD
213f001698bSEnji Cooper	fi
214f001698bSEnji Cooper	# End FreeBSD
21557718be8SEnji Cooper}
21657718be8SEnji Cooper
21757718be8SEnji Cooperatf_test_case memset
21857718be8SEnji Coopermemset_head()
21957718be8SEnji Cooper{
22057718be8SEnji Cooper	atf_set "descr" "Checks memset(3)"
22157718be8SEnji Cooper}
22257718be8SEnji Coopermemset_body()
22357718be8SEnji Cooper{
22457718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_memset"
22557718be8SEnji Cooper
22657718be8SEnji Cooper	h_pass "$prog 10"
227f001698bSEnji Cooper	# Begin FreeBSD
228f001698bSEnji Cooper	if true; then
229f001698bSEnji Cooper		h_fail "$prog 13"
230f001698bSEnji Cooper	else
231f001698bSEnji Cooper	# End FreeBSD
23257718be8SEnji Cooper	h_fail "$prog 11"
233f001698bSEnji Cooper	# Begin FreeBSD
234f001698bSEnji Cooper	fi
235f001698bSEnji Cooper	# End FreeBSD
23657718be8SEnji Cooper}
23757718be8SEnji Cooper
23857718be8SEnji Cooperatf_test_case strcpy
23957718be8SEnji Cooperstrcpy_head()
24057718be8SEnji Cooper{
24157718be8SEnji Cooper	atf_set "descr" "Checks strcpy(3)"
24257718be8SEnji Cooper}
24357718be8SEnji Cooperstrcpy_body()
24457718be8SEnji Cooper{
24557718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_strcpy"
24657718be8SEnji Cooper
24757718be8SEnji Cooper	h_pass "$prog 0123456"
248f001698bSEnji Cooper	# Begin FreeBSD
249f001698bSEnji Cooper	if true; then
250f001698bSEnji Cooper		h_fail "$prog 0123456789ab"
251f001698bSEnji Cooper	else
252f001698bSEnji Cooper	# End FreeBSD
25357718be8SEnji Cooper	h_fail "$prog 0123456789"
254f001698bSEnji Cooper	# Begin FreeBSD
255f001698bSEnji Cooper	fi
256f001698bSEnji Cooper	# End FreeBSD
25757718be8SEnji Cooper}
25857718be8SEnji Cooper
25957718be8SEnji Cooperatf_test_case stpcpy
26057718be8SEnji Cooperstpcpy_head()
26157718be8SEnji Cooper{
26257718be8SEnji Cooper	atf_set "descr" "Checks stpcpy(3)"
26357718be8SEnji Cooper}
26457718be8SEnji Cooperstpcpy_body()
26557718be8SEnji Cooper{
26657718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_stpcpy"
26757718be8SEnji Cooper
26857718be8SEnji Cooper	h_pass "$prog 0123456"
269f001698bSEnji Cooper	# Begin FreeBSD
270f001698bSEnji Cooper	if true; then
271f001698bSEnji Cooper		h_fail "$prog 0123456789ab"
272f001698bSEnji Cooper	else
273f001698bSEnji Cooper	# End FreeBSD
27457718be8SEnji Cooper	h_fail "$prog 0123456789"
275f001698bSEnji Cooper	# Begin FreeBSD
276f001698bSEnji Cooper	fi
277f001698bSEnji Cooper	# End FreeBSD
27857718be8SEnji Cooper}
27957718be8SEnji Cooper
28057718be8SEnji Cooperatf_test_case strcat
28157718be8SEnji Cooperstrcat_head()
28257718be8SEnji Cooper{
28357718be8SEnji Cooper	atf_set "descr" "Checks strcat(3)"
28457718be8SEnji Cooper}
28557718be8SEnji Cooperstrcat_body()
28657718be8SEnji Cooper{
28757718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_strcat"
28857718be8SEnji Cooper
28957718be8SEnji Cooper	h_pass "$prog 0123456"
29057718be8SEnji Cooper	h_fail "$prog 0123456789ABCDEF"
29157718be8SEnji Cooper}
29257718be8SEnji Cooper
29357718be8SEnji Cooperatf_test_case strncpy
29457718be8SEnji Cooperstrncpy_head()
29557718be8SEnji Cooper{
29657718be8SEnji Cooper	atf_set "descr" "Checks strncpy(3)"
29757718be8SEnji Cooper}
29857718be8SEnji Cooperstrncpy_body()
29957718be8SEnji Cooper{
30057718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_strncpy"
30157718be8SEnji Cooper
30257718be8SEnji Cooper	h_pass "$prog 10"
303f001698bSEnji Cooper	# Begin FreeBSD
304f001698bSEnji Cooper	if true; then
305f001698bSEnji Cooper		h_fail "$prog 13"
306f001698bSEnji Cooper	else
307f001698bSEnji Cooper	# End FreeBSD
30857718be8SEnji Cooper	h_fail "$prog 11"
309f001698bSEnji Cooper	# Begin FreeBSD
310f001698bSEnji Cooper	fi
311f001698bSEnji Cooper	# End FreeBSD
31257718be8SEnji Cooper}
31357718be8SEnji Cooper
31457718be8SEnji Cooperatf_test_case stpncpy
31557718be8SEnji Cooperstpncpy_head()
31657718be8SEnji Cooper{
31757718be8SEnji Cooper	atf_set "descr" "Checks stpncpy(3)"
31857718be8SEnji Cooper}
31957718be8SEnji Cooperstpncpy_body()
32057718be8SEnji Cooper{
32157718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_stpncpy"
32257718be8SEnji Cooper
32357718be8SEnji Cooper	h_pass "$prog 10"
324f001698bSEnji Cooper	# Begin FreeBSD
325f001698bSEnji Cooper	if true; then
326f001698bSEnji Cooper		h_fail "$prog 13"
327f001698bSEnji Cooper	else
328f001698bSEnji Cooper	# End FreeBSD
32957718be8SEnji Cooper	h_fail "$prog 11"
330f001698bSEnji Cooper	# Begin FreeBSD
331f001698bSEnji Cooper	fi
332f001698bSEnji Cooper	# End FreeBSD
33357718be8SEnji Cooper}
33457718be8SEnji Cooper
33557718be8SEnji Cooperatf_test_case strncat
33657718be8SEnji Cooperstrncat_head()
33757718be8SEnji Cooper{
33857718be8SEnji Cooper	atf_set "descr" "Checks strncat(3)"
33957718be8SEnji Cooper}
34057718be8SEnji Cooperstrncat_body()
34157718be8SEnji Cooper{
34257718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_strncat"
34357718be8SEnji Cooper
344f001698bSEnji Cooper	# Begin FreeBSD
34557718be8SEnji Cooper	h_pass "$prog 8"
346f001698bSEnji Cooper	if true; then
347f001698bSEnji Cooper		h_fail "$prog 11"
348f001698bSEnji Cooper	else
349f001698bSEnji Cooper	# End FreeBSD
35057718be8SEnji Cooper	h_fail "$prog 9"
351f001698bSEnji Cooper	# Begin FreeBSD
352f001698bSEnji Cooper	fi
353f001698bSEnji Cooper	# End FreeBSD
35457718be8SEnji Cooper}
35557718be8SEnji Cooper
35657718be8SEnji Cooperatf_test_case raw
35757718be8SEnji Cooperraw_head()
35857718be8SEnji Cooper{
35957718be8SEnji Cooper	atf_set "descr" "Checks raw array overflow"
36057718be8SEnji Cooper}
36157718be8SEnji Cooperraw_body()
36257718be8SEnji Cooper{
36357718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_raw"
36497e4ab09SEnji Cooper	# Begin FreeBSD
36597e4ab09SEnji Cooper	[ -x $prog ] || atf_skip "$prog is missing; skipping testcase"
36697e4ab09SEnji Cooper	# End FreeBSD
36757718be8SEnji Cooper
36857718be8SEnji Cooper	h_pass "$prog 9"
369f001698bSEnji Cooper	# Begin FreeBSD
370f001698bSEnji Cooper	if true; then
371f001698bSEnji Cooper		h_fail "$prog 12"
372f001698bSEnji Cooper	else
373f001698bSEnji Cooper	# End FreeBSD
37457718be8SEnji Cooper	h_fail "$prog 10"
375f001698bSEnji Cooper	# Begin FreeBSD
376f001698bSEnji Cooper	fi
377f001698bSEnji Cooper	# End FreeBSD
37857718be8SEnji Cooper}
37957718be8SEnji Cooper
38057718be8SEnji Cooperatf_test_case read
38157718be8SEnji Cooperread_head()
38257718be8SEnji Cooper{
38357718be8SEnji Cooper	atf_set "descr" "Checks read(2)"
38457718be8SEnji Cooper}
38557718be8SEnji Cooperread_body()
38657718be8SEnji Cooper{
38757718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_read"
38857718be8SEnji Cooper
389f001698bSEnji Cooper	# Begin FreeBSD
390f001698bSEnji Cooper	if true; then
391*a229b005SEnji Cooper	MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed"
392*a229b005SEnji Cooper	h_pass "$prog $MAX_PATH" "echo foo |"
393*a229b005SEnji Cooper	h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |"
394f001698bSEnji Cooper	else
395f001698bSEnji Cooper	# End FreeBSD
396*a229b005SEnji Cooper	h_pass "$prog 1024" "echo foo |"
397*a229b005SEnji Cooper	h_fail "$prog 1025" "echo bar |"
398f001698bSEnji Cooper	# Begin FreeBSD
399f001698bSEnji Cooper	fi
400f001698bSEnji Cooper	# End FreeBSD
40157718be8SEnji Cooper}
40257718be8SEnji Cooper
40357718be8SEnji Cooperatf_test_case readlink
40457718be8SEnji Cooperreadlink_head()
40557718be8SEnji Cooper{
40657718be8SEnji Cooper	atf_set "descr" "Checks readlink(2)"
40757718be8SEnji Cooper}
40857718be8SEnji Cooperreadlink_body()
40957718be8SEnji Cooper{
41057718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_readlink"
41157718be8SEnji Cooper
412f001698bSEnji Cooper	# Begin FreeBSD
413f001698bSEnji Cooper	if true; then
414f001698bSEnji Cooper		h_pass "$prog 512"
415f001698bSEnji Cooper		h_fail "$prog 523"
416f001698bSEnji Cooper	else
417f001698bSEnji Cooper	# End FreeBSD
41857718be8SEnji Cooper	h_pass "$prog 1024"
41957718be8SEnji Cooper	h_fail "$prog 1025"
420f001698bSEnji Cooper	# Begin FreeBSD
421f001698bSEnji Cooper	fi
422f001698bSEnji Cooper	# End FreeBSD
42357718be8SEnji Cooper}
42457718be8SEnji Cooper
42557718be8SEnji Cooperatf_test_case getcwd
42657718be8SEnji Coopergetcwd_head()
42757718be8SEnji Cooper{
42857718be8SEnji Cooper	atf_set "descr" "Checks getcwd(3)"
42957718be8SEnji Cooper}
43057718be8SEnji Coopergetcwd_body()
43157718be8SEnji Cooper{
43257718be8SEnji Cooper	prog="$(atf_get_srcdir)/h_getcwd"
43357718be8SEnji Cooper
43457718be8SEnji Cooper	h_pass "$prog 1024"
435f001698bSEnji Cooper	# Begin FreeBSD
436f001698bSEnji Cooper	if false; then
437f001698bSEnji Cooper	# End FreeBSD
43857718be8SEnji Cooper	h_fail "$prog 1025"
439f001698bSEnji Cooper	# Begin FreeBSD
440f001698bSEnji Cooper	fi
441f001698bSEnji Cooper	# End FreeBSD
44257718be8SEnji Cooper}
44357718be8SEnji Cooper
44457718be8SEnji Cooperatf_init_test_cases()
44557718be8SEnji Cooper{
44657718be8SEnji Cooper	atf_add_test_case sprintf
44757718be8SEnji Cooper	atf_add_test_case vsprintf
44857718be8SEnji Cooper	atf_add_test_case snprintf
44957718be8SEnji Cooper	atf_add_test_case vsnprintf
45057718be8SEnji Cooper	atf_add_test_case gets
45157718be8SEnji Cooper	atf_add_test_case fgets
45257718be8SEnji Cooper	atf_add_test_case memcpy
45357718be8SEnji Cooper	atf_add_test_case memmove
45457718be8SEnji Cooper	atf_add_test_case memset
45557718be8SEnji Cooper	atf_add_test_case stpcpy
45657718be8SEnji Cooper	atf_add_test_case stpncpy
45757718be8SEnji Cooper	atf_add_test_case strcat
45857718be8SEnji Cooper	atf_add_test_case strcpy
45957718be8SEnji Cooper	atf_add_test_case strncat
46057718be8SEnji Cooper	atf_add_test_case strncpy
46157718be8SEnji Cooper	atf_add_test_case raw
46257718be8SEnji Cooper	atf_add_test_case read
46357718be8SEnji Cooper	atf_add_test_case readlink
46457718be8SEnji Cooper	atf_add_test_case getcwd
46557718be8SEnji Cooper}
466