summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2020-03-12 14:44:46 -0700
committerMatt Turner <[email protected]>2020-03-13 17:48:03 -0700
commitb93a1952258ebef6319fd4f4186d704e04b3064c (patch)
treec9c1ab20dc4d1b8dd49980c1e367989c13ea3bba /src/freedreno
parent5e523c9265d3a6f092bad17364cf7d7f5ead6e98 (diff)
isl: Avoid EXPECT_DEATH in unit tests
EXPECT_DEATH works by forking the process and letting the forked process fail with an assertion. This process is evidently incredibly expensive, taking ~30 seconds to run the whole isl_aux_info_test on a 2.8GHz Skylake. Annoyingly all of the (expected) assertion failures also leaves lots of messages in dmesg and potentially generates lots of coredumps. Instead, avoid the expense of fork/exec by redefining assert() and unreachable() in the code we're testing to return a unit-test-only value. With this patch, the test takes ~1ms. Also, while modifying the EXPECT_EQ() calls, reverse the arguments so that the expected value comes first, as is intended. Otherwise gtest failure messages don't make much sense. Fixes: https://gitlab.freedesktop.org/mesa/mesa/issues/2567 Reviewed-by: Nanley Chery <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4174> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4174>
Diffstat (limited to 'src/freedreno')
0 files changed, 0 insertions, 0 deletions