Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 78348093 authored by David Anderson's avatar David Anderson
Browse files

vts_libsnapshot_test: Fix test flakiness.

This patch fixes a few lingering issues in vts_libsnapshot_test.

The most important fix is a crash in snapuserd when handler deletion
races with the merge monitor thread. Since tests issue lots of
snapshot-related requests in rapid succession, this was easy to hit in
presubmit, and resulted in a null-pointer deref.

SnapuserdClient's CloseConnection does the same thing as the destructor,
but leaves SnapuserdClient in an unusable state. This method is removed
in favor of RAII.

Fix a bug in SnapshotManager where CloseConnection could be called
without zapping snapuserd_client_.

Fix a bug where POLLHUP was checked before calling recv().

Add test name logging so presubmit failures can be diagnosed via logcat
dumps.

Bug: N/A
Test: vts_libsnapshot_test on cuttlefish
Change-Id: I8f22a45e537c24a3c6d327ac47bf8b1352108706
parent 9a0a9db6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment