Module Name: src Committed By: christos Date: Fri Oct 8 14:45:07 UTC 2021
Modified Files: src/tests/bin/dd: t_dd.sh Log Message: Add swab tests from RVP. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/bin/dd/t_dd.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/bin/dd/t_dd.sh diff -u src/tests/bin/dd/t_dd.sh:1.1 src/tests/bin/dd/t_dd.sh:1.2 --- src/tests/bin/dd/t_dd.sh:1.1 Sat Mar 17 12:33:11 2012 +++ src/tests/bin/dd/t_dd.sh Fri Oct 8 10:45:07 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_dd.sh,v 1.1 2012/03/17 16:33:11 jruoho Exp $ +# $NetBSD: t_dd.sh,v 1.2 2021/10/08 14:45:07 christos Exp $ # # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. @@ -122,9 +122,26 @@ seek_body() { atf_check_equal $st_size 8 } +atf_test_case swab +swab_head() { + atf_set "descr" "Tests conv=swab" +} + +swab_body() { + echo -n abcdefgh > testfile + atf_check -s exit:0 -e ignore -o inline:badcfehg \ + dd if=testfile conv=swab msgfmt=quiet + atf_check -s exit:0 -e ignore -o inline:abcdefgh \ + dd if=testfile conv=swab msgfmt=quiet bs=1 + for i in 2 4 8; do + atf_check -s exit:0 -e ignore -o inline:badcfehg \ + dd if=testfile conv=swab msgfmt=quiet bs=$i + done +} atf_init_test_cases() { atf_add_test_case length atf_add_test_case io atf_add_test_case seek + atf_add_test_case swab }