freebsd-src/bin/dd/Makefile
Warner Losh e9ac41698b
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, amd64, amd64) (push) Waiting to run
Remove residual blank line at start of Makefile
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
2024-07-15 16:43:39 -06:00

42 lines
1.2 KiB
Makefile

.include <src.opts.mk>
PACKAGE=runtime
PROG= dd
SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c
LIBADD= util
#
# Test the character conversion functions. We have to be explicit about
# which LC_LANG we use because the definition of upper and lower case
# depends on it.
#
CLEANFILES= gen
test: ${PROG} gen
.for conv in ascii ebcdic ibm oldascii oldebcdic oldibm \
pareven parnone parodd parset \
swab lcase ucase
@${ECHO} testing conv=${conv}
@./gen | \
LC_ALL=en_US.US-ASCII ./dd conv=${conv} 2>/dev/null | \
LC_ALL=en_US.US-ASCII hexdump -C | \
diff -I FreeBSD - ${.CURDIR}/ref.${conv}
.endfor
@${ECHO} "testing sparse file (obs zeroes)"
@./gen 189284 | ./dd ibs=16 obs=8 conv=sparse of=obs_zeroes 2> /dev/null
@hexdump -C obs_zeroes | diff -I FreeBSD - ${.CURDIR}/ref.obs_zeroes
@${ECHO} "testing spase file (all zeroes)"
@./dd if=/dev/zero of=1M_zeroes bs=1048576 count=1 2> /dev/null
@./dd if=1M_zeroes of=1M_zeroes.1 bs=1048576 conv=sparse 2> /dev/null
@./dd if=1M_zeroes of=1M_zeroes.2 bs=1048576 2> /dev/null
@diff 1M_zeroes 1M_zeroes.1
@diff 1M_zeroes 1M_zeroes.2
@rm -f gen 1M_zeroes* obs_zeroes
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
.include <bsd.prog.mk>