projects
/
platform
/
core
/
security
/
key-manager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release 0.1.58.8
[platform/core/security/key-manager.git]
/
unit-tests
/
test_descriptor-set.cpp
diff --git
a/unit-tests/test_descriptor-set.cpp
b/unit-tests/test_descriptor-set.cpp
index
fb985bb
..
22bc578
100644
(file)
--- a/
unit-tests/test_descriptor-set.cpp
+++ b/
unit-tests/test_descriptor-set.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2014
- 2020 Samsung Electronics Co., Ltd All Rights R
eserved
+ * Copyright (c) 2014
-2020 Samsung Electronics Co., Ltd. All rights r
eserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-39,6
+39,7
@@
#include <descriptor-set.h>
#include <dpl/errno_string.h>
#include <descriptor-set.h>
#include <dpl/errno_string.h>
+#include <utils.h>
using namespace CKM;
using namespace CKM;
@@
-47,8
+48,6
@@
namespace {
const int POLL_TIMEOUT = 8000;
const int POLL_TIMEOUT_SHORT = 1000;
const int POLL_TIMEOUT = 8000;
const int POLL_TIMEOUT_SHORT = 1000;
-typedef std::unique_ptr<int[], std::function<void(int *)>> PipePtr;
-
const short POLLALL = std::numeric_limits<short>::max();
void closePipe(int *fd)
const short POLLALL = std::numeric_limits<short>::max();
void closePipe(int *fd)
@@
-65,7
+64,7
@@
void closePipe(int *fd)
#define PIPE(fd) \
int (fd)[2]; \
BOOST_REQUIRE_MESSAGE(0 == pipe((fd)), "Pipe creation failed: " << GetErrnoString()); \
#define PIPE(fd) \
int (fd)[2]; \
BOOST_REQUIRE_MESSAGE(0 == pipe((fd)), "Pipe creation failed: " << GetErrnoString()); \
-
PipePtr fd##Ptr((fd), closePipe
);
+
auto fd##Ptr = uptr<closePipe>((fd)
);
void unexpectedCallback(int, short)
{
void unexpectedCallback(int, short)
{
@@
-262,10
+261,10
@@
POSITIVE_TEST_CASE(T090_WriteAfterRead)
readFd(desc, fd[0], revents);
descriptors.remove(desc);
readFd(desc, fd[0], revents);
descriptors.remove(desc);
- descriptors.add(fd2[1], POLLOUT, [&](int desc
, short revents
) {
+ descriptors.add(fd2[1], POLLOUT, [&](int desc
2, short revents2
) {
callback2 = true;
callback2 = true;
- writeFd(desc
, fd2[1], revents
);
- descriptors.remove(desc);
+ writeFd(desc
2, fd2[1], revents2
);
+ descriptors.remove(desc
2
);
});
});
});
});