ext2fs: Stop dropping and reacquiring Giant around geom calls.
[freebsd-src.git] / bin / dd / Makefile
blobdf877c854f0f1240a04a07b9d98c811d5b3fba33
1 # @(#)Makefile 8.1 (Berkeley) 5/31/93
2 # $FreeBSD$
4 .include <src.opts.mk>
6 PACKAGE=runtime
7 PROG= dd
8 SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c
11 # Test the character conversion functions. We have to be explicit about
12 # which LC_LANG we use because the definition of upper and lower case
13 # depends on it.
16 CLEANFILES= gen
18 test: ${PROG} gen
19 .for conv in ascii ebcdic ibm oldascii oldebcdic oldibm \
20 pareven parnone parodd parset \
21 swab lcase ucase
22 @${ECHO} testing conv=${conv}
23 @./gen | \
24 LC_ALL=en_US.US-ASCII ./dd conv=${conv} 2>/dev/null | \
25 LC_ALL=en_US.US-ASCII hexdump -C | \
26 diff -I FreeBSD - ${.CURDIR}/ref.${conv}
27 .endfor
28 @${ECHO} "testing sparse file (obs zeroes)"
29 @./gen 189284 | ./dd ibs=16 obs=8 conv=sparse of=obs_zeroes 2> /dev/null
30 @hexdump -C obs_zeroes | diff -I FreeBSD - ${.CURDIR}/ref.obs_zeroes
32 @${ECHO} "testing spase file (all zeroes)"
33 @./dd if=/dev/zero of=1M_zeroes bs=1048576 count=1 2> /dev/null
34 @./dd if=1M_zeroes of=1M_zeroes.1 bs=1048576 conv=sparse 2> /dev/null
35 @./dd if=1M_zeroes of=1M_zeroes.2 bs=1048576 2> /dev/null
36 @diff 1M_zeroes 1M_zeroes.1
37 @diff 1M_zeroes 1M_zeroes.2
39 @rm -f gen 1M_zeroes* obs_zeroes
41 .if ${MK_TESTS} != "no"
42 SUBDIR+= tests
43 .endif
45 .include <bsd.prog.mk>