Add unit test for bpf helper function

These unit tests verify the behavior of NetworkStats helper function. It
uses fake maps to simulate the result of network trafffic stats and
verify the result from helper function is consistent.

Test: compile and run libbpf_test.
Bug: 30950746
Change-Id: I0fcd43e2aedcf7337c6fb78048d9725d18423127
diff --git a/libbpf/Android.bp b/libbpf/Android.bp
index c139ca9..cf467ce 100644
--- a/libbpf/Android.bp
+++ b/libbpf/Android.bp
@@ -61,3 +61,22 @@
     ],
 }
 
+cc_test {
+    name: "libbpf_test",
+    srcs: [
+        "BpfNetworkStatsTest.cpp",
+    ],
+    cflags: [
+        "-Wall",
+        "-Werror",
+        "-Wno-error=unused-variable",
+    ],
+    static_libs: ["libgmock"],
+    shared_libs: [
+        "libbpf",
+        "libbase",
+        "liblog",
+        "libnetdutils",
+        "libutils",
+    ],
+}