libbcc: support BPF_SOCKHASH specify the key type (#3473)
[platform/upstream/bcc.git] / tests / cc / test_sock_table.cc
index a71db2a..db5ce52 100644 (file)
@@ -67,8 +67,8 @@ int test(struct bpf_sock_ops *skops)
 TEST_CASE("test sock hash", "[sockhash]") {
   {
     const std::string BPF_PROGRAM = R"(
-BPF_SOCKHASH(sk_hash1, 10);
-BPF_SOCKHASH(sk_hash2, 10);
+BPF_SOCKHASH(sk_hash1, u32, 10);
+BPF_SOCKHASH(sk_hash2, u32, 10);
 int test(struct bpf_sock_ops *skops)
 {
   u32 key = 0, val = 0;