Skip to content

Commit cfc7c5e

Browse files
committed
fixup! sound: add unit tests to alsa backend
1 parent b196bb2 commit cfc7c5e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

staging/vhost-device-sound/src/audio_backends/alsa/test_utils.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ impl Drop for AlsaTestHarness {
113113
stringify!(AlsaTestHarness)
114114
);
115115
}
116-
if self.tempdir.take().is_some() {
116+
if self
117+
.tempdir
118+
.lock()
119+
.map(|mut l| l.take().is_some())
120+
.unwrap_or(false)
121+
{
117122
println!(
118123
"ERROR: tempdir held a value when dropping {}",
119124
stringify!(AlsaTestHarness)

0 commit comments

Comments
 (0)