/etc/dbus-1/system.d/security-tests.conf
/usr/bin/libsmack-test
+/usr/bin/smack-dbus-tests
/usr/bin/libprivilege-control-test
/usr/bin/security-server-tests-client-smack
/usr/bin/security-server-tests-server
/usr/bin/security-server-tests-password
/usr/bin/security-server-tests-privilege
/usr/bin/security-server-tests-stress
-/usr/bin/security-server-tests-dbus
/etc/smack/test_smack_rules_full
/etc/smack/test_smack_rules2
/etc/smack/test_smack_rules3
ADD_SUBDIRECTORY(ckm)
ADD_SUBDIRECTORY(libprivilege-control-tests)
ADD_SUBDIRECTORY(libsmack-tests)
+ADD_SUBDIRECTORY(smack-dbus-tests)
ADD_SUBDIRECTORY(security-server-tests)
ADD_SUBDIRECTORY(security-manager-tests)
ADD_SUBDIRECTORY(cynara-tests)
#
-#Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+#Copyright (c) 2013-2014 Samsung Electronics Co., Ltd All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
SET(TARGET_SEC_SRV_PRIVILEGE_TESTS "security-server-tests-privilege")
SET(TARGET_SEC_SRV_STRESS_TESTS "security-server-tests-stress")
SET(TARGET_SEC_SRV_MT_TESTS "security-server-tests-mt")
-SET(TARGET_SEC_SRV_DBUS_TESTS "security-server-tests-dbus")
SET(TARGET_SEC_SRV_MEASURER "security-server-tests-api-speed")
${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_mt.cpp
)
-SET(SEC_SRV_DBUS_SOURCES
- ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_dbus.cpp
- )
-
SET(SEC_SRV_MEASURER_SOURCES
${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_measurer_API_speed.cpp
${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_mockup.cpp
ADD_EXECUTABLE(${TARGET_SEC_SRV_PRIVILEGE_TESTS} ${SEC_SRV_PRIVILEGE_SOURCES})
ADD_EXECUTABLE(${TARGET_SEC_SRV_STRESS_TESTS} ${SEC_SRV_STRESS_SOURCES})
ADD_EXECUTABLE(${TARGET_SEC_SRV_MT_TESTS} ${SEC_SRV_MT_SOURCES})
-ADD_EXECUTABLE(${TARGET_SEC_SRV_DBUS_TESTS} ${SEC_SRV_DBUS_SOURCES})
ADD_EXECUTABLE(${TARGET_SEC_SRV_MEASURER} ${SEC_SRV_MEASURER_SOURCES})
tests-common
)
-TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_DBUS_TESTS}
- ${SEC_SRV_TESTS_DEP_LIBRARIES}
- dpl-test-framework
- tests-common
- )
-
TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_MEASURER}
${TARGET_SEC_SRV_COMMON}
${SEC_SRV_TESTS_DEP_LIBRARIES}
INSTALL(TARGETS ${TARGET_SEC_SRV_PRIVILEGE_TESTS} DESTINATION /usr/bin)
INSTALL(TARGETS ${TARGET_SEC_SRV_STRESS_TESTS} DESTINATION /usr/bin)
INSTALL(TARGETS ${TARGET_SEC_SRV_MT_TESTS} DESTINATION /usr/bin)
-INSTALL(TARGETS ${TARGET_SEC_SRV_DBUS_TESTS} DESTINATION /usr/bin)
INSTALL(TARGETS ${TARGET_SEC_SRV_MEASURER} DESTINATION /usr/bin)
INSTALL(FILES
# 'text' - console output
# 'summary' - used for summary view
security-tests.sh smack --output=text --output=summary $ign
+security-tests.sh smack-dbus --output=text --output=summary $ign
#security-tests.sh libprivilege-control --output=text --output=summary $ign
security-tests.sh ss-clientsmack --output=text --output=summary $ign
security-tests.sh ss-server --output=text --output=summary $ign
security-tests.sh ss-password --output=text --output=summary $ign
security-tests.sh ss-privilege --output=text --output=summary $ign
-security-tests.sh ss-dbus --output=text --output=summary $ign
security-tests.sh ss-stress --output=text --output=summary $ign
security-tests.sh security-manager --output=text --output=summary $ign
security-tests.sh cynara --output=text --output=summary $ign
#!/bin/sh
#####################################################################
-# Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2012-2014 Samsung Electronics Co., Ltd All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
echo
libsmack-test "${@:2}" # propagate all remaining arguments (except first)
;;
+"smack-dbus")
+ echo "========================================================================="
+ echo "SMACK DBUS TEST"
+ echo
+ smack-dbus-tests "${@:2}"
+ ;;
"libprivilege-control")
echo "========================================================================="
echo $1
echo
security-server-tests-privilege "${@:2}"
;;
-"ss-dbus")
- echo "========================================================================="
- echo "SECURITY SERVER TEST DBUS"
- echo
- security-server-tests-dbus "${@:2}"
- ;;
"security-manager")
echo "========================================================================="
echo "SECURITY MANAGER TESTS"
echo "Correct using:"
echo " security_test.sh <module> <args_for_module>"
echo
- echo "modules: smack, libprivilege-control, ss-clientsmack"
+ echo "modules: smack, smack-dbus, libprivilege-control, ss-clientsmack"
echo " ss-server, ss-api-speed, ss-password, ss-stress"
echo " ss-privilege, security-manager, cynara"
;;
--- /dev/null
+#
+#Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# @file CMakeLists.txt
+# @author Michal Eljasiewicz (m.eljasiewic@samsung.com)
+# @brief
+#
+
+INCLUDE(FindPkgConfig)
+
+# Dependencies
+PKG_CHECK_MODULES(SMACK_DBUS_TESTS_DEP
+ libsmack
+ dbus-1
+ dbus-glib-1
+ REQUIRED)
+
+# Targets definition
+
+INCLUDE_DIRECTORIES(SYSTEM
+ ${SMACK_DBUS_TESTS_DEP_INCLUDE_DIRS}
+ )
+
+SET(TARGET_SMACK_DBUS_TESTS "smack-dbus-tests")
+
+# Sources definition
+
+SET(SMACK_DBUS_SOURCES
+ ${PROJECT_SOURCE_DIR}/tests/smack-dbus-tests/smack_dbus_tests.cpp
+ )
+
+INCLUDE_DIRECTORIES(
+ ${PROJECT_SOURCE_DIR}/tests/common/
+ )
+
+ADD_DEFINITIONS("-I/usr/include/dbus-1.0")
+
+ADD_EXECUTABLE(${TARGET_SMACK_DBUS_TESTS} ${SMACK_DBUS_SOURCES})
+
+TARGET_LINK_LIBRARIES(${TARGET_SMACK_DBUS_TESTS}
+ ${SMACK_DBUS_TESTS_DEP_LIBRARIES}
+ dpl-test-framework
+ tests-common
+ )
+
+# Installation
+
+INSTALL(TARGETS ${TARGET_SMACK_DBUS_TESTS} DESTINATION /usr/bin)
-#include <stdio.h>
+#include <cstring>
#include <unistd.h>
#include <sys/smack.h>
#include <dpl/test/test_runner.h>
#include <dpl/test/test_runner_multiprocess.h>
-#include <dpl/log/log.h>
#include <dbus/dbus.h>
-#include <dbus-glib.h>
-#include <glib-object.h>
#include <summary_collector.h>
#include "tests_common.h"
-#include "security-server.h"
-#include "privilege-control.h"
#define DBUS_SERVER_NAME "test.method.server"
#define DBUS_CALLER_NAME "test.method.caller"
#define DBUS_SMACK_INTERFACE "org.freedesktop.DBus"
#define DBUS_SMACK_METHOD "GetConnectionCredentials"
-RUNNER_TEST_GROUP_INIT(SECURITY_SERVER_TESTS_DBUS);
+RUNNER_TEST_GROUP_INIT(SMACK_DBUS);
RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
{
//////NOSMACK ENV TESTS////////////////
///////////////////////////////////////
-/**
- * NOSMACK version of tc01 test.
- *
- * This is almost an exact copy of the original SMACK DBus test. As in previous security-server
- * tests, parts where SMACK is used are skipped, because most important functions will return error.
- */
RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
{
int ret = -1;