You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2023/01/13 19:19:15 UTC
[trafficserver] branch 10-Dev updated: Fix build issues in H3 unit tests (#9304)
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch 10-Dev
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/10-Dev by this push:
new cb99aa699 Fix build issues in H3 unit tests (#9304)
cb99aa699 is described below
commit cb99aa699d3f958ae0043b3f42d959c90b6b1060
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Fri Jan 13 12:19:06 2023 -0700
Fix build issues in H3 unit tests (#9304)
* Fix build issues in H3 unit tests
* Use ifndef
---
iocore/net/quic/Mock.h | 13 +++++++++++++
proxy/http3/test/test_QPACK.cc | 8 ++++++++
2 files changed, 21 insertions(+)
diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index a7c178619..3b0b31e26 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -27,7 +27,11 @@
#include "QUICApplication.h"
#include "QUICStreamManager.h"
+#if HAVE_QUICHE_H
+#include "QUICStreamManager_quiche.h"
+#else
#include "QUICStreamManager_native.h"
+#endif
#include "QUICLossDetector.h"
#include "QUICPacketProtectionKeyInfo.h"
#include "QUICPinger.h"
@@ -39,6 +43,11 @@
#include "QUICPadder.h"
#include "QUICHandshakeProtocol.h"
#include "QUICStreamAdapter.h"
+#if HAVE_QUICHE_H
+#include "QUICStream_quiche.h"
+#else
+#include "QUICStream_native.h"
+#endif
class MockQUICContext;
@@ -246,6 +255,7 @@ public:
MockQUICStreamManager(QUICContext *context) : QUICStreamManagerImpl(context, nullptr) {}
// Override
+#ifndef HAVE_QUICHE_H
virtual QUICConnectionErrorUPtr
handle_frame(QUICEncryptionLevel level, const QUICFrame &f) override
{
@@ -254,6 +264,7 @@ public:
return nullptr;
}
+#endif
// for Test
int
@@ -652,6 +663,7 @@ public:
{
return _config;
}
+#ifndef HAVE_QUICHE_H
virtual QUICRTTProvider *
rtt_provider() const override
{
@@ -681,6 +693,7 @@ public:
{
return _path_manager.get();
}
+#endif
private:
QUICConfig::scoped_config _config;
diff --git a/proxy/http3/test/test_QPACK.cc b/proxy/http3/test/test_QPACK.cc
index 178a6e3ce..6de8e189c 100644
--- a/proxy/http3/test/test_QPACK.cc
+++ b/proxy/http3/test/test_QPACK.cc
@@ -65,11 +65,19 @@ private:
};
// TODO: QUICUnidirectionalStream should be used if there
+#if HAVE_QUICHE_H
+class TestQUICStream : public QUICStreamImpl
+#else
class TestQUICStream : public QUICBidirectionalStream
+#endif
{
public:
TestQUICStream(QUICStreamId sid)
+#if HAVE_QUICHE_H
+ : QUICStreamImpl(new MockQUICConnectionInfoProvider(), sid)
+#else
: QUICBidirectionalStream(new MockQUICRTTProvider(), new MockQUICConnectionInfoProvider(), sid, 65536, 65536)
+#endif
{
}