VirtualBox

Changeset 91824 in vbox for trunk


Ignore:
Timestamp:
Oct 18, 2021 10:42:34 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Added fail-safe for audio stacks and/or implementations which mess up draining. ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkatDriverStack.cpp

    r91654 r91824  
    10101010        if (RT_SUCCESS(rc) && fSync)
    10111011        {
     1012            RTMSINTERVAL const msTimeout = RT_MS_5MIN; /* 5 minutes should be really enough for draining our stuff. */
     1013            uint64_t const     tsStart   = RTTimeMilliTS();
     1014
    10121015            /*
    10131016             * This is a synchronous drain, so wait for the driver to change state to inactive.
     
    10321035                    break;
    10331036                }
     1037
     1038                /* Fail-safe for audio stacks and/or implementations which mess up draining. */
     1039                if (RTTimeMilliTS() - tsStart > msTimeout)
     1040                {
     1041                    RTTestFailed(g_hTest, "Draining stream took too long (timeout is %RU32ms), giving up", msTimeout);
     1042                    break;
     1043                }
    10341044            }
    10351045            if (enmHostState != PDMHOSTAUDIOSTREAMSTATE_OKAY)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette