From cf7567ba7aac9d1e5c708381439eeeb4a6048cac Mon Sep 17 00:00:00 2001 From: Chenbo Feng Date: Tue, 1 May 2018 13:51:13 -0700 Subject: [PATCH] Remove the unused file parsing function With the new xt_bpf support for iface stats. We no longer need to parse the per interface stats from /proc/net/dev. And since the old xt_qtaguid code path also not depend on it, we can completly remove that helper function since no caller is depending on it now. Bug: 72111305 Test: runtest frameworks-net -c com.android.internal.net.NetworkStatsFactoryTest Change-Id: Icb7eaeef0eeb9fdffd32a90316c76ee05bafffbe Merged-In: Icb7eaeef0eeb9fdffd32a90316c76ee05bafffbe (cherry picked from aosp commit b815c978b81eee4b1494bd0b9d25bfad52f08b72) --- .../internal/net/NetworkStatsFactoryTest.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java index fc46b9c859..788924b1d3 100644 --- a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java +++ b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java @@ -115,20 +115,6 @@ public class NetworkStatsFactoryTest { assertStatsEntry(stats, "rmnet1", 10021, SET_FOREGROUND, 0x30100000, 742L, 3L, 1265L, 3L); } - @Test - public void testNetworkStatsSummary() throws Exception { - stageFile(R.raw.net_dev_typical, file("net/dev")); - - final NetworkStats stats = mFactory.readNetworkStatsIfaceDev(); - assertEquals(6, stats.size()); - assertStatsEntry(stats, "lo", UID_ALL, SET_ALL, TAG_NONE, 8308L, 8308L); - assertStatsEntry(stats, "rmnet0", UID_ALL, SET_ALL, TAG_NONE, 1507570L, 489339L); - assertStatsEntry(stats, "ifb0", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L); - assertStatsEntry(stats, "ifb1", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L); - assertStatsEntry(stats, "sit0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L); - assertStatsEntry(stats, "ip6tnl0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L); - } - @Test public void testNetworkStatsSingle() throws Exception { stageFile(R.raw.xt_qtaguid_iface_typical, file("net/xt_qtaguid/iface_stat_all"));