diff --git a/src/vppinfra/vector/test/count_equal.c b/src/vppinfra/vector/test/count_equal.c
new file mode 100644
index 0000000..cd1c8a5
--- /dev/null
+++ b/src/vppinfra/vector/test/count_equal.c
@@ -0,0 +1,99 @@
+/* SPDX-License-Identifier: Apache-2.0
+ * Copyright(c) 2021 Cisco Systems, Inc.
+ */
+
+#include <vppinfra/format.h>
+#include <vppinfra/vector/test/test.h>
+#include <vppinfra/vector/count_equal.h>
+
+#define foreach_clib_count_equal(type)                                        \
+  typedef uword (wrapper_fn_##type) (type * a, uword maxcount);               \
+                                                                              \
+  __clib_test_fn uword clib_count_equal_##type##_wrapper (type *a,            \
+							  uword maxcount)     \
+  {                                                                           \
+    return clib_count_equal_##type (a, maxcount);                             \
+  }                                                                           \
+                                                                              \
+  static wrapper_fn_##type *wfn_##type = &clib_count_equal_##type##_wrapper;  \
+  static clib_error_t *test_clib_count_equal_##type (clib_error_t *err)       \
+  {                                                                           \
+    u32 ps = clib_mem_get_log2_page_size ();                                  \
+    void *map;                                                                \
+                                                                              \
+    u16 lengths[] = {                                                         \
+      1, 2, 3, 5, 7, 9, 15, 16, 17, 31, 32, 33, 255, 256, 257                 \
+    };                                                                        \
+    type *data;                                                               \
+                                                                              \
+    map = clib_mem_vm_map (0, 2ULL << ps, ps, "test");                        \
+    if (map == CLIB_MEM_VM_MAP_FAILED)                                        \
+      return clib_error_return (err, "clib_mem_vm_map failed");               \
+                                                                              \
+    data = ((type *) (map + (1ULL << ps)));                                   \
+    data[-1] = 0xfe;                                                          \
+                                                                              \
+    mprotect (data, 1ULL < ps, PROT_NONE);                                    \
+                                                                              \
+    for (int i = 1; i <= (1 << ps) / sizeof (data[0]); i++)                   \
+      data[-i] = 7;                                                           \
+                                                                              \
+    for (int i = 0; i < ARRAY_LEN (lengths); i++)                             \
+      {                                                                       \
+	uword rv, len = lengths[i];                                           \
+                                                                              \
+	if ((rv = wfn_##type (data - len, len)) != len)                       \
+	  {                                                                   \
+	    err = clib_error_return (                                         \
+	      err, "testcase 1 failed for len %u (rv %u)", len, rv);          \
+	    goto done;                                                        \
+	  }                                                                   \
+                                                                              \
+	data[-1] = 8;                                                         \
+	if (len > 1 && ((rv = wfn_##type (data - len, len)) != len - 1))      \
+	  {                                                                   \
+	    err = clib_error_return (                                         \
+	      err, "testcase 2 failed for len %u (rv %u)", len, rv);          \
+	    goto done;                                                        \
+	  }                                                                   \
+	data[-1] = 7;                                                         \
+                                                                              \
+	data[-2] = 8;                                                         \
+	if (len > 2 && ((rv = wfn_##type (data - len, len)) != len - 2))      \
+	  {                                                                   \
+	    err = clib_error_return (                                         \
+	      err, "testcase 3 failed for len %u (rv %u)", len, rv);          \
+	    goto done;                                                        \
+	  }                                                                   \
+	data[-2] = 7;                                                         \
+      }                                                                       \
+                                                                              \
+  done:                                                                       \
+    clib_mem_vm_unmap (map);                                                  \
+    return err;                                                               \
+  }
+
+foreach_clib_count_equal (u8);
+foreach_clib_count_equal (u16);
+foreach_clib_count_equal (u32);
+foreach_clib_count_equal (u64);
+
+REGISTER_TEST (clib_count_equal_u8) = {
+  .name = "clib_count_equal_u8",
+  .fn = test_clib_count_equal_u8,
+};
+
+REGISTER_TEST (clib_count_equal_u16) = {
+  .name = "clib_count_equal_u16",
+  .fn = test_clib_count_equal_u16,
+};
+
+REGISTER_TEST (clib_count_equal_u32) = {
+  .name = "clib_count_equal_u32",
+  .fn = test_clib_count_equal_u32,
+};
+
+REGISTER_TEST (clib_count_equal_u64) = {
+  .name = "clib_count_equal_u64",
+  .fn = test_clib_count_equal_u64,
+};
