/*
- * Copyright (c) 2020-2022 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2020-2024 Samsung Electronics Co., Ltd. All rights reserved.
*
* This file is licensed under the terms of MIT License or the Apache License
* Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
*/
#include <algorithm>
+#include <check-proper-drop.h>
#include <credentials.h>
+#include <dpl/errno_string.h>
+#include <dpl/exception.h>
#include <string>
#include <stdexcept>
-#include <dpl/exception.h>
#include <security-manager-types.h>
#include <sys/types.h>
#include <utils.h>
BOOST_REQUIRE_EQUAL("", possiblyUnterminatedArrayToString(a));
}
+POSITIVE_TEST_CASE(T294_checkThreads)
+{
+ pid_t myTid = gettid();
+ auto tids = CheckProperDrop::checkThreads(myTid);
+ BOOST_REQUIRE_MESSAGE(tids.count(myTid) == 0, "CheckProperDrop::checkThreads includes own tid");
+}
+
+POSITIVE_TEST_CASE(T295_GetErrnoString)
+{
+ std::string str = GetErrnoString(EINVAL);
+ BOOST_REQUIRE_MESSAGE(str != "", "empty string from GetErrnoString");
+}
+
+NEGATIVE_TEST_CASE(T296_GetErrnoString)
+{
+ int err = -1;
+ std::string str = GetErrnoString(err);
+ BOOST_REQUIRE_MESSAGE(str != "", "empty string from GetErrnoString");
+}
+
+
BOOST_AUTO_TEST_SUITE_END()