summaryrefslogtreecommitdiff
path: root/test/serialization
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-11-28 05:45:34 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-04 23:05:05 +0200
commit5c85e7024027c90b1b054782e510691b8b9c7419 (patch)
tree4fa3beff65de2a9a1236ad5c931b8e2495fd6eb2 /test/serialization
parent3dc3e2e61e548e4cd3e213b1b3022ed4d8e7ecee (diff)
libcamera: base: Rename FileDescriptor to SharedFD
Now that we have a UniqueFD class, the name FileDescriptor is ambiguous. Rename it to SharedFD. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/serialization')
-rw-r--r--test/serialization/ipa_data_serializer_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
index 5fcdcb8e..d2050a86 100644
--- a/test/serialization/ipa_data_serializer_test.cpp
+++ b/test/serialization/ipa_data_serializer_test.cpp
@@ -53,7 +53,7 @@ template<typename T>
int testPodSerdes(T in)
{
std::vector<uint8_t> buf;
- std::vector<FileDescriptor> fds;
+ std::vector<SharedFD> fds;
std::tie(buf, fds) = IPADataSerializer<T>::serialize(in);
T out = IPADataSerializer<T>::deserialize(buf, fds);
@@ -72,7 +72,7 @@ int testVectorSerdes(const std::vector<T> &in,
ControlSerializer *cs = nullptr)
{
std::vector<uint8_t> buf;
- std::vector<FileDescriptor> fds;
+ std::vector<SharedFD> fds;
std::tie(buf, fds) = IPADataSerializer<std::vector<T>>::serialize(in, cs);
std::vector<T> out = IPADataSerializer<std::vector<T>>::deserialize(buf, fds, cs);
@@ -92,7 +92,7 @@ int testMapSerdes(const std::map<K, V> &in,
ControlSerializer *cs = nullptr)
{
std::vector<uint8_t> buf;
- std::vector<FileDescriptor> fds;
+ std::vector<SharedFD> fds;
std::tie(buf, fds) = IPADataSerializer<std::map<K, V>>::serialize(in, cs);
std::map<K, V> out = IPADataSerializer<std::map<K, V>>::deserialize(buf, fds, cs);
@@ -198,7 +198,7 @@ private:
ControlSerializer cs(ControlSerializer::Role::Proxy);
/*
- * We don't test FileDescriptor serdes because it dup()s, so we
+ * We don't test SharedFD serdes because it dup()s, so we
* can't check for equality.
*/
std::vector<uint8_t> vecUint8 = { 1, 2, 3, 4, 5, 6 };
@@ -219,7 +219,7 @@ private:
};
std::vector<uint8_t> buf;
- std::vector<FileDescriptor> fds;
+ std::vector<SharedFD> fds;
if (testVectorSerdes(vecUint8) != TestPass)
return TestFail;
@@ -291,7 +291,7 @@ private:
{ { "a", { 1, 2, 3 } }, { "b", { 4, 5, 6 } }, { "c", { 7, 8, 9 } } };
std::vector<uint8_t> buf;
- std::vector<FileDescriptor> fds;
+ std::vector<SharedFD> fds;
if (testMapSerdes(mapUintStr) != TestPass)
return TestFail;
@@ -359,7 +359,7 @@ private:
std::string strEmpty = "";
std::vector<uint8_t> buf;
- std::vector<FileDescriptor> fds;
+ std::vector<SharedFD> fds;
if (testPodSerdes(u32min) != TestPass)
return TestFail;