Enable DHECK's in media encode/decode unittests |
||||||
Issue descriptionMedia encode/decode tests are broken in debug on a regular basis. This is caused by only running testcases in release, which don't have DCHECK's enabled. This means that errors might be introduced and only caught after a long time, making DCHECK's almost useless. To fix this, we would like to build unittests with the 'DCHECK_ALWAYS_ON' flag. Some things need to be considered carefully though: - Will this increase the build times? - What will be the effect on performance? Should we have a binaries without DCHECK's for performance testing?
,
Nov 15
I guess we'd have to run gn gen (https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild#981) twice, once with dcheck_always_on=true, and once false. For the former, we'd have to run chrome_make (https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild#1054) with chrome_targets only containing the above unittest binaries, and for the latter the rest of targets, including main chrome target. Deploying should work in the same way/should not require changes (the binaries would still be in out/Release). This means we'd have to compile (but not link) twice. For performance, my guess would be that dchecks' impact should be negligible. It may also be interesting to run all unittests with this, not only video ones.
,
Nov 15
+bpastene@
,
Nov 15
The problem with the DCHECK is that it will terminate the test run and it won't detect any more failures after that. So on its own it is great at making itself obsolete. A better way would be to fail the test in which the DCHECK happened - with a meaningful log message - and continue testing all following test cases.
,
Nov 16
It does indeed seem to abort the full run, rather than a single testcase. I would argue though that it's still useful. I'dd rather miss some test results, than having a potential dangerous bug slip through. In this case we found a failing DCHECK that had gone unnoticed for quite some time, and was actually pointing at a memory leak. Usually these failures would be caught by pre-submit checks, in which case it's acceptable to abort the test run. Hopefully this will remind programmers to always run tests in debug before checking in. It might be tricky to just make a DCHECK fail the tests, as we want a full stackdump etc.
,
Nov 16
GPU Triage: Marking assigned as this appears to have an owner.
,
Nov 19
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dstaessens@google.com
, Nov 15