Home
last modified time | relevance | path

Searched refs:mock (Results 1 – 25 of 84) sorted by relevance

1234

/openbmc/gpioplus/test/internal/
H A Dfd.cpp40 testing::StrictMock<test::SysMock> mock; member in gpioplus::internal::__anon69dc142a0111::FdTest
46 Fd fd(expected_fd, std::false_type(), &mock); in TEST_F()
48 EXPECT_EQ(&mock, fd.getSys()); in TEST_F()
50 EXPECT_CALL(mock, close(expected_fd)).WillOnce(Return(0)); in TEST_F()
55 Fd fd(-1, std::false_type(), &mock); in TEST_F()
61 EXPECT_CALL(mock, dup(expected_fd)).WillOnce(Return(expected_fd2)); in TEST_F()
62 Fd fd(expected_fd, &mock); in TEST_F()
64 EXPECT_EQ(&mock, fd.getSys()); in TEST_F()
66 EXPECT_CALL(mock, close(expected_fd2)).WillOnce(Return(0)); in TEST_F()
71 EXPECT_CALL(mock, dup(expected_fd)) in TEST_F()
[all …]
/openbmc/sdeventplus/test/
H A Devent.cpp24 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::__anonad1f7ae00111::EventTest
30 EXPECT_CALL(mock, sd_event_ref(expected_event)) in TEST_F()
32 Event event(expected_event, &mock); in TEST_F()
33 EXPECT_EQ(&mock, event.getSdEvent()); in TEST_F()
36 EXPECT_CALL(mock, sd_event_unref(expected_event)).WillOnce(Return(nullptr)); in TEST_F()
41 Event event(expected_event, std::false_type(), &mock); in TEST_F()
42 EXPECT_EQ(&mock, event.getSdEvent()); in TEST_F()
45 EXPECT_CALL(mock, sd_event_unref(expected_event)).WillOnce(Return(nullptr)); in TEST_F()
50 Event event(expected_event, std::false_type(), &mock); in TEST_F()
51 EXPECT_EQ(&mock, event.getSdEvent()); in TEST_F()
[all …]
H A Dclock.cpp27 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::__anon710f0c2a0111::ClockTest
33 Event event(expected_event, std::false_type(), &mock); in TEST_F()
35 EXPECT_CALL(mock, sd_event_ref(expected_event)) in TEST_F()
38 EXPECT_CALL(mock, sd_event_now(expected_event, CLOCK_REALTIME, testing::_)) in TEST_F()
43 EXPECT_CALL(mock, sd_event_unref(expected_event)) in TEST_F()
50 Event event(expected_event, std::false_type(), &mock); in TEST_F()
53 EXPECT_CALL(mock, sd_event_now(expected_event, CLOCK_MONOTONIC, testing::_)) in TEST_F()
57 EXPECT_CALL(mock, sd_event_unref(expected_event)).WillOnce(Return(nullptr)); in TEST_F()
/openbmc/google-ipmi-sys/test/
H A Dhandler_unittest.cpp144 MockDbusHandler(sdbusplus::SdBusMock& mock, in MockDbusHandler()
146 Handler(config), mock_(&mock) in MockDbusHandler()
193 void ExpectGetManagedObjects(StrictMock<sdbusplus::SdBusMock>& mock, in ExpectGetManagedObjects()
202 EXPECT_CALL(mock, sd_bus_message_new_method_call( in ExpectGetManagedObjects()
210 EXPECT_CALL(mock, sd_bus_call(_, // sd_bus *bus, in ExpectGetManagedObjects()
219 EXPECT_CALL(mock, sd_bus_message_enter_container(msg, SD_BUS_TYPE_ARRAY, in ExpectGetManagedObjects()
223 EXPECT_CALL(mock, sd_bus_message_at_end(msg, 0)).WillOnce(Return(0)); in ExpectGetManagedObjects()
225 EXPECT_CALL(mock, sd_bus_message_enter_container( in ExpectGetManagedObjects()
229 EXPECT_CALL(mock, sd_bus_message_read_basic(msg, SD_BUS_TYPE_OBJECT_PATH, in ExpectGetManagedObjects()
233 EXPECT_CALL(mock, sd_bus_message_enter_containe in ExpectGetManagedObjects()
143 MockDbusHandler(sdbusplus::SdBusMock & mock,const std::string & config="") MockDbusHandler() argument
192 ExpectGetManagedObjects(StrictMock<sdbusplus::SdBusMock> & mock,const char * obj_path=object_path) ExpectGetManagedObjects() argument
303 ExpectSdBusError(StrictMock<sdbusplus::SdBusMock> & mock,const std::string & service,const std::string & objPath,const std::string & interface,const std::string & function) ExpectSdBusError() argument
317 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
325 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
334 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
342 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
351 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
360 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
367 ExpectRead(StrictMock<sdbusplus::SdBusMock> & mock,uint64_t address,uint8_t num_bytes,uint64_t data,int sd_bus_call_return_value,uint8_t num_bytes_returned=NUM_BYTES_RETURNED_EQ_NUM_BYTES) ExpectRead() argument
437 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
451 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
466 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
483 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
503 ExpectWrite(StrictMock<sdbusplus::SdBusMock> & mock,uint64_t address,uint8_t num_bytes,uint64_t,int sd_bus_call_return_value) ExpectWrite() argument
545 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
559 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
572 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
631 StrictMock<sdbusplus::SdBusMock> mock; TEST() local
[all...]
/openbmc/sdeventplus/test/source/
H A Devent.cpp35 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::source::__anon972e2b400111::EventTest
44 EXPECT_CALL(this->mock, sd_event_unref(event)) in make_event()
48 return UniqueEvent(new Event(event, std::false_type(), &mock), deleter); in make_event()
53 EXPECT_CALL(mock, sd_event_source_unref(expected_source)) in expect_destruct()
55 EXPECT_CALL(mock, sd_event_unref(expected_event)) in expect_destruct()
62 EXPECT_CALL(mock, sd_event_ref(expected_event)) in TEST_F()
68 EXPECT_CALL(mock, sd_event_source_set_destroy_callback(expected_source, in TEST_F()
71 EXPECT_CALL(mock, in TEST_F()
74 EXPECT_CALL(mock, sd_event_source_get_userdata(expected_source)) in TEST_F()
78 EXPECT_CALL(mock, sd_event_add_defer(expected_event, testing::_, testing::_, in TEST_F()
[all …]
H A Dio.cpp35 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::source::__anon8d6417760111::IOTest
44 EXPECT_CALL(this->mock, sd_event_unref(event)) in make_event()
48 return UniqueEvent(new Event(event, std::false_type(), &mock), deleter); in make_event()
53 EXPECT_CALL(mock, sd_event_source_unref(expected_source)) in expect_destruct()
55 EXPECT_CALL(mock, sd_event_unref(expected_event)) in expect_destruct()
65 EXPECT_CALL(mock, sd_event_ref(expected_event)) in TEST_F()
68 EXPECT_CALL(mock, sd_event_add_io(expected_event, testing::_, fd, events, in TEST_F()
76 EXPECT_CALL(mock, sd_event_source_set_destroy_callback(expected_source, in TEST_F()
79 EXPECT_CALL(mock, in TEST_F()
82 EXPECT_CALL(mock, sd_event_source_get_userdata(expected_source)) in TEST_F()
[all …]
H A Dbase.cpp67 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::source::__anon6c3f73390111::BaseTest
80 EXPECT_CALL(this->mock, sd_event_unref(event)) in make_event()
84 return UniqueEvent(new Event(event, std::false_type(), &mock), deleter); in make_event()
92 EXPECT_CALL(mock, sd_event_ref(event.get())) in make_base()
99 mock, sd_event_source_set_destroy_callback(source, testing::_)) in make_base()
101 EXPECT_CALL(mock, sd_event_source_set_userdata(source, testing::_)) in make_base()
105 EXPECT_CALL(mock, sd_event_source_get_userdata(source)) in make_base()
117 EXPECT_CALL(mock, sd_event_source_set_prepare(base.get(), testing::_)) in set_prepare_placeholder()
135 EXPECT_CALL(mock, sd_event_source_unref(source)) in expect_base_destruct()
137 EXPECT_CALL(mock, sd_event_unref(event.get())) in expect_base_destruct()
[all …]
H A Dsignal.cpp36 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::source::__anon7bac141c0111::SignalTest
45 EXPECT_CALL(this->mock, sd_event_unref(event)) in make_event()
49 return UniqueEvent(new Event(event, std::false_type(), &mock), deleter); in make_event()
54 EXPECT_CALL(mock, sd_event_source_unref(expected_source)) in expect_destruct()
56 EXPECT_CALL(mock, sd_event_unref(expected_event)) in expect_destruct()
65 EXPECT_CALL(mock, sd_event_ref(expected_event)) in TEST_F()
68 EXPECT_CALL(mock, sd_event_add_signal(expected_event, testing::_, sig, in TEST_F()
76 EXPECT_CALL(mock, sd_event_source_set_destroy_callback(expected_source, in TEST_F()
79 EXPECT_CALL(mock, in TEST_F()
82 EXPECT_CALL(mock, sd_event_source_get_userdata(expected_source)) in TEST_F()
[all …]
H A Dchild.cpp36 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::source::__anonf0b8bea20111::ChildTest
45 EXPECT_CALL(this->mock, sd_event_unref(event)) in make_event()
49 return UniqueEvent(new Event(event, std::false_type(), &mock), deleter); in make_event()
54 EXPECT_CALL(mock, sd_event_source_unref(expected_source)) in expect_destruct()
56 EXPECT_CALL(mock, sd_event_unref(expected_event)) in expect_destruct()
66 EXPECT_CALL(mock, sd_event_ref(expected_event)) in TEST_F()
69 EXPECT_CALL(mock, sd_event_add_child(expected_event, testing::_, pid, in TEST_F()
77 EXPECT_CALL(mock, sd_event_source_set_destroy_callback(expected_source, in TEST_F()
80 EXPECT_CALL(mock, in TEST_F()
83 EXPECT_CALL(mock, sd_event_source_get_userdata(expected_source)) in TEST_F()
[all …]
H A Dtime.cpp36 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::source::__anon62b35d4d0111::TimeTest
45 EXPECT_CALL(this->mock, sd_event_unref(event)) in make_event()
49 return UniqueEvent(new Event(event, std::false_type(), &mock), deleter); in make_event()
54 EXPECT_CALL(mock, sd_event_source_unref(source)) in expect_time_destroy()
56 EXPECT_CALL(mock, sd_event_unref(event)).WillOnce(Return(nullptr)); in expect_time_destroy()
71 EXPECT_CALL(mock, sd_event_ref(expected_event)) in TEST_F()
74 EXPECT_CALL(mock, in TEST_F()
83 EXPECT_CALL(mock, sd_event_source_set_destroy_callback(expected_source, in TEST_F()
86 EXPECT_CALL(mock, in TEST_F()
89 EXPECT_CALL(mock, sd_event_source_get_userdata(expected_source)) in TEST_F()
[all …]
/openbmc/phosphor-inventory-manager/test/
H A Dinterface_ops_test.cpp116 MockInterface mock; in TEST() local
120 EXPECT_CALL(mock, constructWithoutProperties("foo")).Times(1); in TEST()
121 EXPECT_CALL(mock, constructWithProperties(_, _, _)).Times(0); in TEST()
133 MockInterface mock; in TEST() local
137 EXPECT_CALL(mock, constructWithoutProperties("foo")).Times(1); in TEST()
138 EXPECT_CALL(mock, constructWithProperties(_, _, _)).Times(0); in TEST()
150 MockInterface mock; in TEST() local
154 EXPECT_CALL(mock, constructWithoutProperties(_)).Times(0); in TEST()
155 EXPECT_CALL(mock, constructWithProperties("bar", _, _)).Times(1); in TEST()
167 MockInterface mock; in TEST() local
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-test/cmocka/
H A Dcmocka_1.1.7.bb1 DESCRIPTION = "cmocka is an elegant unit testing framework for C with support for mock \
26 install -d ${D}${libdir}/${BPN}/example/mock/chef_wrap
27 install -d ${D}${libdir}/${BPN}/example/mock/uptime
30 …install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${libdir}/${BPN}/example/mock/ch…
31 install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${libdir}/${BPN}/example/mock/uptime
32 install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${libdir}/${BPN}/example/mock/uptime
33 …install -m 0644 ${B}/example/mock/uptime/libproc_uptime.so ${D}/${libdir}/${BPN}/example/mock/libp…
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-support/libnvme/files/
H A D0001-mock.c-fix-checking-of-HAVE_GLIBC_IOCTL.patch4 Subject: [PATCH] mock.c: fix checking of HAVE_GLIBC_IOCTL
10 ../git/test/ioctl/mock.c:123:5: error: conflicting types for 'ioctl'; have 'int(int, long unsigned…
13 In file included from ../git/test/ioctl/mock.c:9:
17 Fixed by checking value of HAVE_GLIBC_IOCTL in mock.c
23 test/ioctl/mock.c | 2 +-
26 diff --git a/test/ioctl/mock.c b/test/ioctl/mock.c
28 --- a/test/ioctl/mock.c
29 +++ b/test/ioctl/mock.c
/openbmc/gpioplus/test/
H A Devent.cpp47 testing::StrictMock<test::SysMock> mock; member in gpioplus::__anon700490560111::EventTest
52 EXPECT_CALL(mock, open(testing::_, testing::_)) in SetUp()
54 chip = std::make_unique<Chip>(0, &mock); in SetUp()
59 EXPECT_CALL(mock, close(chip_fd)).WillOnce(Return(0)); in TearDown()
75 EXPECT_CALL(mock, gpio_get_lineevent(chip_fd, testing::_)) in TEST_F()
86 EXPECT_CALL(mock, close(event_fd)).WillOnce(Return(0)); in TEST_F()
108 EXPECT_CALL(mock, gpio_get_lineevent(chip_fd, testing::_)) in TEST_F()
130 EXPECT_CALL(mock, gpio_get_lineevent(chip_fd, testing::_)) in SetUp()
138 EXPECT_CALL(mock, close(event_fd)).WillOnce(Return(0)); in TearDown()
154 EXPECT_CALL(mock, read(event_fd, testing::_, sizeof(struct gpioevent_data))) in TEST_F()
[all …]
H A Dhandle.cpp61 testing::StrictMock<test::SysMock> mock; member in gpioplus::__anon2c27dd800111::HandleTest
66 EXPECT_CALL(mock, open(testing::_, testing::_)) in SetUp()
68 chip = std::make_unique<Chip>(0, &mock); in SetUp()
73 EXPECT_CALL(mock, close(chip_fd)).WillOnce(Return(0)); in TearDown()
89 EXPECT_CALL(mock, gpio_get_linehandle(chip_fd, testing::_)) in TEST_F()
107 EXPECT_CALL(mock, close(handle_fd)).WillOnce(Return(0)); in TEST_F()
135 EXPECT_CALL(mock, gpio_get_linehandle(chip_fd, testing::_)) in TEST_F()
163 EXPECT_CALL(mock, gpio_get_linehandle(chip_fd, testing::_)) in SetUp()
172 EXPECT_CALL(mock, close(handle_fd)).WillOnce(Return(0)); in TearDown()
185 EXPECT_CALL(mock, gpiohandle_get_line_values(handle_fd, testing::_)) in TEST_F()
[all …]
H A Dchip.cpp49 testing::StrictMock<test::SysMock> mock; member in gpioplus::__anone73f82f80111::ChipMethodTest
57 EXPECT_CALL(mock, open(StrEq(path), O_RDONLY | O_CLOEXEC)) in SetUp()
59 chip = std::make_unique<Chip>(chip_id, &mock); in SetUp()
64 EXPECT_CALL(mock, close(expected_fd)).WillOnce(Return(0)); in TearDown()
72 EXPECT_EQ(&mock, chip->getFd().getSys()); in TEST_F()
85 EXPECT_CALL(mock, gpio_get_chipinfo(expected_fd, testing::_)) in TEST_F()
95 EXPECT_CALL(mock, gpio_get_chipinfo(expected_fd, testing::_)) in TEST_F()
111 EXPECT_CALL(mock, gpio_get_lineinfo(expected_fd, testing::_)) in TEST_F()
130 EXPECT_CALL(mock, gpio_get_lineinfo(expected_fd, testing::_)) in TEST_F()
/openbmc/openbmc/meta-arm/meta-arm/lib/oeqa/selftest/cases/
H A Drunfvp.py6 import unittest.mock
92 return unittest.mock.patch("subprocess.Popen")
94 @unittest.mock.patch.dict(os.environ, {"PATH": "/path-42:/usr/sbin:/usr/bin:/sbin:/bin"})
120 stdin=unittest.mock.ANY,
121 stdout=unittest.mock.ANY,
122 stderr=unittest.mock.ANY,
126 …@unittest.mock.patch.dict(os.environ, {"DISPLAY": ":42", "WAYLAND_DISPLAY": "wayland-42", "PATH": …
148 stdin=unittest.mock.ANY,
149 stdout=unittest.mock.ANY,
150 stderr=unittest.mock.ANY,
/openbmc/openbmc/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/
H A D0001-Use-basename-implementation-from-glib-2.0.patch10 test/mock/mock.c | 2 +-
35 diff --git a/test/mock/mock.c b/test/mock/mock.c
37 --- a/test/mock/mock.c
38 +++ b/test/mock/mock.c
/openbmc/sdeventplus/test/utility/
H A Dtimer.cpp50 testing::StrictMock<test::SdEventMock> mock; member in sdeventplus::utility::__anon9ead1e020111::TimerTest
68 EXPECT_CALL(mock, in expectNow()
76 EXPECT_CALL(mock, in expectSetTime()
83 EXPECT_CALL(mock, sd_event_source_set_enabled( in expectSetEnabled()
90 EXPECT_CALL(mock, in expectGetEnabled()
117 EXPECT_CALL(mock, sd_event_ref(expected_event)) in SetUp()
119 EXPECT_CALL(mock, sd_event_unref(expected_event)) in SetUp()
121 event = std::make_unique<Event>(expected_event, &mock); in SetUp()
122 EXPECT_CALL(mock, sd_event_source_unref(expected_source)) in SetUp()
124 EXPECT_CALL(mock, sd_event_source_set_destroy_callback(expected_source, in SetUp()
[all …]
/openbmc/estoraged/src/test/erase/
H A Dpattern_test.cpp108 stdplus::fd::FdMock mock; in TEST() local
113 EXPECT_CALL(mock, write(_)) in TEST()
119 EXPECT_CALL(mock, write(_)) in TEST()
125 EXPECT_CALL(mock, write(_)) in TEST()
133 EXPECT_CALL(mock, read(_)) in TEST()
141 EXPECT_CALL(mock, read(_)) in TEST()
149 EXPECT_CALL(mock, read(_)) in TEST()
157 EXPECT_NO_THROW(pass.writePattern(size, mock)); in TEST()
158 EXPECT_NO_THROW(pass.verifyPattern(size, mock)); in TEST()
175 stdplus::fd::FdMock mock; in TEST() local
[all …]
H A Dzero_test.cpp133 stdplus::fd::FdMock mock; in TEST() local
136 EXPECT_CALL(mock, write(_)) in TEST()
142 EXPECT_NO_THROW(pass.writeZero(size, mock)); in TEST()
145 EXPECT_CALL(mock, read(_)) in TEST()
151 EXPECT_NO_THROW(pass.verifyZero(size, mock)); in TEST()
168 stdplus::fd::FdMock mock; in TEST() local
171 EXPECT_CALL(mock, write(_)) in TEST()
177 EXPECT_THROW(tryZero.writeZero(size, mock), InternalFailure); in TEST()
180 EXPECT_CALL(mock, read(_)) in TEST()
186 EXPECT_THROW(tryZero.verifyZero(size, mock), InternalFailure); in TEST()
/openbmc/openbmc/meta-openembedded/meta-python/recipes-devtools/python/
H A Dpython3-pytest-mock_3.14.0.bb1 SUMMARY = "Thin-wrapper around the mock package for easier use with pytest"
2 HOMEPAGE = "https://github.com/pytest-dev/pytest-mock/"
15 PYPI_PACKAGE = "pytest-mock"
21 python3-mock \
/openbmc/phosphor-ipmi-flash/cleanup/test/
H A Dcleanup_handler_unittest.cpp25 CleanupHandlerTest() : mock(std::make_unique<FileSystemMock>()) in CleanupHandlerTest()
27 mock_ptr = mock.get(); in CleanupHandlerTest()
29 std::move(mock)); in CleanupHandlerTest()
33 std::unique_ptr<FileSystemMock> mock; member in ipmi_flash::__anon00c611860111::CleanupHandlerTest
/openbmc/sdbusplus/test/message/
H A Dflat_map_test.cpp28 testing::StrictMock<sdbusplus::SdBusMock> mock; member in __anon77a86dfd0111::FlatMapTest
32 EXPECT_CALL(mock, sd_bus_message_new_method_call(testing::_, testing::_, in SetUp()
40 return sdbusplus::get_mocked_new(&mock).new_method_call( in new_message()
/openbmc/qemu/hw/i3c/
H A Dtrace-events40 # mock-target.c
41 mock_i3c_target_rx(uint8_t byte) "I3C mock target read 0x%" PRIx8
42 mock_i3c_target_tx(uint8_t byte) "I3C mock target write 0x%" PRIx8
43 mock_i3c_target_event(uint8_t event) "I3C mock target event 0x%" PRIx8
44 mock_i3c_target_handle_ccc_read(uint32_t num_read, uint32_t num_to_read) "I3C mock target read %" P…
45 mock_i3c_target_new_ccc(uint8_t ccc) "I3C mock target handle CCC 0x%" PRIx8
46 mock_i3c_target_handle_ccc_write(uint32_t num_sent, uint32_t num_to_send) "I3C mock target send %" …
47 mock_i3c_target_do_ibi(uint8_t address, bool is_recv) "I3C mock target IBI with address 0x%" PRIx8 …

1234