Fix FD leak in ConnectivityManager.getConnectionOwnerUid
Add unit tests to verify that bug has been fixed. Re-enable testGetConnectionOwnerUid() unit tests in presubmit. These were disabled due to test flakiness caused by expected failures passing as a result of other sockets on the system. This is fixed by checking that failures do not have the UID of the calling process instead of INVALID_UID since previously some Qualcomm telephony sockets were causing lookup successes. Test: atest InetDiagSocketTest#testGetConnectionOwnerUid Test: ls -1 /proc/<pid of system_server>/fd | wca Test: atest --generate-new-metrics 200 InetDiagSocketTest#testGetConnectionOwnerUid To verify flakes have been cleaned up. Bug: 141603906 Bug: 141459241 Change-Id: Ib76674f10e4bd24952c557bac7b9c65fba42fdb2
Loading
Please register or sign in to comment