[llvm] [libsycl][unit] Mock 3 missing liboffload functions for unit tests (PR #216170)
Nick Sarnie via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 08:43:05 PDT 2026
================
@@ -327,4 +327,31 @@ void mock::MockLiboffload::initDefault() {
mock::releaseDummyHandle(Event);
return OL_SUCCESS;
});
+
+ ON_CALL(*this, olMemAlloc)
+ .WillByDefault([this](ol_device_handle_t Device, ol_alloc_type_t Type,
+ size_t Size, void **AllocationOut) -> ol_result_t {
+ EXPECT_NE(Device, nullptr);
+ EXPECT_NE(Type, OL_ALLOC_TYPE_HOST);
+ EXPECT_GT(Size, 0);
+ EXPECT_NE(AllocationOut, nullptr);
+ *AllocationOut = std::malloc(Size);
----------------
sarnex wrote:
https://github.com/llvm/llvm-project/pull/216341
https://github.com/llvm/llvm-project/pull/216170
More information about the llvm-commits
mailing list