diff --git a/Makefile.am b/Makefile.am index ae277d73f1d..4e58362e89d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -131,7 +131,8 @@ CLANG_FORMAT_DIR_TARGETS = \ clang-format-mgmt \ clang-format-plugins \ clang-format-proxy \ - clang-format-tools + clang-format-tools \ + clang-format-tests .PHONY: $(CLANG_FORMAT_DIR_TARGETS) diff --git a/tests/gold_tests/pluginTest/TSVConnFd/TSVConnFd.cc b/tests/gold_tests/pluginTest/TSVConnFd/TSVConnFd.cc index c066452a035..a7f39fa082a 100644 --- a/tests/gold_tests/pluginTest/TSVConnFd/TSVConnFd.cc +++ b/tests/gold_tests/pluginTest/TSVConnFd/TSVConnFd.cc @@ -76,7 +76,7 @@ class Io_buffer_consume _io_buffer_reader.reset(nonNullPtrDbg(TSIOBufferReaderAlloc(nonNullPtrDbg(io_buffer)))); } - Io_buffer_consume(Io_buffer_consume &&) = default; + Io_buffer_consume(Io_buffer_consume &&) = default; Io_buffer_consume &operator=(Io_buffer_consume &&) = default; // Returns number of bytes available to consume. @@ -88,7 +88,7 @@ class Io_buffer_consume // destroyed. Returns null if avail() is zero (because no data is currently available). Must not be called if // attached returns false. If amount is zero, returns the same value as the last call to consume(). // - char const * consume(std::int64_t amount); + char const *consume(std::int64_t amount); private: atscppapi::TSIOBufferReaderUniqPtr _io_buffer_reader; @@ -146,8 +146,8 @@ Io_buffer_consume::consume(std::int64_t amount) return nullptr; } char const *result = _block_data; - _block_data += amount; - _block_avail -= amount; + _block_data += amount; + _block_avail -= amount; return result; } @@ -169,23 +169,27 @@ class Recv_from_vconn nonNullPtrDbg(TSVConnRead(vconn, _cont.get(), _io_buffer.get(), INT64_MAX)); } - TSVConn vconn() const { return _vconn; } + TSVConn + vconn() const + { + return _vconn; + } virtual ~Recv_from_vconn() {} protected: - enum _Status - { - IN_PROGRESS, - VCONN_SHUTDOWN_FOR_RECEIVING, - ERROR - }; + enum _Status { IN_PROGRESS, VCONN_SHUTDOWN_FOR_RECEIVING, ERROR }; - _Status _status() const { return _status_.load(std::memory_order_acquire); } + _Status + _status() const + { + return _status_.load(std::memory_order_acquire); + } // Event that caused _status() to be ERROR. // - TSEvent _error_event() const + TSEvent + _error_event() const { TSAssert(_status() == ERROR); @@ -211,17 +215,21 @@ class Recv_from_vconn return _bc.consume(amount); } - TSMutex _mtx() const { return _mtx_; } + TSMutex + _mtx() const + { + return _mtx_; + } - Recv_from_vconn(Recv_from_vconn const &) = delete; - Recv_from_vconn & operator = (Recv_from_vconn const &) = delete; + Recv_from_vconn(Recv_from_vconn const &) = delete; + Recv_from_vconn &operator=(Recv_from_vconn const &) = delete; private: TSVConn _vconn; TSMutex _mtx_{nonNullPtrDbg(TSMutexCreate())}; atscppapi::TSContUniqPtr _cont{nonNullPtrDbg(TSContCreate(_cont_func, _mtx_))}; atscppapi::TSIOBufferUniqPtr _io_buffer{nonNullPtrDbg(TSIOBufferCreate())}; - Io_buffer_consume _bc{nonNullPtrDbg(_io_buffer.get())}; // Order is important here, _bc must be destroyed before _io_buffer. + Io_buffer_consume _bc{nonNullPtrDbg(_io_buffer.get())}; // Order is important here, _bc must be destroyed before _io_buffer. std::atomic<_Status> _status_{IN_PROGRESS}; TSEvent _error_event_{TS_EVENT_NONE}; @@ -254,11 +262,11 @@ Recv_from_vconn::_cont_func(TSCont cont, TSEvent event, void *edata) case TS_EVENT_VCONN_READ_READY: break; - // My best guess is that this event is triggered when all the bytes requested in the read VIO have been received. - // This should not happen for this class because the number bytes for the read VIO is INT64_MAX, effectively - // infinite. - // - // case TS_EVENT_VCONN_READ_COMPLETE: + // My best guess is that this event is triggered when all the bytes requested in the read VIO have been received. + // This should not happen for this class because the number bytes for the read VIO is INT64_MAX, effectively + // infinite. + // + // case TS_EVENT_VCONN_READ_COMPLETE: default: TSError(PINAME ": VConnection read error event=%d", event); @@ -281,38 +289,45 @@ class Send_to_vconn _status.store(bytes_to_send ? IN_PROGRESS : VIO_DONE, std::memory_order_relaxed); } - TSVConn vconn() const { return _vconn; } + TSVConn + vconn() const + { + return _vconn; + } // Send some bytes. If an override of _notify_send_to_vconn() calls _send(), you must lock the mutex returned by mtx() // for all calls to send() after the first one. // void send(void const *data, int64_t n_bytes); - enum Status - { - IN_PROGRESS, - VIO_DONE, - VCONN_SHUTDOWN_FOR_SENDING, - ERROR - }; + enum Status { IN_PROGRESS, VIO_DONE, VCONN_SHUTDOWN_FOR_SENDING, ERROR }; - Status status() const { return _status.load(std::memory_order_acquire); } + Status + status() const + { + return _status.load(std::memory_order_acquire); + } // Event that caused status() to be ERROR. // - TSEvent error_event() const + TSEvent + error_event() const { TSAssert(status() == ERROR); return _error_event; } - TSMutex mtx() const { return _mtx; } + TSMutex + mtx() const + { + return _mtx; + } virtual ~Send_to_vconn() {} - Send_to_vconn(Send_to_vconn const &) = delete; - Send_to_vconn & operator = (Send_to_vconn const &) = delete; + Send_to_vconn(Send_to_vconn const &) = delete; + Send_to_vconn &operator=(Send_to_vconn const &) = delete; protected: // If _notify_send_to_vconn() needs to send, it should call this function (not send()). @@ -334,7 +349,10 @@ class Send_to_vconn // This is called when the IOBuffer referred to by _io_buf is empty, or the status is no longer IN_PROGRESS. // _send() can be called from within this function. // - virtual void _notify_send_to_vconn() {} + virtual void + _notify_send_to_vconn() + { + } }; void @@ -359,7 +377,7 @@ Send_to_vconn::_send(void const *data, int64_t n_bytes) auto size_written = TSIOBufferWrite(_io_buf.get(), data_, size); TSAssert(size_written > 0); TSAssert(size_written <= size); - size -= size_written; + size -= size_written; data_ += size_written; } while (size); @@ -376,7 +394,7 @@ Send_to_vconn::send(void const *data, int64_t n_bytes) if (!_cont) { start_vio = true; - _mtx = nonNullPtrDbg(TSMutexCreate()); + _mtx = nonNullPtrDbg(TSMutexCreate()); _cont.reset(nonNullPtrDbg(TSContCreate(_cont_func, nonNullPtrDbg(_mtx)))); TSContDataSet(_cont.get(), this); _io_buf.reset(nonNullPtrDbg(TSIOBufferCreate())); @@ -405,8 +423,7 @@ Send_to_vconn::_cont_func(TSCont cont, TSEvent event, void *edata) TSAssert(IN_PROGRESS == stv->status()); - switch (event) - { + switch (event) { case TS_EVENT_VCONN_WRITE_READY: break; @@ -429,7 +446,7 @@ Send_to_vconn::_cont_func(TSCont cont, TSEvent event, void *edata) } TSDbgCtlUniqPtr dbg_ctl_guard{TSDbgCtlCreate(PIName)}; -TSDbgCtl const * const dbg_ctl{dbg_ctl_guard.get()}; +TSDbgCtl const *const dbg_ctl{dbg_ctl_guard.get()}; // Delete file whose path is specified in the constructor when the instance is destroyed. // @@ -450,11 +467,8 @@ class File_deleter class Ramp_test : private Send_to_vconn { public: - - struct Test_params - { - struct Half - { + struct Test_params { + struct Half { int n_groups_send, n_group_bytes, n_bytes_recv; }; @@ -471,12 +485,12 @@ class Ramp_test : private Send_to_vconn class _Send_recv : private Send_to_vconn, private Recv_from_vconn { public: - _Send_recv(TSVConn vconn_, std::shared_ptr f_del, int n_groups_send, int n_group_bytes, - bool allow_send_error, int n_bytes_recv) - : Send_to_vconn{vconn_, n_groups_send * n_group_bytes}, Recv_from_vconn(vconn_), _f_del{f_del} + _Send_recv(TSVConn vconn_, std::shared_ptr f_del, int n_groups_send, int n_group_bytes, bool allow_send_error, + int n_bytes_recv) + : Send_to_vconn{vconn_, n_groups_send * n_group_bytes}, Recv_from_vconn(vconn_), _f_del{f_del} { - TSDbg(dbg_ctl, "n_groups_send=%d n_group_bytes=%d allow_send_error=%c, n_bytes_recv=%d inst=%p", n_groups_send, - n_group_bytes, allow_send_error ? 'T' : 'F', n_bytes_recv, this); + TSDbg(dbg_ctl, "n_groups_send=%d n_group_bytes=%d allow_send_error=%c, n_bytes_recv=%d inst=%p", n_groups_send, n_group_bytes, + allow_send_error ? 'T' : 'F', n_bytes_recv, this); TSReleaseAssert(n_groups_send >= 0); TSReleaseAssert(n_group_bytes >= 0); @@ -488,8 +502,8 @@ class Ramp_test : private Send_to_vconn } _s.n_groups_remaining = n_groups_send; - _s.n_group_bytes = n_group_bytes; - _s.allow_error = allow_send_error; + _s.n_group_bytes = n_group_bytes; + _s.allow_error = allow_send_error; if (_s.n_groups_remaining) { --_s.n_groups_remaining; @@ -523,8 +537,7 @@ class Ramp_test : private Send_to_vconn private: std::shared_ptr _f_del; - struct _Send_fields - { + struct _Send_fields { int n_groups_remaining, n_group_bytes; bool allow_error; std::vector buf; @@ -533,8 +546,7 @@ class Ramp_test : private Send_to_vconn _Send_fields _s; - struct _Recv_fields - { + struct _Recv_fields { int n_bytes_remaining; unsigned char ramp_val{0}; }; @@ -572,11 +584,9 @@ Ramp_test::_Send_recv::_notify_send_to_vconn() if (TSIsDbgCtlSet(dbg_ctl) && (st != Send_to_vconn::IN_PROGRESS)) { TSDbg(dbg_ctl, "Ramp_test::_Send_recv::_notify_send_to_vconn: status=%d inst=%p", int(st), this); } - switch (st) - { + switch (st) { case Send_to_vconn::IN_PROGRESS: { if (_s.n_groups_remaining) { - --_s.n_groups_remaining; for (int i{0}; i < _s.n_group_bytes; ++i) { @@ -588,8 +598,7 @@ Ramp_test::_Send_recv::_notify_send_to_vconn() TSDbg(dbg_ctl, "Ramp_test::_Send_recv::_notify_send_to_vconn: done inst=%p", this); _done(mtx()); } - } - break; + } break; case Send_to_vconn::VIO_DONE: case Send_to_vconn::VCONN_SHUTDOWN_FOR_SENDING: _done(mtx()); @@ -597,8 +606,8 @@ Ramp_test::_Send_recv::_notify_send_to_vconn() case Send_to_vconn::ERROR: if (_s.allow_error) { - TSDbg(dbg_ctl, "Ramp_test::_Send_recv::_notify_send_to_vconn: error event: %d, inst=%p (error expected)", - int(error_event()), this); + TSDbg(dbg_ctl, "Ramp_test::_Send_recv::_notify_send_to_vconn: error event: %d, inst=%p (error expected)", int(error_event()), + this); } else { TSFatal(PINAME ": Ramp_test::_Send_recv::_notify_send_to_vconn: error event: %d, inst=%p", int(error_event()), this); @@ -617,8 +626,7 @@ Ramp_test::_Send_recv::_notify_recv_from_vconn() if (TSIsDbgCtlSet(dbg_ctl) && (st != Recv_from_vconn::IN_PROGRESS)) { TSDbg(dbg_ctl, "Ramp_test::_Send_recv::_notify_recv_from_vconn: status=%d inst=%p", int(st), this); } - switch (st) - { + switch (st) { case Recv_from_vconn::IN_PROGRESS: { while (_r.n_bytes_remaining) { int64_t avail = _avail(); @@ -631,8 +639,8 @@ Ramp_test::_Send_recv::_notify_recv_from_vconn() while (avail) { if (*cp != _r.ramp_val) { - TSFatal(PINAME ": Ramp_test::_Send_recv::_notify_recv_from_vconn: recv ramp val=%u expected ramp val=%u", - unsigned(*cp), unsigned(_r.ramp_val)); + TSFatal(PINAME ": Ramp_test::_Send_recv::_notify_recv_from_vconn: recv ramp val=%u expected ramp val=%u", unsigned(*cp), + unsigned(_r.ramp_val)); } ++cp; ++_r.ramp_val; @@ -643,8 +651,7 @@ Ramp_test::_Send_recv::_notify_recv_from_vconn() TSDbg(dbg_ctl, "Ramp_test::_Send_recv::_notify_recv_from_vconn: done inst=%p", this); _done(mtx()); } - } - break; + } break; case Recv_from_vconn::VCONN_SHUTDOWN_FOR_RECEIVING: TSVConnShutdown(Recv_from_vconn::vconn(), true, false); @@ -664,8 +671,7 @@ auto const Loopback_addr{inet_addr("127.0.0.1")}; int listen_fd, loopback_port; -struct Tcp_loopback -{ +struct Tcp_loopback { int connect_fd, accept_fd; }; @@ -698,10 +704,8 @@ std::shared_ptr global_file_deleter; void Ramp_test::x(Test_params const &p) { - TSReleaseAssert((p.connect_to_accept.n_groups_send * p.connect_to_accept.n_group_bytes) >= - p.connect_to_accept.n_bytes_recv); - TSReleaseAssert((p.accept_to_connect.n_groups_send * p.accept_to_connect.n_group_bytes) >= - p.accept_to_connect.n_bytes_recv); + TSReleaseAssert((p.connect_to_accept.n_groups_send * p.connect_to_accept.n_group_bytes) >= p.connect_to_accept.n_bytes_recv); + TSReleaseAssert((p.accept_to_connect.n_groups_send * p.accept_to_connect.n_group_bytes) >= p.accept_to_connect.n_bytes_recv); auto lp{make_loopback()}; @@ -710,13 +714,22 @@ Ramp_test::x(Test_params const &p) // If the receiver does not read even one byte of data, the sender will get an error. - new _Send_recv{vconn_connect, global_file_deleter, p.connect_to_accept.n_groups_send, p.connect_to_accept.n_group_bytes, - 0 == p.connect_to_accept.n_bytes_recv, p.accept_to_connect.n_bytes_recv}; - new _Send_recv{vconn_accept, global_file_deleter, p.accept_to_connect.n_groups_send, p.accept_to_connect.n_group_bytes, - 0 == p.accept_to_connect.n_bytes_recv, p.connect_to_accept.n_bytes_recv}; + new _Send_recv{vconn_connect, + global_file_deleter, + p.connect_to_accept.n_groups_send, + p.connect_to_accept.n_group_bytes, + 0 == p.connect_to_accept.n_bytes_recv, + p.accept_to_connect.n_bytes_recv}; + new _Send_recv{vconn_accept, + global_file_deleter, + p.accept_to_connect.n_groups_send, + p.accept_to_connect.n_group_bytes, + 0 == p.accept_to_connect.n_bytes_recv, + p.connect_to_accept.n_bytes_recv}; } -int global_cont_func(TSCont cont, TSEvent event, void *event_data) +int +global_cont_func(TSCont cont, TSEvent event, void *event_data) { nonNullPtrRel(cont); TSReleaseAssert(TS_EVENT_HTTP_READ_REQUEST_HDR == event); @@ -725,61 +738,61 @@ int global_cont_func(TSCont cont, TSEvent event, void *event_data) tp.connect_to_accept.n_groups_send = 100; tp.connect_to_accept.n_group_bytes = 200; - tp.connect_to_accept.n_bytes_recv = 100 * 200; + tp.connect_to_accept.n_bytes_recv = 100 * 200; tp.accept_to_connect.n_groups_send = 100; tp.accept_to_connect.n_group_bytes = 200; - tp.accept_to_connect.n_bytes_recv = 1; + tp.accept_to_connect.n_bytes_recv = 1; Ramp_test::x(tp); tp.connect_to_accept.n_groups_send = 100; tp.connect_to_accept.n_group_bytes = 200; - tp.connect_to_accept.n_bytes_recv = 0; + tp.connect_to_accept.n_bytes_recv = 0; tp.accept_to_connect.n_groups_send = 100; tp.accept_to_connect.n_group_bytes = 200; - tp.accept_to_connect.n_bytes_recv = 100 * 200; + tp.accept_to_connect.n_bytes_recv = 100 * 200; Ramp_test::x(tp); tp.connect_to_accept.n_groups_send = 100; tp.connect_to_accept.n_group_bytes = 200; - tp.connect_to_accept.n_bytes_recv = 100 * 200; + tp.connect_to_accept.n_bytes_recv = 100 * 200; tp.accept_to_connect.n_groups_send = 100; tp.accept_to_connect.n_group_bytes = 200; - tp.accept_to_connect.n_bytes_recv = 100 * 200; + tp.accept_to_connect.n_bytes_recv = 100 * 200; Ramp_test::x(tp); tp.connect_to_accept.n_groups_send = 10; tp.connect_to_accept.n_group_bytes = 20; - tp.connect_to_accept.n_bytes_recv = 10 * 20; + tp.connect_to_accept.n_bytes_recv = 10 * 20; tp.accept_to_connect.n_groups_send = 1000; tp.accept_to_connect.n_group_bytes = 2000; - tp.accept_to_connect.n_bytes_recv = 1000 * 2000; + tp.accept_to_connect.n_bytes_recv = 1000 * 2000; Ramp_test::x(tp); tp.connect_to_accept.n_groups_send = 1000; tp.connect_to_accept.n_group_bytes = 2000; - tp.connect_to_accept.n_bytes_recv = 1000 * 2000; + tp.connect_to_accept.n_bytes_recv = 1000 * 2000; tp.accept_to_connect.n_groups_send = 10; tp.accept_to_connect.n_group_bytes = 20; - tp.accept_to_connect.n_bytes_recv = 10 * 20; + tp.accept_to_connect.n_bytes_recv = 10 * 20; Ramp_test::x(tp); tp.connect_to_accept.n_groups_send = 3000; tp.connect_to_accept.n_group_bytes = 20000; - tp.connect_to_accept.n_bytes_recv = 3000 * 20000; + tp.connect_to_accept.n_bytes_recv = 3000 * 20000; tp.accept_to_connect.n_groups_send = 3000; tp.accept_to_connect.n_group_bytes = 20000; - tp.accept_to_connect.n_bytes_recv = 3000 * 20000; + tp.accept_to_connect.n_bytes_recv = 3000 * 20000; Ramp_test::x(tp); @@ -801,9 +814,9 @@ TSPluginInit(int n_arg, char const *arg[]) TSPluginRegistrationInfo info; - info.plugin_name = const_cast(PIName); - info.vendor_name = const_cast("apache"); - info.support_email = const_cast("edge@yahooinc.com"); + info.plugin_name = const_cast(PIName); + info.vendor_name = const_cast("apache"); + info.support_email = const_cast("edge@yahooinc.com"); if (TSPluginRegister(&info) != TS_SUCCESS) { TSError(PINAME ": failure calling TSPluginRegister."); @@ -832,7 +845,7 @@ TSPluginInit(int n_arg, char const *arg[]) listen_addr.sin_port = htons(loopback_port); listen_addr.sin_family = AF_INET; - for (int i{0}; ; ++i) { + for (int i{0};; ++i) { TSDbg(dbg_ctl, "bind() with TCP port %d", loopback_port); int ret = bind(listen_fd, reinterpret_cast(&listen_addr), sizeof(listen_addr)); if (ret >= 0) { diff --git a/tests/gold_tests/pluginTest/polite_hook_wait/polite_hook_wait.cc b/tests/gold_tests/pluginTest/polite_hook_wait/polite_hook_wait.cc index b9ff36bd465..6676572388d 100644 --- a/tests/gold_tests/pluginTest/polite_hook_wait/polite_hook_wait.cc +++ b/tests/gold_tests/pluginTest/polite_hook_wait/polite_hook_wait.cc @@ -41,23 +41,16 @@ namespace char PIName[] = PINAME; atscppapi::TSDbgCtlUniqPtr dbg_ctl_guard{TSDbgCtlCreate(PIName)}; -TSDbgCtl const * const dbg_ctl{dbg_ctl_guard.get()}; +TSDbgCtl const *const dbg_ctl{dbg_ctl_guard.get()}; -enum Test_step -{ - BEGIN, - GLOBAL_CONT_READ_HDRS, - THREAD, - TXN_CONT_READ_HDRS, - END -}; +enum Test_step { BEGIN, GLOBAL_CONT_READ_HDRS, THREAD, TXN_CONT_READ_HDRS, END }; -char const *step_cstr(int test_step) +char const * +step_cstr(int test_step) { char const *result{"BAD TEST STEP"}; - switch (test_step) - { + switch (test_step) { case BEGIN: result = "BEGIN"; break; @@ -83,7 +76,8 @@ char const *step_cstr(int test_step) int txn_count{0}; -void next_step(int curr) +void +next_step(int curr) { static std::atomic test_step{BEGIN}; @@ -110,11 +104,9 @@ atscppapi::TxnAuxMgrData mgr_data; class Blocking_action { public: - static void init(); private: - ~Blocking_action() { // This should either not block, or only block very briefly. @@ -128,7 +120,7 @@ class Blocking_action static int _global_cont_func(TSCont, TSEvent event, void *eventData); static int _txn_cont_func(TSCont, TSEvent event, void *eventData); - static void * _thread_func(void *vba); + static void *_thread_func(void *vba); TSContUniqPtr _txn_hook_cont{TSContCreate(_txn_cont_func, TSMutexCreate())}; std::atomic _cont_mutex_locked{false}; @@ -151,7 +143,8 @@ Blocking_action::init() TSHttpHookAdd(TS_HTTP_SEND_RESPONSE_HDR_HOOK, global.get()); } -int Blocking_action::_global_cont_func(TSCont, TSEvent event, void *eventData) +int +Blocking_action::_global_cont_func(TSCont, TSEvent event, void *eventData) { TSDbg(dbg_ctl, "entering _global_cont_func()"); @@ -159,8 +152,7 @@ int Blocking_action::_global_cont_func(TSCont, TSEvent event, void *eventData) TSHttpTxn txn{static_cast(eventData)}; - switch (event) - { + switch (event) { case TS_EVENT_HTTP_READ_REQUEST_HDR: { next_step(BEGIN); @@ -177,8 +169,7 @@ int Blocking_action::_global_cont_func(TSCont, TSEvent event, void *eventData) while (!ba._cont_mutex_locked.load(std::memory_order_acquire)) { std::this_thread::yield(); } - } - break; + } break; case TS_EVENT_HTTP_SEND_RESPONSE_HDR: next_step(TXN_CONT_READ_HDRS); @@ -201,7 +192,8 @@ int Blocking_action::_global_cont_func(TSCont, TSEvent event, void *eventData) return 0; } -void * Blocking_action::_thread_func(void *vba) +void * +Blocking_action::_thread_func(void *vba) { next_step(GLOBAL_CONT_READ_HDRS); @@ -227,7 +219,8 @@ void * Blocking_action::_thread_func(void *vba) return nullptr; } -int Blocking_action::_txn_cont_func(TSCont, TSEvent event, void *eventData) +int +Blocking_action::_txn_cont_func(TSCont, TSEvent event, void *eventData) { next_step(THREAD); @@ -256,9 +249,9 @@ TSPluginInit(int n_arg, char const *arg[]) TSPluginRegistrationInfo info; - info.plugin_name = const_cast(PIName); - info.vendor_name = const_cast("apache"); - info.support_email = const_cast("edge@yahooinc.com"); + info.plugin_name = const_cast(PIName); + info.vendor_name = const_cast("apache"); + info.support_email = const_cast("edge@yahooinc.com"); if (TSPluginRegister(&info) != TS_SUCCESS) { TSError(PINAME ": failure calling TSPluginRegister."); diff --git a/tests/gold_tests/pluginTest/tsapi/test_tsapi.cc b/tests/gold_tests/pluginTest/tsapi/test_tsapi.cc index f64b3b0718d..bb895beae75 100644 --- a/tests/gold_tests/pluginTest/tsapi/test_tsapi.cc +++ b/tests/gold_tests/pluginTest/tsapi/test_tsapi.cc @@ -42,10 +42,10 @@ namespace char PIName[] = PINAME; atscppapi::TSDbgCtlUniqPtr dbg_ctl_guard{TSDbgCtlCreate(PIName)}; -TSDbgCtl const * const dbg_ctl{dbg_ctl_guard.get()}; +TSDbgCtl const *const dbg_ctl{dbg_ctl_guard.get()}; atscppapi::TSDbgCtlUniqPtr off_dbg_ctl_guard{TSDbgCtlCreate("yada-yada-yada")}; -TSDbgCtl const * const off_dbg_ctl{off_dbg_ctl_guard.get()}; +TSDbgCtl const *const off_dbg_ctl{off_dbg_ctl_guard.get()}; // NOTE: It's important to flush this after writing so that a gold test using this plugin can examine the log before TS // terminates. diff --git a/tests/tools/plugins/custom204plugin.cc b/tests/tools/plugins/custom204plugin.cc index 461bc08e261..dc52dd7569a 100644 --- a/tests/tools/plugins/custom204plugin.cc +++ b/tests/tools/plugins/custom204plugin.cc @@ -42,10 +42,10 @@ local_handler(TSCont contp, TSEvent event, void *edata) "This response was sent via the custom204plugin via a call to TSHttpTxnErrorBodySet.\n" "
\n" ""; - TSHttpTxn txnp = static_cast(edata); - TSMBuffer bufp = nullptr; - TSMLoc hdr_loc = nullptr; - TSMLoc url_loc = nullptr; + TSHttpTxn txnp = static_cast(edata); + TSMBuffer bufp = nullptr; + TSMLoc hdr_loc = nullptr; + TSMLoc url_loc = nullptr; ; const char *host = nullptr; int host_length; diff --git a/tests/tools/plugins/ssl_client_verify_test.cc b/tests/tools/plugins/ssl_client_verify_test.cc index e48dae8971f..8b64e520c61 100644 --- a/tests/tools/plugins/ssl_client_verify_test.cc +++ b/tests/tools/plugins/ssl_client_verify_test.cc @@ -35,7 +35,7 @@ #include #include -#define PN "ssl_client_verify_test" +#define PN "ssl_client_verify_test" #define PCP "[" PN " Plugin] " std::map good_names; diff --git a/tests/tools/plugins/ssl_hook_test.cc b/tests/tools/plugins/ssl_hook_test.cc index 20be7822b36..c8a53d5fc64 100644 --- a/tests/tools/plugins/ssl_hook_test.cc +++ b/tests/tools/plugins/ssl_hook_test.cc @@ -32,7 +32,7 @@ #include #include -#define PN "ssl_hook_test" +#define PN "ssl_hook_test" #define PCP "[" PN " Plugin] " int diff --git a/tests/tools/plugins/ssl_secret_load_test.cc b/tests/tools/plugins/ssl_secret_load_test.cc index 654a717dbb1..1dd50fbefb8 100644 --- a/tests/tools/plugins/ssl_secret_load_test.cc +++ b/tests/tools/plugins/ssl_secret_load_test.cc @@ -37,7 +37,7 @@ #include #include -#define PN "ssl_secret_load_test" +#define PN "ssl_secret_load_test" #define PCP "[" PN " Plugin] " // Map of secret name to last modified time diff --git a/tests/tools/plugins/ssl_verify_test.cc b/tests/tools/plugins/ssl_verify_test.cc index 2ef3187a81d..6efff0ab1ae 100644 --- a/tests/tools/plugins/ssl_verify_test.cc +++ b/tests/tools/plugins/ssl_verify_test.cc @@ -33,7 +33,7 @@ #include #include -#define PN "ssl_verify_test" +#define PN "ssl_verify_test" #define PCP "[" PN " Plugin] " std::map bad_names;