platform/core/test/security-tests.git
10 years agoAdd new Libprivilege and Security-Server API tests.
Marcin Lis [Thu, 3 Oct 2013 14:20:27 +0000 (16:20 +0200)]
Add new Libprivilege and Security-Server API tests.

[Issue#]       SSDWSSP-527
[Feature]      N/A
[Cause]        New API for checking app permission assignment created.
[Solution]     Use new API functions in libprivilege-tests and
               security-server-tests-server.
               Also tc09 and tc10 in ssts are now corrected.
[Verification] Build, install & run tests.

Change-Id: I4fe8b9f3699f60f7a63d92332ba5fa910ca2400d

10 years agoRemove hardcode uid's & gid's
Marek Smolinski [Tue, 24 Sep 2013 06:24:45 +0000 (08:24 +0200)]
Remove hardcode uid's & gid's

    [Issue#]       SSDWSSP-532
    [Feature/Bug]  N/A
    [Cause]
    [Solution]     Add gid's & uid's in common header

    [Verification] Build, run tests

Change-Id: I80aae956613896de6f19f82b417cd3a54214a08e

10 years agoAdd new test cases for password service v2 for better error checking.
Michal Witanowski [Thu, 17 Oct 2013 12:20:13 +0000 (14:20 +0200)]
Add new test cases for password service v2 for better error checking.

[Issue#]        SSDWSSP-593
[Bug/Feature]   Add new test cases in order to test security server
                behavior in various scenarios.
[Cause]         N/A
[Solution]      The following test cases have been created:
                - tc34_security_server_max_attempts
                - tc35_security_server_decrease_max_attempts
                - tc36_security_server_challenge_history_passwords
                - tc37_security_server_challenge_mixed
                - tc38_security_server_history_depth_change
                - tc39_security_server_attempts_num_check_after_reset
                - tc40_security_server_history_check_after_reset
[Verification]  Build, install and run security server's password
                tests. All of them should pass without any problems
                under new SS (which can be found here:
                http://slp-info.sec.samsung.net/gerrit/#/c/289969/).

Change-Id: Ic72a564d49d6919ac3a376cd821bdcdf71940d81

10 years agoAdapt security-server tests to new SS password service
Lukasz Kostyra [Tue, 24 Sep 2013 07:28:08 +0000 (09:28 +0200)]
Adapt security-server tests to new SS password service

[Issue#]        N/A
[Bug]           N/A
[Cause]         Incorrect return values expected by asserts.
[Solution]      Correct return values expected by asserts.
[Verification]  Build, install, run security-server-tests-password. All tests should pass.

Change-Id: I351655de0e4e3d76b737a38c226d933e878aafa5

10 years agoFix set_app_privilege tests
Piotr Bartosiewicz [Tue, 12 Nov 2013 16:46:49 +0000 (17:46 +0100)]
Fix set_app_privilege tests

[Issue#]        N/A
[Bug/Feature]   privilege_control05_set_app_privilege tests fails
[Cause]         perm_end fails after perm_app_set_privilege call
[Solution]      Remove transaction around perm_app_set_privilege calls
[Verification]  Build, install, run tests

Change-Id: Ida1b94eff78180a217f9410f1d168d75a43179e3

10 years agoFix libprivilege-control nosmack tests
Piotr Bartosiewicz [Fri, 18 Oct 2013 14:04:43 +0000 (16:04 +0200)]
Fix libprivilege-control nosmack tests

[Issue#]        SSDWSSP-581
[Bug]           Many of libprivilege tests fail on nosmack kernel
[Cause]         The test cases are not adjusted to the new version of
                libprivilege.
[Solution]      Don't use deprecated APP_TYPE_OTHER; use DB_BEGIN,
                DB_END, perm_app_install, where it is expected; don't
                check SMACK_RULES_DIR dir while it is not used amymore.
[Verification]  Build, install (with new libprivilege) and check on
                smack and no-smack version of kernel.

Change-Id: I8bbf53857c9f1b69a0f40e606c0e9fe795ab0ba2

10 years agoFixing security-server client nosmack tests.
Marcin Niesluchowski [Mon, 28 Oct 2013 15:27:36 +0000 (16:27 +0100)]
Fixing security-server client nosmack tests.

[Issue#]        SSDWSSP-603
[Bug/Feature]   Security-server client smack tests fail.
[Cause]         Incorrect and redundant use of smack_set_label_for_self function.
[Solution]      Separating tests for smack enabled and disabled removing unwanted
                functions.
[Verification]  Running tests. All security-server client tests *_get_uid_* and
                *_get_gid_* tests should pass.

Change-Id: Iee48bc2e3bddc7f23cd9392febe385a8021a373a

10 years agoUpgrade libsmack npruntime tests.
Marcin Lis [Fri, 25 Oct 2013 08:38:05 +0000 (10:38 +0200)]
Upgrade libsmack npruntime tests.

[Issue#]       SSDWSSP-599
[Feature]      N/A
[Cause]        libprivilege-control and smack-privilege-config changed.
[Solution]     Test case nr 20 changed from general to SMACK version, few
               instructions added. New NOSMACK version of this test case is
               now created.
[Verification] Build, install and run tests including the following commits:
               http://slp-info.sec.samsung.net/gerrit/#/c/315582/
               http://slp-info.sec.samsung.net/gerrit/#/c/315493/

               Run tests on target without smack also.

Change-Id: Id156de668557d590155970e8b91145cf8a5217f9

10 years agoImplement test for adding new WRT rules in libprivilege-control
Marcin Lis [Wed, 23 Oct 2013 10:44:29 +0000 (12:44 +0200)]
Implement test for adding new WRT rules in libprivilege-control

[Issue#]       SSDWSSP-599
[Feature]      New test for perm_app_setup_path with
               new option PERM_APP_PATH_RUNTIME.
[Cause]        New functionality.
[Solution]     New test case nr 20 in libprivilege tests.
               Currently ignored tc 20 switched to tc 21.
[Verification] Build, install, run:
               # libprivilege-control-test --output=text
               Verify that tc20 npruntime is passing and no
               other test cases are affected.

               Synchronize libprivilege with the following commit:
               http://slp-info.sec.samsung.net/gerrit/#/c/314185/

Change-Id: I468a6091997d608ff2b10ebd893b88fca8bf641f

10 years agoChecking whether required application is installed
Piotr Bartosiewicz [Tue, 8 Oct 2013 14:51:06 +0000 (16:51 +0200)]
Checking whether required application is installed

[Issue#]        SSDWSSP-573
[Bug/Feature]   Poor assertion message when wrt or osp application is
                not installed correctly.
[Cause]         Tested process calls exit so there is printed useless
                message 'Reading pipe error'.
[Solution]      Additional checks are added before api call.
[Verification]  Build, install, run tests.

Change-Id: Ia25efb5d8d5ca6450277d11b84b5345efa92a636

10 years agoAdd antivirus privilege test cases
Lukasz Kostyra [Thu, 12 Sep 2013 08:32:22 +0000 (10:32 +0200)]
Add antivirus privilege test cases

[Issue#]        SSDWSSP-491
[Feature]       Add test cases checking if AV has access to every type of folders set by
                perm_app_setup_path - GROUP_RW, SETTINGS_RW, PUBLIC_RO. Both SMACK and NOSMACK
                version of tests was added.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build and run libprivilege-control-test. Test should pass both on SMACK and NOSMACK
                environment.

Change-Id: Ie073095f4ca78e86f9d7a7e1d5ec5e7014229504

10 years agoAdd DB::Transaction class. Change tests to use new libprivilege API.
Marcin Lis [Tue, 24 Sep 2013 10:49:23 +0000 (12:49 +0200)]
Add DB::Transaction class. Change tests to use new libprivilege API.

[Issue#]       SSDWSSP-183
[Bug/Feature]  N/A
[Cause]        N/A
[Solution]     Added class DB::Transaction which opens and closes transaction.
               Added macros DB_BEGIN and DB_END that determine DB::Transaction
               class object lifetime which in turn start and commit
               db transactions.
               Also macros used in tests to reduce test-execution time.
[Verification] Build, install, run tests.

Change-Id: I90b48c27e352fb24e9c57ec7b1bb9005d8f0fd2d

10 years agoAdd README file
Jan Cybulski [Wed, 2 Oct 2013 13:28:39 +0000 (15:28 +0200)]
Add README file

        [Issue#]       SSDWSSP-528
        [Bug/Feature]  Added README file.
        [Cause]        N/A
        [Solution]     N/A
        [Verification] N/A

Change-Id: I450c156bc8a133808babd7321ef9e4ddc11e5553

10 years agoFixing client smack tests.
Marcin Niesluchowski [Mon, 23 Sep 2013 15:25:02 +0000 (17:25 +0200)]
Fixing client smack tests.

[Issue#]        SSDWSSP-543
[Bug/Feature]   Root privileges are dropped in main test process and remaining
                tests in SECURITY_SERVER_TESTS_CLIENT_SMACK group run with them
                and fail when line with RUNNER_IGNORED_MSG deleted.
[Cause]         Changing test macros from RUNNER_CHILD* to RUNNER_MULTIPROCESS*
                on one smack and one nosmack test resulted in passing dropped
                root privileges in main process to tests run after those. Those
                privileges were held by RUNNER_CHILD* macros.
[Solution]      Keeping that macros for collecting result puposes and running
                both processes droping root privilege in child.
[Verification]  Building and running security-tests.sh ss-clientsmack. No tests
                should fail.

Change-Id: I7b1b4974dedd9a9d1d96e952411aa01cd4f3399b

10 years agoCompilation flags 'verbose' mode
Marcin Lis [Fri, 20 Sep 2013 11:55:21 +0000 (13:55 +0200)]
Compilation flags 'verbose' mode

[Issue#]       SSDWSSP-496
[Bug/Feature]  N/A
[Cause]        Potential bug - CMAKE_VERBOSE_MAKEFILE is not turned ON in
               packaging spec file, so the default value is used.
[Solution]     Turn ON the flag explicitly.
               Also, now it is possible to choose "built_type" using gbs.
[Verification] Build, verify that compile flags passed to gcc are visible
               using different build types (in gbs: --define "build_type ...").

Change-Id: I16dc7e13c86de27617f742ebb360f77cf81a4a16

10 years agoRemove useless nosmack tests
Marcin Lis [Thu, 19 Sep 2013 08:58:36 +0000 (10:58 +0200)]
Remove useless nosmack tests

[Issue#]       N/A
[Bug/Feature]  Clean up tests.
[Cause]        Some tests use deprecated or not implemented
               functions from libprivilege API.
[Solution]     Two test cases removed.
[Verification] Build, install, run tests.

Change-Id: I47f51f404a128a9517ef02b7a2af70faaed14d9c

10 years agoBig gid check fixed
Krzysztof Jackiewicz [Wed, 18 Sep 2013 12:35:59 +0000 (14:35 +0200)]
Big gid check fixed

[Issue#] N/A
[Feature/Bug] N/A
[Problem] Failing test tc04_security_server_check_privilege_weird_input_case
[Cause] Test was checking if big (>2^16) gid values are acceptable, but there
was no privilege for given gid.
[Solution] Expected value changed from SECURITY_SERVER_API_SUCCESS to
SECURITY_SERVER_API_ERROR_ACCESS_DENIED.

[Verification] Run tests. tc04_security_server_check_privilege_weird_input_case should pass.

Change-Id: Ibc7e624cfceb6d9018b685fb83340e693bcf93e0

10 years agoFix tests scripts.
Bartlomiej Grzelewski [Wed, 18 Sep 2013 13:28:05 +0000 (15:28 +0200)]
Fix tests scripts.

[Issue#]   N/A
[Bug]      Test scripts failed.
[Cause]    security-server-tests-label has been removed.
[Solution] remove call of security-server-test-label from scripts.

[Verification] Build, run tests.

Change-Id: I72bcbdc0970c2b4080279abe4d98f6539ed8ae81

10 years agoClean up libprivilege-control test cases
Zofia Abramowska [Fri, 13 Sep 2013 18:15:29 +0000 (20:15 +0200)]
Clean up libprivilege-control test cases

[Issue#] N/A
[Bug/Feature] N/A
[Cause] All test cases were in one file of 4200 lines.
[Solution] Divided test cases by functionalities tested :
normaln, nosmack, incorrect parameters, stress tests. Put them
in different source files, removed unused includes and macros,
created commons containing macros/functions used by different tests.
Created RUNNER GROUP for every funcionality.
[Verification] Build. Run libprivilege-control-test --output=text
--runignored - all tests should pass except for 4 ignores.

Change-Id: Iaf905e0cdcda043974958d294cc85e60e8d40752

10 years agoMoving ss-label to ss-client-smack
Zofia Abramowska [Wed, 11 Sep 2013 15:03:27 +0000 (17:03 +0200)]
Moving ss-label to ss-client-smack

[Issue#] N/A
[Feature/Bug] N/A
[Cause] Unnecessary separate binary for one test.
[Solution] Moved ss-label to ss-client-smack test cases.
[Verification] Build. Install. Run ss-client-smack (should be 8
passing tests).

Change-Id: I63e194dfa3eae7f07ead130f85820ecf018a5e19

10 years agoFix tests for new api get_cookie_gid/get_cookie_uid.
Bartlomiej Grzelewski [Tue, 10 Sep 2013 15:19:29 +0000 (17:19 +0200)]
Fix tests for new api get_cookie_gid/get_cookie_uid.

[Issue#]   N/A
[Bug]      N/A
[Problem]  Test did not work.
[Solution] N/A

[Verification] Build, run tests security-server-tests-client-smack

Change-Id: If94615d5481386cfda6f6c45aa70b3bcc318988f

10 years agoAdded test cases for new security server API
Pawel Polawski [Mon, 9 Sep 2013 17:01:46 +0000 (19:01 +0200)]
Added test cases for new security server API

[Issue#]        Test cases for get_gid, get_uid API
[Bug/Feature]   New test cases
[Cause]         New API added and need tests
[Solution]      New tests added
[Verification]  Compile, run tests

Change-Id: I846ba6934aa47be0033bcd706e5ac6391936998a

10 years agoTurn on -Werror flag during compilation.
Bartlomiej Grzelewski [Thu, 12 Sep 2013 09:52:58 +0000 (11:52 +0200)]
Turn on -Werror flag during compilation.

[Issue#]   N/A
[Bug]      N/A
[Problem]  New code adds compilation warnings.
[Solution] Warnings will be treated as errors.

[Verification] Successful build.

Change-Id: I2edd170f5ed3bbe4fcb189579274908ae76ec1f5

10 years agoChanging tests to run properly on RUNNER_MULTIPROCESS_TEST macro.
Marcin Niesluchowski [Tue, 27 Aug 2013 16:42:37 +0000 (18:42 +0200)]
Changing tests to run properly on RUNNER_MULTIPROCESS_TEST macro.

[Issue#]        SSDWSSP-438
[Bug/Feature]   While failing, test case exits with several processes. Tests
                are duplicated.
[Cause]         No multiprocessing assert handling.
[Solution]      Adding new test case types to wrt-commons:
                http://slp-info.sec.samsung.net/gerrit/#/c/267716/
[Verification]  Building wrt-commons and running tests. If failing, shold exit
                properly (one process at the end of the test case).

Change-Id: Ib373141bdf577c00cf1c66fe54ad97e0d3e2701c

10 years agoTests of new implementation of libprivilege.
Jan Olszak [Thu, 29 Aug 2013 16:22:33 +0000 (18:22 +0200)]
Tests of new implementation of libprivilege.

    [Issue#]   SSDWSSP-183
    [Problem]  Tests for new implementation of libprivilege failed
    [Cause]    N/A
    [Solution] N/A
    [Verification] Build and run tests.

Change-Id: I08eb090eaaf327e4b66b9554676e9e2c5e54e81d

10 years agoAdditional asserts for ~APP~ label
Krzysztof Jackiewicz [Wed, 4 Sep 2013 15:31:13 +0000 (17:31 +0200)]
Additional asserts for ~APP~ label

[Issue#] N/A
[Feature/Bug] N/A
[Problem] Currently it is possible to use ~APP~ as a label
[Cause] smack_label_is_valid has been adjusted to allow such label for new
features but it's also used elsewhere
[Solution] Test cases extended to cover such situation

[Verification] Launch tests. Tests 21f-21j will fail. They should all pass
after libprivilege is fixed

Change-Id: I530f1939ec6ad4f3b9232aa1492fe5a81989bec4

10 years agoCorrect tests due to change in Security Server password validity calculation
Marcin Lis [Fri, 30 Aug 2013 10:45:29 +0000 (12:45 +0200)]
Correct tests due to change in Security Server password validity calculation

[Issue#]       SSDWSSP-332
[Bug]          Two tests fails after correction in Security Server
[Cause]        Test cases tc10 and tc18 use UINT_MAX as a value of valid_days
               for password setting. This value is now rejected by SS pwd,
               because it causes overflow when changing number of days to
               seconds.
[Solution]     Checking if UINT_MAX is correctly rejected when trying to set pwd
               Added calculation of proper max number of valid days that will
               not cause unsigned int overflow while changing to seconds.
[Varification] Build and run tests.

Change-Id: I25139243d11eba4eb58e79db0fc3b869eedb26e6

10 years agoCreate stress test for libprivilege-control API
Marcin Lis [Wed, 21 Aug 2013 15:49:51 +0000 (17:49 +0200)]
Create stress test for libprivilege-control API

[Issue#]       SSDWSSP-405
[Feature]      New stress tests
[Cause]        This kind of test did not exist previously
[Solution]     Two test cases added:
               * Install and uninstall the same app 100 times, each time
                 app gets some privileges (to shared folders & from api features)
               * Install and uninstall set of 10 apps 10 times.
                 Installed applications have various kind of permissions
                 to each other from api-features and shared folders.
[Verification] Build and run all tests:
               * Previous tests should not be affected
               * New test case should pass.

Change-Id: I5003981456f502a89e334e320e89500fb4647a7f

10 years agoRemove compilation warnings from libprivilege-control tests
Lukasz Kostyra [Wed, 28 Aug 2013 08:31:53 +0000 (10:31 +0200)]
Remove compilation warnings from libprivilege-control tests

[Issue#]        SSDWSSP-482
[Bug]           Libprivilege-control tests displayed warnings during compilation.
[Cause]         N/A
[Solution]      Replace deprecated functions with their replacements, supress warnings for functions
                that have no replacements, remove other warnings.
[Verification]  Build package - no warnings should appear. Run libprivilege-control-tests, all tests
                should pass just as they did earlier.

Change-Id: I41e2f69ad7fb1ff38b04eb7bcdfefcb7248fc0a9

10 years agoAdd security-server tests for NOSMACK environment.
Lukasz Kostyra [Tue, 13 Aug 2013 06:06:07 +0000 (08:06 +0200)]
Add security-server tests for NOSMACK environment.

[Issue#]        SSDWSSP-417
[Feature]       Add new security-server tests that test security-server behaviour on NOSMACK
                environment.
[Cause]         When previous tests were launched on NOSMACK environment they returned false errors
                because the system behaved differently with SMACK turned off.
[Solution]      Creating new tests that would expect different behaviour from security-server.
[Verification]  After successful compilation launch security-server tests on NOSMACK environment.
                Tests that previously failed and were turned off in one of my previous commits
                should appear with "_nosmack" ending in name.

Change-Id: I8c03ed8d97ff970f684466f6927a6e01f0c43d46

10 years agoAdd libsmack tests for NOSMACK environment.
Lukasz Kostyra [Wed, 7 Aug 2013 13:18:06 +0000 (15:18 +0200)]
Add libsmack tests for NOSMACK environment.

[Issue#]        SSDWSSP-417
[Feature]       Add new libsmack tests that test libsmack behaviour on NOSMACK environment.
[Cause]         When previous tests were launched on NOSMACK environment they returned false errors
                because the system behaved differently with SMACK turned off.
[Solution]      Creating new tests that would expect different behaviour from libsmack.
[Verification]  After successful compilation launch libsmack tests on NOSMACK environment.
                Tests that previously failed and were turned off in one of my previous commits
                should appear with "_nosmack" ending in name.

Change-Id: I8a8df3d92efb2a373aeef10c73c24e635d85229f

10 years agoAdd libprivilege-control tests for NOSMACK environment.
Lukasz Kostyra [Wed, 7 Aug 2013 14:38:35 +0000 (16:38 +0200)]
Add libprivilege-control tests for NOSMACK environment.

[Issue#]        SSDWSSP-417
[Feature]       Add new libsprivilege-control tests that test libprivilege-control behaviour on
                NOSMACK environment. Remove stub test cases used to test macros for different
                testing environments.
[Cause]         When previous tests were launched on NOSMACK environment they returned false errors
                because the system behaved differently with SMACK turned off.
[Solution]      Creating new tests that would expect different behaviour from libprivilege-control.
[Verification]  After successful compilation launch libprivilege-control tests on NOSMACK env.
                Tests that previously failed and were turned off in one of my previous commits
                should appear with "_nosmack" ending in name.

Change-Id: Ib15fcf5b6a7d60b55aef596c17475f170bfe4a1b

10 years agoAdd test cases which check libprivilege-control params
Lukasz Kostyra [Thu, 18 Jul 2013 11:14:44 +0000 (13:14 +0200)]
Add test cases which check libprivilege-control params

[Issue#]        SSDWSSP-376
[Feature]       Test cases which call libprivilege-control functions with incorrect arguments.
[Cause]         Many libprivilege-control API functions didn't check for incorrect arguments and
                could cause crashes this way.
[Solution]      A new test cases were added: one for regular API functions, one for deprecated API
                functions, one for not completed API functions (the latter one is ignored).
[Verification]  Run libprivilege-control-test.

Change-Id: I911cc58c3acb2883c41a8e31360010ce57ace1f7

10 years agoUpdate tests after wrt-commons path.
Bartlomiej Grzelewski [Thu, 18 Jul 2013 13:01:56 +0000 (15:01 +0200)]
Update tests after wrt-commons path.

Wrt-commons supports RUNNER_IGNORE_MSG in child test now.

[Issue#]   N/A
[Bug]      N/A
[Problem]  N/A
[Solution] N/A

[Verification] Build & run.

Change-Id: I821e86e0057bc09ad2dca3441dc6871cbe0dcafd

10 years agoCorrect api-feature tests
Marcin Lis [Wed, 21 Aug 2013 15:46:59 +0000 (17:46 +0200)]
Correct api-feature tests

[Issue#]       SSDWSSP-405
[Bug]          Bad string formats
[Cause]        Bug in libprivilege
[Solution]     Removed incorrect characters " ------" form checks
[Verification] Build and run all tests

Change-Id: I906756a14bfc8a136338778464e7e430c7747495

10 years agoRemove unused test for PID reusage
Marcin Lis [Fri, 2 Aug 2013 11:00:11 +0000 (13:00 +0200)]
Remove unused test for PID reusage

[Issue#] SSDWSSP-423
[Bug/Feature] -
[Cause] This test suite is no longer needed
[Solution] Removing files and build entries associated with this test
        suite

[Verification] Build and run all tests.
        Verify that the test suite: security-server-tests-pid-reuser
        is no longer present in test scripts and system binaries.

Change-Id: I9448fc298c64c8aad451441e9eff949d0222a898

10 years agoAdapt tests for a new libsmack API
Jan Cybulski [Thu, 25 Jul 2013 09:42:58 +0000 (11:42 +0200)]
Adapt tests for a new libsmack API

    [Issue#]   SSDWSSP-433
    [Bug]      N/A
    [Cause]    Changed API of libsmack.
    [Problem]  Function smack_new_label_from_socket() is now returning value greater than 0 on success, not 0 as it was before.
    [Solution] Changes of expected function results
    [Verification] Run tests.

Change-Id: I713319cddd53306be609e4dc33fdf7c2b74f457a

10 years agoChanging security-server tests to match no empty password string case.
Marcin Niesluchowski [Thu, 8 Aug 2013 12:20:43 +0000 (14:20 +0200)]
Changing security-server tests to match no empty password string case.
New empty password given should return SECURITY_SERVER_API_ERROR_INPUT_PARAM.

[Issue#]        SSDWSSP-422
[Bug/Feature]   Security-server empty password issue was unclear.
[Cause]         N/A
[Solution]      N/A
[Verification]  Run ss-password tests based on security-server
                http://slp-info.sec.samsung.net/gerrit/#/c/259876/ commit.

Change-Id: Iaa44daba668f7aa1149e0c55adf993504eec8c07

10 years agoSplit existing tests into environment categories.
Lukasz Kostyra [Wed, 31 Jul 2013 09:26:37 +0000 (11:26 +0200)]
Split existing tests into environment categories.

[Issue#]        SSDWSSP-416
[Feature]       Split existing tests into two categories: those that pass only on SMACK environment
                and those that pass no matter if SMACK exists on the system or not.
[Cause]         Launching tests on NOSMACK environment caused them to fail, because the environment
                behaved differently when SMACK was turned off. Failing tests expected different
                results than they should have.
[Solution]      Using recently added macros RUNNER_TEST_SMACK and RUNNER_CHILD_TEST_SMACK tests were
                split into two categories mentioned above in Feature section.
[Verification]  Run tests on an image with SMACK turned on and off. There should be less tests on an
                environment with SMACK turned OFF, others should pass (or fail) just as they do with
                SMACK turned on.

Change-Id: Ic313214eb578ce00f2156d434cd8358ad526c03f

10 years agoAdd test case macros for different environments
Lukasz Kostyra [Fri, 19 Jul 2013 09:51:51 +0000 (11:51 +0200)]
Add test case macros for different environments

[Issue#]        SSDWSSP-415
[Feature]       Adds test case macros - RUNNER_TEST_SMACK, RUNNER_TEST_NOSMACK,
                RUNNER_CHILD_TEST_SMACK and RUNNER_CHILD_TEST_NOSMACK for different testing
                environments.
[Cause]         Tests that fail when launched on NOSMACK environment
[Solution]      Create macros that will launch tests only on SMACK or NOSMACK environment.
[Verification]  Run libprivilege-control-test. Tests 24a and 24c should appear on SMACK environment,
                tests 24b and 24d should appear on NOSMACK environment.

Change-Id: I2cb9a5bd6aa9634e019726eb536744f3c9e43288

10 years agoTests for new security server permissions API
Pawel Polawski [Sat, 27 Jul 2013 12:17:22 +0000 (14:17 +0200)]
Tests for new security server permissions API

[Issue#]        SSDWSSP-155
[Bug/Feature]   New API added to SS
[Cause]         New API has no tests
[Solution]      New tests added
[Verification]  Test number incresed by two new one

Change-Id: I2bf27b7e99f3f10fd1e404cf7437a21b9199f477

10 years agoFix security-server-tests.
Bartlomiej Grzelewski [Thu, 1 Aug 2013 14:20:27 +0000 (16:20 +0200)]
Fix security-server-tests.

[Issue#]   N/A
[Bug]      N/A
[Cause]    N/A
[Solution] N/A

[Verification] Build. Run tests.

Change-Id: Ia338f400cf05bf4c01990ad853b6135b15c0fd61

10 years agoTest for enabling permissions for EFL apps
Jan Cybulski [Thu, 1 Aug 2013 08:02:46 +0000 (10:02 +0200)]
Test for enabling permissions for EFL apps

    [Issue#]       SSDWSSP-436
    [Feature]      Tests for privileges efl applications.
    [Cause]        Adding EFL app type in libprivilege-control.
    [Solution]     Simple testing wether perm_app_enable_permissions works with APP_TYPE_EFL.
    [Verification] Run the tests.

Change-Id: I36370e78f97670ee5185d843d862aefea6f824e0

10 years agolibprivilege-control-tests: adjust tests for kernel with l access mode support.
Rafal Krypa [Fri, 26 Jul 2013 11:14:38 +0000 (13:14 +0200)]
libprivilege-control-tests: adjust tests for kernel with l access mode support.

[Issue#]       SSDWSSP-372
[Bug]          Tests fail on kernel with sixth access mode for locks.
[Cause]        Modification to kernel extend Smack interface.
[Solution]     Adjust permissions in test, test for new mode.
[Verification] Run the tests.

Change-Id: I8e4edafa6617955deca9968eaca8b24ff86c3fe4

10 years agolibsmack-tests: adjust tests for kernel with l access mode support.
Rafal Krypa [Tue, 23 Jul 2013 11:44:30 +0000 (13:44 +0200)]
libsmack-tests: adjust tests for kernel with l access mode support.

[Issue#]       SSDWSSP-372
[Bug]          Tests fail on kernel with sixth access mode for locks.
[Cause]        Modification to kernel extend Smack interface.
[Solution]     Adjust permissions in test, test for new mode.
[Verification] Run the tests.

Change-Id: Iab81162c53960f0ad110a46ca0e0fffd9aa6f045

10 years agolibprivilege-control-tests: adjust path to SMACK_STARTUP_RULES_FILE.
Rafal Krypa [Wed, 24 Jul 2013 14:49:08 +0000 (16:49 +0200)]
libprivilege-control-tests: adjust path to SMACK_STARTUP_RULES_FILE.

[Issue#]       SSDWSSP-372
[Bug]          Test case privilege_control20_early_rules fails.
[Cause]        Implementetion of early rules in libprivilege-control has changed.
[Solution]     Adapt the test case.
[Verification] Run libprivilege-control-tests with changed libprivilege-control.

Change-Id: I42511e68e923f5a28b77fc8f24932998d02cc7fa

10 years agoRemove tests connected with app_give_access func.
Bartlomiej Grzelewski [Fri, 19 Jul 2013 16:13:26 +0000 (18:13 +0200)]
Remove tests connected with app_give_access func.

[Issue#]   N/A
[Bug]      N/A
[Cause]    Function was removed from libprivilege-control.
[Solution] Tests must be revoved to prevent build break.

[Veryfication] Build.

Change-Id: I0d64124380e74fdfdd3460311088b4199bf77ff4

10 years agoFix test privilege_control05_add_shared_dir_readers
Radoslaw Bartosiak [Thu, 25 Jul 2013 08:56:47 +0000 (10:56 +0200)]
Fix test privilege_control05_add_shared_dir_readers
[Issue#] SSDWSSP-420
[Bug/Feature] The test fails the first time after the package installation.
[Cause] No cleaning of smack application files is performed.
[Solution] Calling functions  cleaning_smack_app_files(); cleaning_smack_database_files() at the test beginning.
[Verification] Adjust our tests

Change-Id: I8506e4de8ea2f60696cd0b0969848f03d3f67b7a

10 years agoRemove compilation warnings.
Bartlomiej Grzelewski [Thu, 25 Jul 2013 10:01:35 +0000 (12:01 +0200)]
Remove compilation warnings.

[Issue#]    N/A
[Problem]   Where were so many warnings that compilation output was not readable.
[Feature]   N/A
[Cause]     N/A
[Solution]  Unsued values and params were removed from the code.

[Verification] Build.

Change-Id: I771442f2c2aefeedfd1d64d420f2861081fa7ad8

10 years agoAdded security-server restart function.
Zbigniew Jasinski [Mon, 15 Jul 2013 12:18:05 +0000 (14:18 +0200)]
Added security-server restart function.

[Issue#]        N/A
[Cause]         No function to gracefully restart security-server.
[Problem]       Using SIGKILL in tests.
[Solution]      Addedd function to restart security-server using Systemd,
                through Systemd's DBus interface.
[Verification]  Build and run security-server-tests-dbus tests.

Change-Id: I04b24d657775143347f310b94b33bcd862c0833a

10 years agoImplement new tests for security server (API speed of call)
Radoslaw Bartosiak [Thu, 20 Jun 2013 07:30:48 +0000 (09:30 +0200)]
Implement new tests for security server (API speed of call)

[Issue#]       SSDWSSP-288
[Feature]      Create test cases for security-server API speed of call.
[Cause]        N/A
[Solution]     Implement new tests for security server (API speed of call)
[Verification] Build, install, run on device to read the measured times.

Change-Id: I9afa5bbf28f0dc42f91626ec88f2371204b40f71

10 years agolibsmack-tests: fix errors to conform to kernel behaviour.
Rafal Krypa [Thu, 18 Jul 2013 09:58:12 +0000 (11:58 +0200)]
libsmack-tests: fix errors to conform to kernel behaviour.

[Issue#]       N/A
[Bug]          Tests expect query for unknown rule to return "0", but they return
               "-1". Expected "1 when asking for empty permissions, but "1" is
               returned.
[Cause]        Libsmack tests assume different Smack behaviour than Smack author.
[Solution]     Adjust our tests.
[Verification] Run libsmack-tests.

Change-Id: Icbc1cbcbc2b95b973b9da3fd5483486e7b4909d7

10 years agoFixing security-server tests.
Zbigniew Jasinski [Fri, 12 Jul 2013 08:47:42 +0000 (10:47 +0200)]
Fixing security-server tests.

[Issue#]        SSDWSSP-357
[Problem]       Failing security-server tests.
[Cause]         * SS API label checking not enabled yet.
                * Tests should run as RUNNER_CHILD_TEST.
                * clear_password() misbehaving if
                  /opt/data/security-server/ doesn't exist.
[Solution]      * Tests run as RUNNER_CHILD_TEST now.
                * Tests splitted into:
                  * tc03_check_API_passwd_enable
                  * tc04_check_API_passwd_disable
                  * tc05_check_API_middleware_enable
                  * tc06_check_API-middleware_disable
                  * tc07_check_API_data_share_enable
                  * tc08_check_API_data_share_disable
                * clear_password() fixed.
[Verification]  Build and run:
                security-server-tests-server --output=text --runignored

Change-Id: Ic390f6eacf3c85928d561467615757c20cb1eb44

10 years agoChanging function names of liprivilege-control API
Jan Cybulski [Thu, 4 Jul 2013 09:39:24 +0000 (11:39 +0200)]
Changing function names of liprivilege-control API

    [Issue#] SSDWSSP-309
    [Feature/Bug] N/A
    [Problem] N/A
    [Cause] Changing liprivilege API naming sheme
    [Solution] Tests for new functions
    [Verification] build, run, libprivilege tests should pass

Change-Id: Ib96b98546d9b68f03d4022415130c112e8129aeb

10 years agoAdded test for checking smack context from DBus interface
Zbigniew Jasinski [Tue, 25 Jun 2013 07:58:33 +0000 (09:58 +0200)]
Added test for checking smack context from DBus interface

[Issue#]        SSDWSSP-201
[Cause]         No tests for SMACK support in DBus.
[Solution]      Added tests.
[Problem]       N/A
[Verification]  Build and run security-server-tests-dbus tests.

Change-Id: I2fdcca1108a7ce002716d6bccfd47a132303dc61

10 years agoModify tests for security server.
Jan Olszak [Thu, 4 Jul 2013 08:31:23 +0000 (10:31 +0200)]
Modify tests for security server.

[Issue#] Tests depend on each other.
[Feature] N/A
[Cause] N/A
[Solution] Reset security-server before the test, modified tests, added some comments.
[Verification] Build, install, run security-tests-password on device, verify whether results are correct. Two tests will fail, becouse badly handled empty password.

Change-Id: Ide27fcfb73e9e8238f00e9ad34b8dfba4d8b298f

10 years agoChanged dlog logging buffer.
Jan Olszak [Thu, 4 Jul 2013 13:01:22 +0000 (15:01 +0200)]
Changed dlog logging buffer.

[Issue#] dlog logged in a wrong buffer.
[Bug/Feature]   Recent prevent bugs need fix.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run "dlogutil -c", run tests, run "dlogutil -b main PRIVILEGE_CONTROL" (no loggs), "dlogutil -b system PRIVILEGE_CONTROL" (loggs..). Repeat for SECURITY_SERVER.

Change-Id: I9b1a9c2f139cb1984c22013c6d2c871b31ff63a1

10 years agoFix buildbreak on GCC 4.8
Janusz Kozerski [Thu, 4 Jul 2013 09:49:31 +0000 (11:49 +0200)]
Fix buildbreak on GCC 4.8

[Issue#]        SSDWSSP-370
[Bug/Feature]   Fix buildbreak on GCC 4.8
[Cause]         N/A
[Solution]      N/A
[Verification]  Compile with GCC 4.8

Change-Id: Ib74302223deca9c1d5f9441755ffba209d510df4

10 years agoPatch for gcc 4.8
Krzysztof Jackiewicz [Wed, 3 Jul 2013 15:32:06 +0000 (17:32 +0200)]
Patch for gcc 4.8

[Issue#] N/A
[Feature/Bug] N/A
[Problem] Compilation with gcc 4.8 fails
[Cause] 'close' function is not declared
[Solution] #include <unistd.h> added

[Verification] Successfull compilation

Change-Id: I6c22eaea6eec19b10581ed7aecbaae310510bad6

10 years agoImplement new tests for security server (boundary parameters)
Radoslaw Bartosiak [Mon, 10 Jun 2013 17:07:13 +0000 (19:07 +0200)]
Implement new tests for security server (boundary parameters)

[Issue#]       SSDWSSP-283
[Feature]      Create input parameter validation test cases for security server.
[Cause]        N/A
[Solution]     Implement new tests for security server (boundary parameters)
[Verification] Build, install, run security-tests-password on device, verify whether results are correct.

Change-Id: I35f8f8ddb6fa19178a29f6506a536b64738004a9

10 years agoAdd tests program for security-server2
Bartlomiej Grzelewski [Mon, 10 Jun 2013 15:27:49 +0000 (17:27 +0200)]
Add tests program for security-server2

This commit contains binary security-client that may be used to
test security-server2.

Minor changes:
 * Remove duplicated optimalization option from build commands.
 * Remove --std=c++0x option from gcc command.
 * Set up DEBUG profile as default.

[Issue#]        N/A
[Feature]       Add security-client binary.
[Cause]         DPL framework is too limited to test security-server2.
[Solution]      N/A
[Verification]  Run "security-client echo" and
                "security-client rule oneoneone twotwotwo". In second
                case you shoud see new rule in system.

Change-Id: I4c8316a8e9ce4e2a80d636a3e9235ccd50171e79

10 years agoAdd test to early rules loading.
Janusz Kozerski [Tue, 25 Jun 2013 12:55:26 +0000 (14:55 +0200)]
Add test to early rules loading.

[Issue#]        SSDWSSP-298
[Bug/Feature]   Livebox issue fix.
[Cause]         N/A
[Solution]      N/A
[Verification]  Compile. Run libprivilege-tests. All tests should pass.

Change-Id: Ie4184ea5122ae05b375bc820bd42e3a5f7f6d23e

10 years agoAdding ignored option to security-tests-all.sh script.
Marcin Niesluchowski [Fri, 28 Jun 2013 13:17:11 +0000 (15:17 +0200)]
Adding ignored option to security-tests-all.sh script.
RUNNER_IGNORED_MSG("Ignore text"); should be added in the beginning of
test body. For turning off ignored option security-tests-all.sh should run with
additional --noignored flag. For single scripts ignored option is turned off
by default. To turn it on flag --runignored should be added.
For example:
* security-tests-all.sh
* security-tests-all.sh --noignored
* libprivilege-control-tests --output=text --runignored

[Issue#]        SSDWSSP-343
[Bug/Feature]   Ignore option should be added because some tests
                could be made for unimplemented or not yet fixed
                functionalities.
[Cause]         N/A
[Solution]      N/A
[Verification]  Running tests. With ignored option function reaching
                RUNNER_IGNORED_MSG should be classified as Ignored
                in single test result and increment Ignored count in result
                for each test group.

Change-Id: I883500d80c2933de24e51c7b94810ba543392b1d

10 years agoAdded tests for Smack label checking (SSDWSSP-272)
Zbigniew Jasinski [Tue, 11 Jun 2013 12:11:22 +0000 (14:11 +0200)]
Added tests for Smack label checking (SSDWSSP-272)

[Issue#]        SSDWSSP-275
[Bug/Feature]   authorize_SS_API_caller_socket functionalities
                are not covered by tests.
[Cause]         N/A
[Solution]      Added tests for Smack label checking.
[Verification]  Running security-server tests.

                *** WARNING ***
                This test should fail until Smack label checking (SSDWSSP-272)
                is not enable. At the moment SS doesn't check return code from
                authorize_SS_API_caller_socket()

Change-Id: Id7c6d75d2cdfb03965d0a6ec8e0bb3a1f793d8e6

10 years agoAll *.c , *.h , *.cpp and *.hpp files changed by stylecheck-for-git.
Marcin Niesluchowski [Thu, 20 Jun 2013 13:16:31 +0000 (15:16 +0200)]
All *.c , *.h , *.cpp and *.hpp files changed by stylecheck-for-git.

[Issue#]        SSDWSSP-322
[Bug/Feature]   Standardization of repository coding style.
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: Iaa411d974d68b16b57423cfe498cb96c206693b2

10 years agoAdded privilege_control05_set_app_privilege_osp,
Marcin Niesluchowski [Thu, 6 Jun 2013 11:48:36 +0000 (13:48 +0200)]
Added privilege_control05_set_app_privilege_osp,
privilege_control05_set_app_privilege_osp_partner,
privilege_control05_set_app_privilege_osp_platform.

[Issue#]        SSDWSSP-202
[Bug/Feature]   app_set_permissions' functionalities are not all covered by tests.
[Cause]         N/A
[Solution]      N/A
[Verification]  Running libprivilege-control tests.

Change-Id: If0da8acd7e49d3f946627e95e4d2c27ea6a0bae5

10 years agoFixing libprivilege-control test cases
Zofia Abramowska [Thu, 6 Jun 2013 12:45:52 +0000 (14:45 +0200)]
Fixing libprivilege-control test cases

[Issue#] SSDWSSP-317
[Bug] Some tests were not implemented properly
[Cause] N/A
[Solution] Commented out test for stub function. Rewrote test
which used getgroups() and wasn't prepared to receive
not unique group numbers. Changed predicted format of rules.
[Verification] Run libprivilege-control tests. All should pass.

Change-Id: Iec15d94c538e0bbbdac956a0b79791d3271d089a

10 years agoAdding complementary tests for libprivilege-control function app_setup_path().
Marcin Niesluchowski [Tue, 4 Jun 2013 14:56:49 +0000 (16:56 +0200)]
Adding complementary tests for libprivilege-control function app_setup_path().
Tests privilege_control18_app_setup_path_public and privilege_control19_app_setup_path_settings
added. Also added access check in privilege_control03_app_label_shared_dir.

[Issue#]        SSDWSSP-304
[Bug/Feature]   app_setup_path's functionalities are not all covered by tests.
[Cause]         N/A
[Solution]      N/A
[Verification]  Running libprivilege-control tests. Tests should pass.

Change-Id: Ie9d1df5271b430e6859285dbccfd8385c5db9487

10 years agoChange test new_label_from_socket
Jan Cybulski [Wed, 17 Apr 2013 13:51:46 +0000 (15:51 +0200)]
Change test new_label_from_socket

            [Issue#]   SDWSSP-189
            [Feature]  Changing testcase
            [Cause]    Test failed.  Label kept in the socket can be different
                than the label of the peer, when the peer changed the label
                after creating socket.
            [Solution] Changing label before creating socket.
                Socket and peer label will stay the same.
            [Verification] Successful build. Running the libsmack tests

Change-Id: I79941bc57c883361a6707ce9f486cbdefb0e44fa

10 years agoImplement tests for smack_new_label_from_socket()
Rafal Krypa [Fri, 1 Mar 2013 12:43:14 +0000 (13:43 +0100)]
Implement tests for smack_new_label_from_socket()

[Issue#]       N/A
[Feature]      Test getting peer label from socket in various scenarios.
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests on target.

Change-Id: I8b3a642c190aa4465069008dddfbe1fff7df07cb

10 years agoAdd test for appsetting privilege
Jan Cybulski [Thu, 16 May 2013 10:09:15 +0000 (12:09 +0200)]
Add test for appsetting privilege

    [Issue#] SSDWSSP-241
    [Feature] N/A
    [Cause] New feature in libprivilege.
    [Solution] N/A

    [Verification] Run libprivilege tests.
                   Test privilege_control16_appsettings_privilege should pass

Change-Id: Ifd0bffb6595055e806c526ed065f23cfdb983922

10 years agoFixing libprivilege-control app_revoke_permissions() test to match actual requirement...
Marcin Niesluchowski [Wed, 22 May 2013 12:28:22 +0000 (14:28 +0200)]
Fixing libprivilege-control app_revoke_permissions() test to match actual requirements (file should exist after function call).

[Issue#]        SSDWSSP-260
[Bug/Feature]   app_revoke_permissions() should not remove permissions file.
[Cause]         Comment to function app_revoke_permissions() in libprivilege-control indicated that permissions file should be removed.
[Solution]      Tests change.
[Verification]  Running tests

Change-Id: I119c370219ac014212269646c531d1f005aeb848

10 years agoUse new function app_setup_path() in place of old app_label_dir() and app_label_share...
Rafal Krypa [Wed, 22 May 2013 16:51:53 +0000 (18:51 +0200)]
Use new function app_setup_path() in place of old app_label_dir() and app_label_shared_dir().

Change-Id: I75538d3405337a23c307de526d9a68318cb26b68

10 years agoAdd test for APP_PATH_ANY_LABEL case in function app_setup_path.
Bartlomiej Grzelewski [Wed, 29 May 2013 15:57:29 +0000 (17:57 +0200)]
Add test for APP_PATH_ANY_LABEL case in function app_setup_path.

[Issue#]   SSDWSSP-307
[Bug]      N/A
[Cause]    N/A
[Solution] N/A

[Verification] Run libprivilege-control tests.

Change-Id: I2a997ed36aa557b8a9410db711eed37433289a9e

10 years agoAdded test cases for chosen security-server functions checking weird input parameters.
Zbigniew Jasinski [Mon, 27 May 2013 12:58:47 +0000 (14:58 +0200)]
Added test cases for chosen security-server functions checking weird input parameters.

[Issue#]        SSDWSSP-282
[Cause]         N/A
[Solution]      N/A
[Problem]       N/A
[Verification]  Build and run tests.

Change-Id: I42f2683729f4cdd1fbb7a3cd2b3ba1206a622960

10 years agoFixing privilege_control05_set_app_privilege_wgt* tests. Tests need http://slp-info...
Marcin Niesluchowski [Tue, 28 May 2013 13:48:49 +0000 (15:48 +0200)]
Fixing privilege_control05_set_app_privilege_wgt* tests. Tests need slp-info.sec.samsung.net/gerrit/#/c/212155/ libprivilege commit.

[Issue#]        N/A
[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: Ib7820b3044873b61c708f232271e3966f5a4661d

10 years agoModyfing tests to new libprivilege feature to file name mapping
Zofia Abramowska [Thu, 23 May 2013 11:25:59 +0000 (13:25 +0200)]
Modyfing tests to new libprivilege feature to file name mapping

[Issue#] SSDWSSP-292
[Feature/Bug] N/A
[Cause] N/A
[Solution] N/A
[Verification] Build. Run libprivilege-control tests. Tests for
add_api_feature should pass

Depends on : http://slp-info.sec.samsung.net/gerrit/#/c/209603/1

Change-Id: I5c225e0bfeba9ce4d5cca2cdfafc9d8278d9273c

10 years agoFix test to pass with libprivilege-control boot optimization.
Janusz Kozerski [Mon, 27 May 2013 15:17:05 +0000 (17:17 +0200)]
Fix test to pass with libprivilege-control boot optimization.

[Issue#]   SSDWSSP-295
[Problem]  N/A
[Cause]    N/A
[Solution] N/A

[Verification] Run all libprivilege-contorl tests.

Change-Id: I105e28eaac9fbf86c3048c0183806077d2c4305b

10 years agoFix bug in privilege_control05_set_app_privilege
Rafal Krypa [Wed, 8 May 2013 08:47:29 +0000 (10:47 +0200)]
Fix bug in privilege_control05_set_app_privilege

Change-Id: Ib077463f2189cbed6164f5317ad0a30a79d5abde

10 years agoTest for app_label_dir
Krzysztof Jackiewicz [Fri, 17 May 2013 08:10:23 +0000 (10:10 +0200)]
Test for app_label_dir

[Issue#] SSDWSSP-233
[Feature] Requirements for app_label_dir
[Problem] N/A
[Cause] N/A
[Solution] Tests updated

[Verification] Run libprivilege-control-test --regexp=app_label_dir

Change-Id: Ia5bbeaad35f34d1fcbb0c01e760805eb2d9c4f9d

10 years agoTest privilege_control05_set_app_privilege_wgt, privilege_control05_set_app_privilege...
Marcin Niesluchowski [Wed, 8 May 2013 12:46:02 +0000 (14:46 +0200)]
Test privilege_control05_set_app_privilege_wgt, privilege_control05_set_app_privilege_wgt_partner, privilege_control05_set_app_privilege_wgt_platform added.

[Issue#]        SDWSSP-202
[Bug/Feature]   Additional test cases for set_app_privilege() for widgets
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: Id4734deb3667306f1af017fef59e7e4fbaf91daa

10 years agoFix test to pass with smack_pid_have_access function.
Janusz Kozerski [Wed, 22 May 2013 09:24:45 +0000 (11:24 +0200)]
Fix test to pass with smack_pid_have_access function.

[Issue#]   SSDWSSP-220
[Problem]  N/A
[Cause]    N/A
[Solution] N/A

[Verification] Run all security-server tests. All test should pass.

Change-Id: I1a6e61074d086867d4f730b7bb28515f452618a9

10 years agoRemove compilation warrnings.
Bartlomiej Grzelewski [Fri, 10 May 2013 16:39:08 +0000 (18:39 +0200)]
Remove compilation warrnings.

[Issue#]    N/A
[Bug]       N/A
[Cause]     N/A
[Solution]  N/A

[Verification] N/A

Change-Id: Iacdf1ad61889dea08d0eeb34aaa50db9dace803c

10 years agoMultiple security server clients stress test added.
Krzysztof Jackiewicz [Thu, 9 May 2013 13:26:43 +0000 (15:26 +0200)]
Multiple security server clients stress test added.

[Issue#] SSDWSSP-237
[Problem] N/A
[Cause] N/A
[Solution] Stress test added.

[Verification] Run security-server-tests-mt --output=text

Change-Id: If15ebf15431557cb5c53ccf244e65963f3eba37b

10 years agoTest for app_add_friend() changed - friends should be made even with nonexisting...
Marcin Niesluchowski [Tue, 14 May 2013 16:17:00 +0000 (18:17 +0200)]
Test for app_add_friend() changed - friends should be made even with nonexisting friend. Test for app_enalble_permissions() changed - without persistent mode rule file should exist but rules should not be written to that file.

[Issue#]        SSDWSSP-260
[Bug/Feature]   Fix libprivilege-control tests
[Cause]         N/A
[Solution]      N/A
[Verification]  Run privilege_control11_app_enable_permissions and privilege_control14_app_add_friend libprivilege-control tests (should pass)

Change-Id: I6d893de9e5060e69f8a851cd9791644e228770a9

10 years agoAdd perf tool for performance test
Jan Cybulski [Tue, 14 May 2013 11:01:28 +0000 (13:01 +0200)]
Add perf tool for performance test

        [Issue#] SSDWSSP-172
        [Feature] N/A
        [Cause]   N/A
        [Solution] Adding performance tool perf.

        [Verification] Run test-performacne-check.sh

Change-Id: Id41472a24053e3bef4a864b70bc7cf5ffb5255bd

10 years agoAdd smack performance test
Jan Cybulski [Mon, 13 May 2013 13:33:20 +0000 (15:33 +0200)]
Add smack performance test

    [Issue#] SSDWSSP-172
    [Feature] N/A
    [Cause]   N/A
    [Solution] Adding performance test using perf tool.

    [Verification] Run test-performacne-check.sh

Change-Id: I4ed7d10ce7952bac5e2ab7f91dc5cc14edbc1247

10 years agoRemoving test for revoking access given by app_give_access
Zofia Abramowska [Mon, 13 May 2013 14:27:11 +0000 (16:27 +0200)]
Removing test for revoking access given by app_give_access

[Issue#] SSDWSSP-229
[Bug/Feature] N/A
[Cause] Reimplementing process_app_give_access in security server
[Solution] Commented out test for revoking access given by
security_server_app_give_access
[Verification] Successful build

Change-Id: Ia4b2ba2b532adaf27d0d3f703520f7d2a90b0b47

10 years agoLabel comparison fixed
Krzysztof Jackiewicz [Fri, 10 May 2013 15:44:56 +0000 (17:44 +0200)]
Label comparison fixed

[Issue#] N/A
[Problem] Test is sometimes failing
[Cause] Wrong comparison method
[Solution] Strcmp has been used.

[Verification] Run security-server-tests-label

Change-Id: Ib9bbe59c2b2e2e61c18726e479a7642ce8ad1238

10 years ago5 tests added - 1 smack_accesses_clear() test; 1 smack_revoke_subject() test; 1 smack...
Marcin Niesluchowski [Mon, 29 Apr 2013 14:45:59 +0000 (16:45 +0200)]
5 tests added - 1 smack_accesses_clear() test; 1 smack_revoke_subject() test; 1 smack_accesses_add_modify() test; 1 test for adding, removing rules; 1 test for saving, loading rules from file.

[Issue#]        SSDWSSP-58
[Bug/Feature]   Create additional 5 test cases for libsmack
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: Ia3484d6ebdb48ba27e22018ca9c0e7dab5470db8

10 years agoTests added to 5 functions (app_id_from_socket(), app_enable_permissions(), app_disab...
Marcin Niesluchowski [Wed, 24 Apr 2013 08:29:39 +0000 (10:29 +0200)]
Tests added to 5 functions (app_id_from_socket(), app_enable_permissions(), app_disable_permissions(), app_reset_permissions(), app_add_friend()) in libprivilege control and added file check in app_revoke_permissions().

[Issue#]        SSDWSSP-199
[Bug/Feature]   Tests to 5 functions.
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: I8271f0c5f2f15f94ce185b9a3bf7ac77e02af03f

10 years agoSecond app_install attempt should succeeed
Krzysztof Jackiewicz [Tue, 7 May 2013 08:28:13 +0000 (10:28 +0200)]
Second app_install attempt should succeeed

[Issue#] N/A
[Problem] Test fails since multiple app_install calls have been allowed
[Cause] Test was not updated
[Solution] Test updated

[Verification] libprivilege-control-test --regexp=app_install

Change-Id: I23ee02848e43001376b90f50d3e746d9d56f119d

10 years agotc04_security_server_get_gid_client_is_not_allowed changed
Marcin Niesluchowski [Tue, 7 May 2013 13:35:00 +0000 (15:35 +0200)]
tc04_security_server_get_gid_client_is_not_allowed changed

[Issue#]        SSDDWSSP-225
[Bug/Feature]   test tc04_security_server_get_gid_client_is_not_allowed fails.
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: If1baf00bb89a0b7482b4f5c093daf2b2ca877b17

10 years agoFixing klocwork bugs
Zofia Abramowska [Fri, 26 Apr 2013 14:20:03 +0000 (16:20 +0200)]
Fixing klocwork bugs

[Issue#] N/A
[Bug] N/A
[Cause] N/A
[Solution] N/A
[Verification] Build and run tests

Change-Id: I651ac1a7d409024751952a11336b77561a7080cc

10 years agoChanged test to app_register_av() in tests to libprivilege-control
Marcin Niesluchowski [Thu, 2 May 2013 09:23:50 +0000 (11:23 +0200)]
Changed test to app_register_av() in tests to libprivilege-control

[Issue#]        SSDWSSP-223
[Bug/Feature]   Should fix bug in app_register_av() in libprivilege-control, but test needs to be fixed first
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: I78005e206a860814683956b776dba8461d4b758e

10 years agoAdd additional test for app_give_access.
Bartlomiej Grzelewski [Tue, 30 Apr 2013 14:56:15 +0000 (16:56 +0200)]
Add additional test for app_give_access.

[Issue#]   N/A
[Bug]      N/A
[Cause]    N/A
[Solution] N/A

[Verification] Build.

Change-Id: I1227696cb0ab5480c15e7dd9c9c09ce4165ede11

10 years agoAdd test for security_server_get_smacklabel_sockfd
Jan Cybulski [Tue, 23 Apr 2013 11:11:42 +0000 (13:11 +0200)]
Add test for security_server_get_smacklabel_sockfd

            [Issue#] SSDWSSP-198
            [Feature/Bug] security_server_get_smacklabel_sockfd has no tests yet
            [Problem] N/A
            [Cause] N/A
            [Solution] Add test for API in existing testcase tc06_check_privilege_by_sockfd
            [Verification] build, run the test, verify if it pass.

Change-Id: I2cbc713c37ff77270e83855d51bddc5048cbd233

10 years agoTest to: Implemet data control solution for OSP apps.
Bartlomiej Grzelewski [Mon, 22 Apr 2013 16:23:37 +0000 (18:23 +0200)]
Test to: Implemet data control solution for OSP apps.

[Issue#]   SSDWSSP-177
[Bug]      N/A
[Cause]    OPS application need to share memory.
[Solution] Add cross rules between OSP application.

Change-Id: I29b24d3fa8410b0f444f494d45e1c283605ce2af

10 years agoFixed tests for app_shared_dir_add_readers()
Jan Cybulski [Thu, 18 Apr 2013 13:41:42 +0000 (15:41 +0200)]
Fixed tests for app_shared_dir_add_readers()

        [Issue#] SSDWSSP-196
        [Feature/Bug] app_shared_dir_add_readers() has to accept NULL in an argument list 'app_list'. Also added test to check what happens if the label in 'app_list' is not correct SMACK label
        [Problem] N/A
        [Cause] N/A
        [Solution] As above mentioned.
        [Verification] libprivilege-control-test --output=text

Change-Id: If53fc929d4900cefda345b240fce8d8d26250505

10 years agoChange test tc07_check_privilege_by_sockfd
Jan Cybulski [Mon, 15 Apr 2013 13:00:39 +0000 (15:00 +0200)]
Change test tc07_check_privilege_by_sockfd

        [Issue#]   SDWSSP-189
        [Feature]  Changing testcase
        [Cause]    Test failed.  Label kept in the socket can be different
than the label of the peer, when the peer changed the label
after creating socket.
        [Solution] Changing label before creating socket.
Socket and peer label will stay the same.
        [Verification] Successful build. Running the security server tests

Change-Id: I7f409492ea33cfa0a354d2527ae2752fe04e749e