diff --git a/tests/functional/pyocf/types/io.py b/tests/functional/pyocf/types/io.py index 467e3a8..dfc0471 100644 --- a/tests/functional/pyocf/types/io.py +++ b/tests/functional/pyocf/types/io.py @@ -1,5 +1,5 @@ # -# Copyright(c) 2019-2021 Intel Corporation +# Copyright(c) 2019-2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # @@ -98,6 +98,12 @@ class Io(Structure): def submit(self): return OcfLib.getInstance().ocf_core_submit_io_wrapper(byref(self)) + def submit_flush(self): + return OcfLib.getInstance().ocf_core_submit_flush_wrapper(byref(self)) + + def submit_discard(self): + return OcfLib.getInstance().ocf_core_submit_discard_wrapper(byref(self)) + def set_data(self, data: Data, offset: int = 0): self.data = data OcfLib.getInstance().ocf_io_set_data(byref(self), data, offset) diff --git a/tests/functional/pyocf/wrappers/ocf_io_wrappers.c b/tests/functional/pyocf/wrappers/ocf_io_wrappers.c index 776de72..7fe3f01 100644 --- a/tests/functional/pyocf/wrappers/ocf_io_wrappers.c +++ b/tests/functional/pyocf/wrappers/ocf_io_wrappers.c @@ -1,5 +1,5 @@ /* - * Copyright(c) 2012-2021 Intel Corporation + * Copyright(c) 2012-2022 Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ @@ -34,3 +34,13 @@ void ocf_core_submit_io_wrapper(struct ocf_io *io) ocf_core_submit_io(io); } + +void ocf_core_submit_flush_wrapper(struct ocf_io *io) +{ + ocf_core_submit_flush(io); +} + +void ocf_core_submit_discard_wrapper(struct ocf_io *io) +{ + ocf_core_submit_discard(io); +}