mesa/src/intel/vulkan/tests/anv_slab_bo_test.cpp
hwandy 3699566561 anv/tests: Add a slab test to cover the memory leak issue.
Add a basic slab test to cover the memory leak issue found in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38989
and
https://gitlab.freedesktop.org/mesa/mesa/-/issues/14396

Test: meson test anv_slab_bo_test.
Signed-off-by: hwandy <hwandy@google.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39081>
2026-01-08 14:21:24 +00:00

16 lines
418 B
C++

/*
* Copyright 2025 Google LLC
* SPDX-License-Identifier: MIT
*/
#include <gtest/gtest.h>
#include "test_common.h"
#define ANV_C_TEST(S, N, C) extern "C" void C(void); TEST(S, N) { C(); }
ANV_C_TEST(AnvSlabBo, AllocWithAlignment, anv_slab_bo_alloc_with_alignment);
extern "C" void FAIL_IN_GTEST(const char *file_path, unsigned line_number, const char *msg) {
GTEST_FAIL_AT(file_path, line_number) << msg;
}