diff options
| author | isaki <isaki@NetBSD.org> | 2020-05-01 05:45:57 +0000 |
|---|---|---|
| committer | isaki <isaki@NetBSD.org> | 2020-05-01 05:45:57 +0000 |
| commit | 998aef0d976dd0f27e2f57b02ba485b579e64ca7 (patch) | |
| tree | 06f1491a0c5e50b846e50d43d9b6a625e8221f85 /tests/dev | |
| parent | 5b625599034f58cc43a16280fccc621bf13420e7 (diff) | |
Fix two tests.
- kqueue_mode_{RDONLY,RDWR}_READ: Fix expected value.
This is rest of rev1.9.
- AUDIO_SETINFO_params_simul: Fix condition.
This happens on full-duplex, not bi-directional.
These affect only standalone test, not atf.
Diffstat (limited to 'tests/dev')
| -rw-r--r-- | tests/dev/audio/audiotest.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/dev/audio/audiotest.c b/tests/dev/audio/audiotest.c index ad5fc2027a4..3fe3252956e 100644 --- a/tests/dev/audio/audiotest.c +++ b/tests/dev/audio/audiotest.c @@ -1,4 +1,4 @@ -/* $NetBSD: audiotest.c,v 1.10 2020/03/26 13:43:10 isaki Exp $ */ +/* $NetBSD: audiotest.c,v 1.11 2020/05/01 05:45:57 isaki Exp $ */ /* * Copyright (C) 2019 Tetsuya Isaki. All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: audiotest.c,v 1.10 2020/03/26 13:43:10 isaki Exp $"); +__RCSID("$NetBSD: audiotest.c,v 1.11 2020/05/01 05:45:57 isaki Exp $"); #include <errno.h> #include <fcntl.h> @@ -3582,9 +3582,8 @@ test_kqueue_mode(int openmode, int filt, int expected) XP_SYS_EQ(0, r); } DEF(kqueue_mode_RDONLY_READ) { - /* Should not raise yet (NetBSD7 has bugs?) */ - int expected = (netbsd < 8) ? 1 : 0; - test_kqueue_mode(O_RDONLY, EVFILT_READ, expected); + /* Should raise */ + test_kqueue_mode(O_RDONLY, EVFILT_READ, 1); } DEF(kqueue_mode_RDONLY_WRITE) { /* Should never raise (NetBSD7 has bugs) */ @@ -3600,8 +3599,8 @@ DEF(kqueue_mode_WRONLY_WRITE) { test_kqueue_mode(O_WRONLY, EVFILT_WRITE, 1); } DEF(kqueue_mode_RDWR_READ) { - /* Should not raise yet (NetBSD7 is something strange) */ - int expected = (netbsd < 8 && hw_fulldup()) ? 1 : 0; + /* Should raise on fulldup but not on halfdup, on NetBSD9 */ + int expected = hw_fulldup() ? 1 : 0; test_kqueue_mode(O_RDWR, EVFILT_READ, expected); } DEF(kqueue_mode_RDWR_WRITE) { @@ -5149,16 +5148,16 @@ DEF(AUDIO_SETINFO_params_simul) XP_SYS_EQ(0, r); /* - * On bi-directional device, the 2nd one has both track so that + * On full-duplex device, the 2nd one has both track so that * both track are not affected by sticky parameter. - * On uni-directional device, the 2nd one has only playback track - * so that playback track is not affected by sticky parameter. + * Otherwise, the 2nd one has only playback track so that + * playback track is not affected by sticky parameter. */ memset(&ai, 0, sizeof(ai)); r = IOCTL(fd1, AUDIO_GETBUFINFO, &ai, ""); XP_SYS_EQ(0, r); XP_EQ(11025, ai.play.sample_rate); - if (hw_bidir()) { + if (hw_fulldup()) { XP_EQ(11025, ai.record.sample_rate); } else { XP_EQ(16000, ai.record.sample_rate); |
