From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id BD04A3858C3A; Fri, 14 Jul 2023 15:28:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD04A3858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689348493; bh=BqGuf70Hi+8U1XUwbx+pw8vqSyWR9066vrKHspybw1E=; h=From:To:Subject:Date:From; b=n3iWypLgGk6avhv2SM55OSVJw0PxT78DYEW5xa3jUd2CXONrK77GJ5q9ibG14zGax CbzlI27qfM7ZpBv5/jPlRMfWgFMrzDIA7XsZEjH+TPlyFB4x3kTihLGRQdlr0OVgeG ALN9+XVL03/1pToy3w8wKgjoEdhn5y9Z7z/9A9Hw= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon Turney To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: testsuite: Just log result of second open of /dev/dsp X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: 97763573230368b38e6aadfa78cbd67f5871a1f4 X-Git-Newrev: 7c0750e96294c4c565fadc662219d56f93af389d Message-Id: <20230714152813.BD04A3858C3A@sourceware.org> Date: Fri, 14 Jul 2023 15:28:13 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D7c0750e9629= 4c4c565fadc662219d56f93af389d commit 7c0750e96294c4c565fadc662219d56f93af389d Author: Jon Turney Date: Fri Jul 7 13:36:29 2023 +0100 Cygwin: testsuite: Just log result of second open of /dev/dsp =20 Do not rate successful second open of /dev/dsp as an error, just log the result. =20 Based on this patch by Gerd Spalink: =20 https://cygwin.com/pipermail/cygwin-patches/2004q3/004848.html Signed-off-by: Jon Turney Diff: --- winsup/testsuite/winsup.api/devdsp.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/winsup/testsuite/winsup.api/devdsp.c b/winsup/testsuite/winsup= .api/devdsp.c index 0ac76f085..de3ccfa19 100644 --- a/winsup/testsuite/winsup.api/devdsp.c +++ b/winsup/testsuite/winsup.api/devdsp.c @@ -170,15 +170,11 @@ playbacktest (void) strerror (errno)); } audio2 =3D open ("/dev/dsp", O_WRONLY); + tst_resm (TINFO, "Second open /dev/dsp W %s ", + audio2 >=3D 0 ? "WORKS" : "DOESN'T WORK"); if (audio2 >=3D 0) { - tst_brkm (TFAIL, cleanup, - "Second open /dev/dsp W succeeded, but is expected to fail"); - } - else if (errno !=3D EBUSY) - { - tst_brkm (TFAIL, cleanup, "Expected EBUSY here, exit: %s", - strerror (errno)); + close (audio2); } for (rate =3D 0; rate < sizeof (rates) / sizeof (int); rate++) for (k =3D 0; k < sizeof (sblut) / sizeof (struct sb); k++) @@ -209,15 +205,11 @@ recordingtest (void) strerror (errno)); } audio2 =3D open ("/dev/dsp", O_RDONLY); + tst_resm (TINFO, "Second open /dev/dsp R %s", + audio2 >=3D 0 ? "WORKS" : "DOESN'T WORK"); if (audio2 >=3D 0) { - tst_brkm (TFAIL, cleanup, - "Second open /dev/dsp R succeeded, but is expected to fail"); - } - else if (errno !=3D EBUSY) - { - tst_brkm (TFAIL, cleanup, "Expected EBUSY here, exit: %s", - strerror (errno)); + close (audio2); } for (rate =3D 0; rate < sizeof (rates) / sizeof (int); rate++) for (k =3D 0; k < sizeof (sblut) / sizeof (struct sb); k++)