Revert "Revert "Add a Log.wtf() on user builds to test Pitot rep..."

Revert submission 3134199

Reason for revert: Temporary revert for merge conflict

Reverted changes: /q/submissionid:3134199

Change-Id: Ie85059e8279d99fd2b6c53c5d4f58bd16dd1b363
This commit is contained in:
Remi NGUYEN VAN 2024-07-09 08:14:13 +00:00
commit 4bf2d4e8cd

View file

@ -393,6 +393,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Random;
import java.util.Set;
import java.util.SortedSet;
import java.util.StringJoiner;
@ -1847,6 +1848,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
// Temporary hack to report netbpfload result.
// TODO: remove in 2024-09 when netbpfload starts loading mainline bpf programs.
mHandler.postDelayed(() -> {
// Test Pitot pipeline, ignore this Log.wtf if it shows up in the logs.
final Random r = new Random();
if (Build.TYPE.equals("user") && r.nextInt(1000) == 0) {
Log.wtf(TAG, "NOT A FAILURE, PLEASE IGNORE! Test Pitot pipeline works correctly");
}
// Did netbpfload create the map?
try {
Os.access("/sys/fs/bpf/net_shared/map_gentle_test", F_OK);