[PATCH BlueZ 1/2] shared/tester: add ability to shutdown tester IO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some tests may require the ability to shutdown IO for proper teardown.
Add function tester_shutdown_io to accomplish that.
---
 src/shared/tester.c | 6 ++++++
 src/shared/tester.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/shared/tester.c b/src/shared/tester.c
index 371ccaced..230e9ef75 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -1047,6 +1047,12 @@ struct io *tester_setup_io(const struct iovec *iov, int iovcnt)
 	return ios[0];
 }
 
+void tester_shutdown_io(void)
+{
+	io_shutdown(ios[0]);
+	io_shutdown(ios[1]);
+}
+
 void tester_io_send(void)
 {
 	struct test_case *test = tester_get_test();
diff --git a/src/shared/tester.h b/src/shared/tester.h
index 1f8138434..dfc1ca3a8 100644
--- a/src/shared/tester.h
+++ b/src/shared/tester.h
@@ -81,5 +81,6 @@ void tester_wait(unsigned int seconds, tester_wait_func_t func,
 							void *user_data);
 
 struct io *tester_setup_io(const struct iovec *iov, int iovcnt);
+void tester_shutdown_io(void);
 void tester_io_send(void);
 void tester_io_set_complete_func(tester_data_func_t func);
-- 
2.34.1





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux