Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-07-07 15:36:29 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-07-14 16:02:42 +0300
commit7c0750e96294c4c565fadc662219d56f93af389d (patch)
tree553ec1800b3a994b1d57befbe8c4537550c4deae /winsup/testsuite
parent97763573230368b38e6aadfa78cbd67f5871a1f4 (diff)
Cygwin: testsuite: Just log result of second open of /dev/dsp
Do not rate successful second open of /dev/dsp as an error, just log the result. Based on this patch by Gerd Spalink: https://cygwin.com/pipermail/cygwin-patches/2004q3/004848.html Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/winsup.api/devdsp.c20
1 files 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 = open ("/dev/dsp", O_WRONLY);
+ tst_resm (TINFO, "Second open /dev/dsp W %s ",
+ audio2 >= 0 ? "WORKS" : "DOESN'T WORK");
if (audio2 >= 0)
{
- tst_brkm (TFAIL, cleanup,
- "Second open /dev/dsp W succeeded, but is expected to fail");
- }
- else if (errno != EBUSY)
- {
- tst_brkm (TFAIL, cleanup, "Expected EBUSY here, exit: %s",
- strerror (errno));
+ close (audio2);
}
for (rate = 0; rate < sizeof (rates) / sizeof (int); rate++)
for (k = 0; k < sizeof (sblut) / sizeof (struct sb); k++)
@@ -209,15 +205,11 @@ recordingtest (void)
strerror (errno));
}
audio2 = open ("/dev/dsp", O_RDONLY);
+ tst_resm (TINFO, "Second open /dev/dsp R %s",
+ audio2 >= 0 ? "WORKS" : "DOESN'T WORK");
if (audio2 >= 0)
{
- tst_brkm (TFAIL, cleanup,
- "Second open /dev/dsp R succeeded, but is expected to fail");
- }
- else if (errno != EBUSY)
- {
- tst_brkm (TFAIL, cleanup, "Expected EBUSY here, exit: %s",
- strerror (errno));
+ close (audio2);
}
for (rate = 0; rate < sizeof (rates) / sizeof (int); rate++)
for (k = 0; k < sizeof (sblut) / sizeof (struct sb); k++)