Module Name: src Committed By: pooka Date: Wed Aug 4 13:15:15 UTC 2010
Modified Files: src/tests: Makefile Added Files: src/tests/dev: Makefile src/tests/dev/audio: Atffile Makefile h_pad.c h_pad_musa.c t_pad.sh t_pad_output.bz2 Log Message: Add test of pad(4): stuff some audio into /dev/audio, read it from /dev/pad. Test that we got sensible output by comparing against a previous audibly good result. This exercises auconv, audio and pad. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/tests/Makefile cvs rdiff -u -r0 -r1.1 src/tests/dev/Makefile cvs rdiff -u -r0 -r1.1 src/tests/dev/audio/Atffile \ src/tests/dev/audio/Makefile src/tests/dev/audio/h_pad.c \ src/tests/dev/audio/h_pad_musa.c src/tests/dev/audio/t_pad.sh \ src/tests/dev/audio/t_pad_output.bz2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/Makefile diff -u src/tests/Makefile:1.22 src/tests/Makefile:1.23 --- src/tests/Makefile:1.22 Sat Jul 17 19:26:27 2010 +++ src/tests/Makefile Wed Aug 4 13:15:15 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2010/07/17 19:26:27 jmmv Exp $ +# $NetBSD: Makefile,v 1.23 2010/08/04 13:15:15 pooka Exp $ .include <bsd.own.mk> @@ -8,7 +8,7 @@ SUBDIR= crypto games ipf util .if ${MKATF} != "no" -SUBDIR+= fs include kernel lib libexec net rump sys syscall +SUBDIR+= dev fs include kernel lib libexec net rump sys syscall . if ${MACHINE} != "evbppc" && ${MKKMOD} != "no" SUBDIR+= modules Added files: Index: src/tests/dev/Makefile diff -u /dev/null src/tests/dev/Makefile:1.1 --- /dev/null Wed Aug 4 13:15:15 2010 +++ src/tests/dev/Makefile Wed Aug 4 13:15:15 2010 @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 2010/08/04 13:15:15 pooka Exp $ +# + +.include <bsd.own.mk> + +TESTSDIR= ${TESTSBASE}/dev + +TESTS_SUBDIRS+= audio + +.include <bsd.test.mk> Index: src/tests/dev/audio/Atffile diff -u /dev/null src/tests/dev/audio/Atffile:1.1 --- /dev/null Wed Aug 4 13:15:15 2010 +++ src/tests/dev/audio/Atffile Wed Aug 4 13:15:15 2010 @@ -0,0 +1,6 @@ +Content-Type: application/X-atf-atffile; version="1" +X-NetBSD-Id: "$NetBSD: Atffile,v 1.1 2010/08/04 13:15:15 pooka Exp $" + +prop: test-suite = "NetBSD" + +tp-glob: t_* Index: src/tests/dev/audio/Makefile diff -u /dev/null src/tests/dev/audio/Makefile:1.1 --- /dev/null Wed Aug 4 13:15:15 2010 +++ src/tests/dev/audio/Makefile Wed Aug 4 13:15:15 2010 @@ -0,0 +1,23 @@ +# $NetBSD: Makefile,v 1.1 2010/08/04 13:15:15 pooka Exp $ +# + +.include <bsd.own.mk> + +TESTSDIR= ${TESTSBASE}/dev/audio +FILESDIR= ${TESTSDIR} + +TESTS_SH= t_pad +TESTS_C= h_pad + +ATFFILE= yes # for h_pad ... or rather not for it + +LDADD+= -lrumpdev_pad -lrumpdev_audio -lrumpdev -lrumpvfs +LDADD+= -lrump +LDADD+= -lrumpuser -lpthread + +FILES= t_pad_output.bz2 + +WARNS= 4 +NOMAN= + +.include <bsd.test.mk> Index: src/tests/dev/audio/h_pad.c diff -u /dev/null src/tests/dev/audio/h_pad.c:1.1 --- /dev/null Wed Aug 4 13:15:15 2010 +++ src/tests/dev/audio/h_pad.c Wed Aug 4 13:15:15 2010 @@ -0,0 +1,76 @@ +/* $NetBSD: h_pad.c,v 1.1 2010/08/04 13:15:15 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/types.h> + +#include <rump/rump.h> +#include <rump/rump_syscalls.h> + +#include <err.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#include "h_pad_musa.c" + +/* + * Stuff some audio into /dev/audio, read it from /dev/pad. Use in + * conjunction with t_pad, which tests that we got sensible output + * by comparing against a previous audibly good result. + */ + +#define BUFSIZE 1024 + +int +main(int argc, char *argv[]) +{ + char buf[BUFSIZE]; + char zeros[BUFSIZE]; + int padfd, audiofd; + ssize_t n; + + rump_init(); + audiofd = rump_sys_open("/dev/audio0", O_RDWR); + if (audiofd == -1) + err(1, "open audio"); + + padfd = rump_sys_open("/dev/pad0", O_RDONLY); + if (padfd == -1) + err(1, "open pad"); + + if ((n = rump_sys_write(audiofd, musa, sizeof(musa))) != sizeof(musa)) + err(1, "write"); + + memset(zeros, 0, sizeof(zeros)); + while ((n = rump_sys_read(padfd, buf, sizeof(buf))) > 0) { + if (memcmp(buf, zeros, sizeof(buf)) == 0) + break; + write(STDOUT_FILENO, buf, n); + } +} Index: src/tests/dev/audio/h_pad_musa.c diff -u /dev/null src/tests/dev/audio/h_pad_musa.c:1.1 --- /dev/null Wed Aug 4 13:15:15 2010 +++ src/tests/dev/audio/h_pad_musa.c Wed Aug 4 13:15:15 2010 @@ -0,0 +1,173 @@ +unsigned musa[] = { +0x6776db46, 0x67fcff61, 0x79dbe9ff, 0x795b535d, 0x5b6765ef, 0x66726767, +0xf5e75b4f, 0xe761535e, 0x6767535c, 0x60545b67, 0x5befec4e, 0xff696f5b, +0x67775371, 0x5b5b5b67, 0x6d676c75, 0x63ff7e67, 0x5b676166, 0x5f67675b, +0x5b5b645b, 0x5d5c5355, 0x5e635367, 0x5b51f5e7, 0x5b675e5e, 0x6767ff67, +0x5c676ee9, 0xff7a6760, 0x5b58ffe7, 0x55676e64, 0xffffff5f, 0x535b56ff, +0x5854675b, 0x676e6767, 0x6767585c, 0x7064655b, 0xfc675b5b, 0xecfff2f7, +0xff676773, 0x67ff7467, 0x72675e5e, 0x5d677c77, 0x555b675b, 0x60675c67, +0x54615b5b, 0x75e85b67, 0x62ff67e2, 0xe8ff5b5b, 0xee6ae7ff, 0x67ff6778, +0xff6aff7a, 0x71ff67ff, 0xfe5e6cfd, 0xffe76dff, 0xff5b68ec, 0x69eb6a5c, +0x6767ff60, 0xecdf7a67, 0x5b5b5b55, 0x72775c71, 0xff6de768, 0xe7dbffff, +0xffffdbde, 0x6778ee69, 0x5b5beaef, 0xff6f5d67, 0x676767ff, 0xff5b5461, +0x675b6767, 0x676767f4, 0x67f2655b, 0xe7e7e7ff, 0xffffffff, 0xfcdbffff, +0x5b7df2f7, 0xe25e6756, 0x6775677f, 0x6766636d, 0x5b5b5b5b, 0xe76af065, +0x6fff675f, 0xff5b677b, 0xff6772ff, 0x67ffffff, 0xffff6d7e, 0xeeff67ff, +0x6affffe7, 0x677ae7e7, 0x67ffffff, 0x67ffff67, 0x5b5c6767, 0xdb677f67, +0x5cecdefe, 0x6e675b61, 0xfffe6767, 0xffe7ffe7, 0xe7d9e6ff, 0x6873ffff, +0xe7e7556c, 0x715b67ec, 0xfffffffd, 0x535b6771, 0x5d5b5e5e, 0x67677079, +0xff675c60, 0xffff757d, 0xffffece7, 0xf767fde7, 0xe96bf1dc, 0x6f7a79ff, +0x5bfff9fa, 0x77675b53, 0x5b676667, 0x67675b67, 0xf37e7574, 0x67675c67, +0xea6a675c, 0xff67ffff, 0xffdf787b, 0xf6fdeedd, 0x74ffe767, 0xfee76767, +0x615cecff, 0xf85b6ae7, 0x6579effb, 0x60675b5f, 0xfff25567, 0x675b61e7, +0x5e5e5b67, 0xe867f3e8, 0xe7ffdde7, 0xff70f7db, 0xffff6fff, 0x60ff67e7, +0xff6e5d5c, 0x6767ffec, 0x675b5b67, 0x67ffff5c, 0x6067676e, 0x67676767, +0xffff7067, 0xffffff67, 0xfffff6fd, 0xe2fffff5, 0xff67676c, 0x5b63ff67, +0x677b5b67, 0x5b495d67, 0xdfffe767, 0x553b4de5, 0x4166bfbe, 0x47d3c35b, +0x67cf7943, 0xbcc4513e, 0xdf503e6d, 0xcad4f9e7, 0xafee3746, 0x4b3440ba, +0x3956c7c9, 0x4fbcc546, 0xc8bc4f33, 0xb67e394b, 0x45394bbc, 0x41ecc1cc, +0x48cec54a, 0x59c4c94c, 0xdbd95341, 0xcddd5656, 0xda5c4edf, 0x5b5bf0c6, +0x71674f53, 0xfa4f4953, 0x4d5bffd9, 0xcb5e455b, 0x494963cd, 0x45d3c9df, +0xccbfdf4b, 0xb4c6393e, 0x693c44c9, 0x3745cdbe, 0x62bdc446, 0xcebe4d3c, +0xc747323d, 0x423f69c2, 0x4bcbbdce, 0xc1cc4738, 0x42efdbd7, 0xced85f3f, +0x51ffdbe7, 0xe773ffff, 0xd46b7ae7, 0x6f7a5d66, 0xdcd3ed55, 0x535b506b, +0x504c686e, 0xe7c5d054, 0xdddc4948, 0x4e3a5cff, 0x4adac1ce, 0x6767675c, +0xd3f05a52, 0xdbcdd7d3, 0xcf575bed, 0x4d4751d4, 0xffe65d48, 0xf4cf7959, +0xc1d04c46, 0x413c4ccf, 0x3ed5bde0, 0xd4c54e3e, 0x74565361, 0x4ee6c7cd, +0xe0ced96b, 0xd2544a52, 0x464de8d2, 0xeeeb694d, 0x7dffff5d, 0x674a5567, +0xf5dbffff, 0xdc715368, 0x4d54ebe7, 0xeddbdc6b, 0xcefb4f4b, 0x4b4a53db, +0x65c5c3e4, 0xdb674c40, 0xe75bfee7, 0xfc6f615c, 0x5b67ff60, 0x65e7654b, +0x525a6f5a, 0x55d1cd7a, 0x544cdb5c, 0x4c54d6d1, 0xef4fdb72, 0xed4e65db, +0x6f4fd0c9, 0xe75b56ff, 0xf7e6655f, 0xdd4c464c, 0x45515edc, 0xfac6df56, +0xd955494c, 0x4d535fe6, 0x70e7e74f, 0x6971785b, 0x5be9cddb, 0xd9e7684d, +0x535175d3, 0x67e6d36b, 0x4e495359, 0x5e6a6765, 0xf049534b, 0x4e63dbe7, +0xcdfcff77, 0x4f4953e3, 0xd4614b5b, 0xe0e7ebd0, 0x61e7ffeb, 0x6dd3ef49, +0xffe7fb53, 0x4179cefc, 0x4f424843, 0xccccc1cf, 0x454064c9, 0xd7eb7861, +0x463d4fdd, 0xdb6c4b4d, 0xe4d1cac8, 0x68514552, 0xeccdd3d8, 0x56534e59, +0x7c556e7d, 0xd3d4f867, 0x5a5355de, 0xd1cd5642, 0x57c9cdd3, 0x3b35353c, +0xbdb7bce2, 0x41476acb, 0x775a7152, 0xdbe7cecd, 0x3f3c4659, 0xc0c1e358, +0x4558e9c1, 0xe7e2674e, 0x4769d3d3, 0x674a4544, 0xd56e7cdd, 0xdfddffdf, +0xd3d8644d, 0x5cbdbcca, 0x342c2d35, 0xaeabb7e8, 0x3943c6b1, 0x674a3438, +0xcdd2675b, 0x3e52ced3, 0xc9654739, 0x73bfb3b4, 0x66433a4b, 0xcdc8ccce, +0x3c3f48ea, 0xc972493f, 0x67cacbc1, 0xb5e63d38, 0x4cb1a8ab, 0x32231f28, +0xa5a2aac4, 0x292f53b6, 0xe74b2f2b, 0x4ddbc9c9, 0xcdd2ff50, 0x3c3748e5, +0xadb4c955, 0x394ac9b3, 0xccde493d, 0x3c4bd9c1, 0xff523f38, 0xcfc5cada, +0x54373c4b, 0xada7a8c1, 0x1f1e2350, 0x9fa2c231, 0x2536bba4, 0xbbea3427, +0x3b4cbcb6, 0xc2e14337, 0x494955da, 0xbab8c15e, 0x4a62dbbd, 0x5bfde366, +0x45494549, 0x535b5351, 0x5f6de767, 0xc5d45b67, 0x6e3f355e, 0xb4a4aabe, +0x231d283d, 0xa3a6af44, 0x292a51b2, 0xb0af693a, 0x282d47c3, 0xb8c24d31, +0x3b3a52bc, 0xa9a6b0de, 0x282b40c1, 0xb6b7662f, 0x383dd6b6, 0xe7573d30, +0xf5ddcfc2, 0xcd784d46, 0x49393ccb, 0xa09fa7bf, 0x171e39bd, 0xa2bd3a1e, +0x2c60aca4, 0xb2dc3229, 0x2a38c7bc, 0xb2532e28, 0x42c5afad, 0xaaba793f, +0x293ebfa7, 0xb5522d26, 0x3cbfafad, 0x4d372d2f, 0xd3c3bebd, 0x45484966, +0x375dc37d, 0xa3ba783f, 0x2466a99d, 0xd92b1c19, 0xc5a69fab, 0xf3333343, +0x374ebfbc, 0x65332728, 0xbfadaab5, 0xdb41425f, 0xccacacb5, 0x29202535, +0xababb14e, 0x282a42bb, 0xb4c74a2d, 0x3b46c8b4, 0xb1be3f37, 0x4149484d, +0xab9d9cb6, 0x1c141c5d, 0x9da3ca2d, 0x385ab7a9, 0x3e445b36, 0x382d2e39, +0xadb3c942, 0x5adcbcaf, 0xc7604d4a, 0x3fcab7b5, 0x4a30282e, 0xb6aaa8b5, +0x2d272e47, 0xb2adbd51, 0x38393aed, 0x4eb0c93c, 0xadee3f36, 0x32b29e9b, +0x2d1b1217, 0x9e989dc4, 0x2b2d5fae, 0x3f3d322c, 0x5f4c3d38, 0xacaeafc2, +0x3c41d9b9, 0xc05c3d3c, 0x3bbcafae, 0x4b2a2428, 0xbeaba8b5, 0x33292a40, +0xc9b4bb54, 0x3d3d4a63, 0x48bbb94a, 0xa5bd5d37, 0x23c6a19a, 0x39201113, +0xa29799aa, 0x282c45b9, 0x38342e2a, 0xc56b4335, 0xb5adadba, 0x343241cc, +0xc6d3e341, 0xe2bebbbc, 0x322b2a38, 0xaeadb85c, 0x2c3659bb, 0xb6c25731, +0x3b45d1bb, 0xafaa5336, 0x4c4a3b33, 0x48ad9ca8, 0x2e19131e, 0x9c949dc5, +0x242d70b0, 0x46362d28, 0xc0d34e4b, 0xbcaeafb6, 0x34303fe4, 0xbabbc85d, +0xc9f0e4c4, 0x2e303879, 0xafb95636, 0x364dc3b1, 0x6b3c3a38, 0xd3d0cad9, +0xc35f5bf9, 0x3d3446ba, 0xaba3b551, 0x211f32d0, 0xa5adf42f, 0x3dfeb9a8, +0x48453d38, 0x6b4d4948, 0xbebebecb, 0x454a5acd, 0xc1ce714e, 0x677ddfc4, +0x4c6ce7f3, 0xe94c4041, 0xd0c5c1c3, 0x42434658, 0xd5fa4f49, 0x71d0c5c9, +0xd7d94f49, 0xcd463133, 0x3caea0a9, 0x351e191e, 0xa99e9fb5, 0x303647ca, +0x32343b34, 0xb9d14e3b, 0x66c9b7b0, 0x4b413b44, 0xcdbcbbd1, 0xe6ef535c, +0x2f2c3557, 0xb7bc4944, 0x3b77e7c4, 0x49423f2f, 0xb7b1593e, 0xd2c2ed62, +0xafc33636, 0xa63a212d, 0x2bc0a49c, 0x37181a21, 0xa7a9a0a3, 0x2b264bb1, +0x2c434f37, 0xb5b9c82f, 0x596ee6cf, 0xba522f3f, 0xc3b8c3d8, 0x2f6db5c4, +0xed332b27, 0x70b3adbb, 0x424d4035, 0xc8ea483e, 0xcebec6db, 0x3f343c6d, +0xf0ddd5c9, 0x6a6e4dde, 0x48bfb4ca, 0x3f31292d, 0xb0abbf53, 0x525bf0c2, +0x3e36393e, 0xb9bccf5b, 0x4f4d63bd, 0x4d4c675b, 0xb6bac85f, 0x2c37e7be, +0xbfd53e32, 0x4fdac2bc, 0x3736393c, 0xb8b8be4f, 0x5355d6c5, 0xe7ff594d, +0xc8dbded6, 0x566768db, 0xfce35054, 0x54454652, 0xeccdc9d7, 0x5b4e505d, +0x5760e75b, 0xcec8de5c, 0x5e6767ff, 0xef4d454f, 0xffcfc4c6, 0x5f495257, +0xd2d7c9d1, 0x3f63d2c9, 0x674f423c, 0xffe2e2db, 0xe77e675b, 0xd9675bec, +0x4e79e7d3, 0x6079555b, 0xffdb7854, 0x6cdc5a57, 0xff627eff, 0xdcde5e5b, +0xe7e967e7, 0xe7e0e7dd, 0x5a5af0ce, 0x67e76a6f, 0x494ef0e5, 0xe7dc5d45, +0xf4e7e7d3, 0x53594f5c, 0x57ffffff, 0xe46fe957, 0x67deefd3, 0xd8ddffe7, +0x5c58e7e7, 0x4f5b5b67, 0xd6f6675b, 0x677767db, 0x705b5557, 0x5e5b6767, +0xffe75fff, 0xe7ebff5b, 0xe7dbffff, 0x5effffe7, 0x6c6dff67, 0x69ff72e7, +0xdb676760, 0x5b6f7aed, 0x67ff6778, 0x67677dff, 0x5b6d5b5b, 0x67dc5e74, +0x5f79cedb, 0x556f67e7, 0xdfe5f960, 0x69fdddff, 0x67675bff, 0x7376dc78, +0x5b62f568, 0xe7e8ff73, 0xe771fce3, 0x6553586b, 0xff677a6f, 0x5b5b677b, +0x76666e53, 0x67d6feed, 0xfee7f47f, 0x72ffffff, 0xff7167eb, 0xdb6a6f67, +0x6e6be770, 0x535b677c, 0x675c4d4d, 0xe7e2e7f4, 0x67675efe, 0x5fffebe7, +0x67ef6767, 0xe7ffff5b, 0x71e7e7db, 0x7dffeb67, 0xede7ed62, 0x63e7ff75, +0x665b5f66, 0x67ffffe7, 0x5d5fe76a, 0x6bff5b67, 0xe7ffe75f, 0x676d56e8, +0x6653ff59, 0xf66767d0, 0x67ffff68, 0xdcddeadf, 0x505cde5d, 0xffe771db, +0x676cff72, 0xff5b5b67, 0xffe85bff, 0x675b535b, 0xfbdb7467, 0xe77aed70, +0x64675bec, 0xe7e8e152, 0x74de6873, 0x68dbdb68, 0x6effff5b, 0x53605c67, +0x5261705a, 0xe75bff5b, 0x7c6ef8fb, 0x5b7d785d, 0x5b5b7eff, 0x5cff6d67, +0xe7e7f772, 0x6a5fff67, 0xf9e767ff, 0x6067ff67, 0x6667ff5c, 0xe7e7ff63, +0xf55ee76d, 0x675667fe, 0x6767ffe7, 0xd65c4b78, 0xffe7df5d, 0xff775bff, +0x7e53ffff, 0x56e76d5b, 0xf6e7fd73, 0x5b6ffffd, 0xff7beefb, 0x55535b79, +0x5a495853, 0xffffdc6e, 0xdb6767e8, 0x5b545667, 0x5b584d51, 0xff5df1ea, +0xd7e5dae7, 0x67efeade, 0x675b60ff, 0xeb506753, 0x675b675b, 0xff654aed, +0xdd57d55b, 0x3cbe5cff, 0x685c47d3, 0x4dd34d63, 0xbe5f5bf6, 0x74e2db50, +0xce4fd8e7, 0x5f41445f, 0xeb5d3d4e, 0xffddd35c, 0xca53bdd7, 0xf4d1435e, +0x475b6738, 0x59675b56, 0xc5c55746, 0x4b3fe4bc, 0xcdc8ec37, 0x4048d749, +0xcabdd9e8, 0x52ddcc55, 0xc1e64c3a, 0x61e74d74, 0xfacb3d4e, 0x7ceb5b5b, +0xfa5fff5d, 0x675e3c45, 0x78dde9d0, 0x5bc7ed3f, 0xcfff7553, 0xf66d67ce, +0xfce7f968, 0x454be1fb, 0xeadf534e, 0xe4e569df, 0x3c566772, 0x5359e74a, +0x4d466749, 0xebc1c6d7, 0xffdd60e7, 0xe7ea67e7, 0x49cdd54d, 0xcacd4946, +0x4c72dbda, 0x5becde68, 0x3c5b4dd9, 0xdd48fc5a, 0x4d57fc4a, 0xdc677a5f, +0xe9cdd0c2, 0x43454dd7, 0x405be7d8, 0xcef5d95b, 0xcaddd8e3, 0xeecfff6b, +0x675d4b5b, 0xe05ff64c, 0xe7d777ff, 0x5e5c53e7, 0x615be759, 0x5c4a3b68, +0xc9ef4058, 0xcee653f4, 0xcee55bf5, 0x5253c6d0, 0x5c4af7e7, 0xf56861ff, +0xcbff7e4b, 0x5cff58da, 0x4f5a4d6a, 0x5e5f5d5e, 0x4dd653e7, 0x61ebe6e0, +0x5c654feb, 0x5e534d5e, 0x59ff675b, 0xeb55eaeb, 0x686ebfc5, 0x5760d5ce, +0x59466bdb, 0x6a3f4dda, 0xe75448dc, 0x524a68cc, 0x5be4c2d7, 0x77435753, +0x534feddf, 0xd57c6afa, 0xdd696e55, 0xffd6ffcb, 0xc2ed434d, 0x794d4dcd, +0x535fdad1, 0xe2da534a, 0x5b675d4f, 0x5560dd54, 0x5ed4f2e7, 0x4f6253e7, +0x4d57d35b, 0x5b5bec73, 0xf953fb5f, 0xdacd5ffa, 0x67cd6e68, 0x5beed9f9, +0x754a4c59, 0x5459ff4c, 0x54eced45, 0xd36cc977, 0x4c66725e, 0x53554ed5, +0x7a4952ff, 0xe7d867e8, 0xed7f67d1, 0x5e67fee2, 0x5b5953dc, 0x585dff67, +0x67ef5a53, 0xd36bee79, 0x5debd5f1, 0xdb635654, 0x76dc59e2, 0x5d535353, +0xe75f5754, 0x57d0cff0, 0x775bded7, 0x595bd760, 0x6d7653d7, 0x7f4dec5c, +0xe35cff5e, 0xf75f5bf1, 0x7b64605d, 0x53ea556f, 0x5b715b5b, 0x6366675d, +0xd9ffe8e7, 0x68e7f4d3, 0x6a5cd6ed, 0x53657c77, 0x674f4d65, 0x7053655b, +0xff5bdd5d, 0xe9fcdaeb, 0x6d67ff4c, 0x5b5b6753, 0xdb4d5f5b, 0xeae6ff5b, +0xe7e5efea, 0xffe0dae7, 0x684ee767, 0xec5c5950, 0xf55be7ff, 0xe7f673fe, +0x6eeb63ff, 0x65685d67, 0xffff575b, 0x5f5dffe0, 0x68ffff68, 0x74675ede, +0xf67368ff, 0xfcffe7fd, 0x67e7ffdf, 0x7adfea67, 0x5bff675b, 0x56535b60, +0x6774f5fe, 0x6d67ff62, 0xe7727d5b, 0x655be75c, 0xef6afff0, 0x6967e4fa, +0xe3db5bff, 0xe77667df, 0x67ff5b7e, 0x615ce767, 0x645bea53, 0x675d7c65, +0x5b5d676f, 0xffd7fffb, 0x6c676add, 0xe2ece856, 0xfe6c675b, 0x53e6605e, +0xf85f7c67, 0xffe767fb, 0xdfdbe7e7, 0x5c615567, 0xe769536c, 0x5662675b, +0xe8676167, 0xdbdd77db, 0xff5b67eb, 0x67676f5d, 0xe067ffe7, 0x67e4ebe9, +0x756767ff, 0xfff47f5b, 0x5b7772ff, 0xe7675b67, 0x5d6f7a5b, 0x604d61ea, +0xff5979e7, 0x675e567d, 0xdee75b59, 0x6ff77e75, 0xfcf06766, 0x7eff67e7, +0x67676a6a, 0x7767eeff, 0x616767ee, 0x67676767, 0x5b5ce751, 0x67725cff, +0xff5dff67, 0x575e6a53, 0xfbe7ea5d, 0xe7fce7e7, 0xf3ffffdb, 0xffff67e7, +0x5b6676e7, 0x64ff69ff, 0x5bea604e, 0x5b676767, 0x67575b67, 0xe7e7ee77, +0x62ffffed, 0xff6c675b, 0x5adc6c5b, 0x7971675d, 0xffe7d367, 0xe0fffbe7, +0x67e76766, 0x6767e776, 0x5e6dff5e, 0xff6c6168, 0x5fe95d53, 0x675be955, +0x57fa5f67, 0x676be766, 0xffe7ffff, 0x74ffedd8, 0xe76768ec, 0x7cffee68, +0x675a64f1, 0x5b676553, 0x5d677079, 0xf2ff544f, 0xe8e7767d, 0x5bffde75, +0x76ed5b75, 0x7b676e66, 0x5b67675f, 0xf7efdd5d, 0xe3e660da, 0xfff6fd61, +0x53596267, 0xff5b6d74, 0x6f72675b, 0xe76bff5b, 0xef6767e7, 0x67606add, +0x6365e7e7, 0x7462e9f3, 0xe7f5ff67, 0x5368ffff, 0xe7ff696b, 0x5579f0e7, +0x67ff5d53, 0x7a6ef8db, 0x515bff53, 0x5e5e675e, 0x5b5b6767, 0xe7675b5b, +0xeaf07b78, 0x7967ff67, 0x6ef8e7ff, 0xff61ffe9, 0x755b6758, 0x675bff67, +0x5b5b6d67, 0x5b675d5f, 0x79675b53, 0x67e9f0ff, 0x6e675b60, 0xe8e7ff67, +0x6767f46c, 0xff6ddcf5, 0xff676eff, 0x5cf7f865, 0xffd7ffea, 0x5d5b70ff, +0x6e5366ff, 0x67ff7666, 0x735b5367, 0xdde76776, 0x655bff67, 0x6fff6767, +0x6967797a, 0xe7e7eee7, 0xe74dffe7, 0x7f67ffe8, 0x6d6767ff, 0x6b67e758, +0x5d675bff, 0xfe59525b, 0x53ff7853, 0x515b7263, 0xf4ec5c5b, 0xfed6d9e7, +0xff5b63ed, 0x67ff7c67, 0x67676fe9, 0x67e4dbff, 0x5b5f675c, 0x755b5b5b, +0xe7676767, 0x67675b67, 0xffe9675f, 0xeae7655b, 0x677aff7a, 0x5b6b675f, +0x67616767, 0x5be8ff67, 0xe7e7e7ff, 0x5c67e7e7, 0xff675b5b, 0x676fea67, +0x534e6767, 0xdd5979e9, 0xe8dde3d4, 0xd17f625b, 0x6eed536d, 0x67676766, +0x6769ff67, 0xdb6f5dea, 0xf7e75b5f, 0x73ece8d0, 0x67f4675b, 0x5b5b6774, +0x5553665b, 0x5c5b715b, 0x4d4eed70, 0xfb6fe76a, 0x7767dfd5, 0xede7fd72, +0x6774ff68, 0x6e68ff61, 0x5a675b53, 0x5eddff5a, 0x4dffea57, 0x6753f86b, +0x537bf267, 0x67565b58, 0xff6cf4e7, 0xee68ffe7, 0x67f17c77, 0xff6a5fe7, +0x60ffffff, 0x5472e7fc, 0x67676776, 0x674fdbd9, 0x67565b5b, 0x7bea4ee7, +}; Index: src/tests/dev/audio/t_pad.sh diff -u /dev/null src/tests/dev/audio/t_pad.sh:1.1 --- /dev/null Wed Aug 4 13:15:15 2010 +++ src/tests/dev/audio/t_pad.sh Wed Aug 4 13:15:15 2010 @@ -0,0 +1,48 @@ +# $NetBSD: t_pad.sh,v 1.1 2010/08/04 13:15:15 pooka Exp $ +# +# Copyright (c) 2010 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +atf_test_case pad_output +pad_output_head() +{ + + atf_set "descr" "Check pad driver output against known-good output" + atf_set "use.fs" "true" +} + +pad_output_body() +{ + + atf_check -s exit:0 -o save:expout \ + bunzip2 -c $(atf_get_srcdir)/t_pad_output.bz2 + atf_check -s exit:0 -o file:expout $(atf_get_srcdir)/h_pad +} + +atf_init_test_cases() +{ + + atf_add_test_case pad_output +} Index: src/tests/dev/audio/t_pad_output.bz2