platform/core/security/vasum.git
9 years agoAdd timeout after zone start. 90/36290/4
Dariusz Michaluk [Wed, 4 Mar 2015 09:26:16 +0000 (10:26 +0100)]
Add timeout after zone start.

[Bug/Feature]   Add timeout after zone start.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run server, run tests

Change-Id: Ie6adace3d36ad98756d8efc823a056356f41d02d
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoDisable dbus integration. 89/36289/3
Dariusz Michaluk [Tue, 3 Mar 2015 08:05:00 +0000 (09:05 +0100)]
Disable dbus integration.

[Bug/Feature]   Disable dbus integration.
[Cause]         It is not used yet. Server and tests require a different dbus policy user,
                switching is inconvenient.
[Solution]      N/A
[Verification]  Build, run server, run tests

Change-Id: I4e28b3b21d5eac6d23462ba2c4eb32aa7e32d4ed
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoEpoll refactor 24/36524/2
Piotr Bartosiewicz [Mon, 9 Mar 2015 12:34:27 +0000 (13:34 +0100)]
Epoll refactor

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: Iabb0557aa42ff09d0a2b3f9c36b451cf5fdad10f

9 years agoColoring compiler's output 05/36305/6
Jan Olszak [Wed, 4 Mar 2015 16:54:51 +0000 (17:54 +0100)]
Coloring compiler's output

[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Ie417e1b7db193798b1f560bac33475be94f1ad4e

9 years agoPersistent state of zone 69/36269/1
Piotr Bartosiewicz [Mon, 2 Mar 2015 10:57:50 +0000 (11:57 +0100)]
Persistent state of zone

[Bug/Feature]   Zone was always started after vasum restart regardless
                of the zone state before restart
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests. Run vasum, pause one container, restart
                vasum, check this container is still paused. The same
                test with stopped and started state.

Change-Id: I0426e3e4f2af9b2bc0c110a7702b9c742a2747e6

9 years agoStubs for get/set ipv4/ipv6, destroy netdev and list netdev 21/35621/8
Mateusz Malicki [Thu, 19 Feb 2015 14:44:34 +0000 (15:44 +0100)]
Stubs for get/set ipv4/ipv6, destroy netdev and list netdev

[Feature]       Stubs (cli, client, server) for get/set ipv4/ipv6,
                destroy netdev and list netdev netdev
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run cli commnads

Change-Id: Ia1dc21e5fb252b2f83d617abec785bce7d6ffc9e

9 years agoCreating netdev 69/35369/13
Mateusz Malicki [Thu, 12 Feb 2015 15:39:58 +0000 (16:39 +0100)]
Creating netdev

[Feature]       Filled stubs for creating netdev (create_netdev_phys,
                create_netdev_macvlan, create_netdev_veth)
[Cause]         N/A
[Solution]      Manage netdev through netlink interface
[Verification]  Build, install, run vasum-server,
                create zone (vasum-cli create_zone zone1),
                start zone (vasum-cli start_zone zone1),
                move interface f.e. p2p1 to zone (vasum-cli create_netdev_phys zone1 p2p1)
                enter to zone (lxc-console -n zone1 --lxcpath=/usr/local/share/.zones -t 0)
                    check interfaces (ifconfig -a)
                do analogous for create_netdev_macvlan and create_netdev_veth

Change-Id: I299d3ebeb8f101a386f5b156dbe79d7779600ef6

9 years agoEpoll wrapper, epoll dispatchers (glib and threaded) 12/35712/8
Piotr Bartosiewicz [Mon, 23 Feb 2015 17:03:32 +0000 (18:03 +0100)]
Epoll wrapper, epoll dispatchers (glib and threaded)

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      Epoll is the only way, using no additional threads, to
                aggregate descriptors to one epoll descriptor.
[Verification]  Run tests

Change-Id: I3863129a8b947c467615b2e9d352fce3bd1cda9a

9 years agoEnable cpuQuota options, fix cpuQuota logic 64/35964/2
Piotr Bartosiewicz [Thu, 26 Feb 2015 15:30:11 +0000 (16:30 +0100)]
Enable cpuQuota options, fix cpuQuota logic

[Bug/Feature]   Options were disabled after migration from libvirt
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests, run two containers use 100% cpu on first and
                switch to second and check total cpu usage in host.

Change-Id: I6c79f639f7cf0def3ad0ea73550940d8f5edba9e

9 years agoAdd systemd socket support 92/35292/13
Lukasz Kostyra [Thu, 5 Feb 2015 07:57:28 +0000 (08:57 +0100)]
Add systemd socket support

[Feature]       Systemd unit files for Vasum socket
[Cause]         IPC works with Vasum socket
[Solution]      Add required systemd unit files
[Verification]  Build, install, run tests

Change-Id: I552010681204a61e873d419b430bab8556080345

9 years agoUnify unit tests cleanup 14/35614/1
Piotr Bartosiewicz [Thu, 19 Feb 2015 11:28:27 +0000 (12:28 +0100)]
Unify unit tests cleanup

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: I2a49450b3991355656028194b14f9eae5a222456

9 years agoBetter exception testing 87/35587/1
Piotr Bartosiewicz [Wed, 18 Feb 2015 15:16:43 +0000 (16:16 +0100)]
Better exception testing

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: I814deebc0f8e4fdecd5760eb2b1dce1fe6e7df15

9 years agoStubs for creating netdev 49/35349/3
Mateusz Malicki [Thu, 12 Feb 2015 10:43:56 +0000 (11:43 +0100)]
Stubs for creating netdev

[Feature]       Stubs (cli, client, server) for creating netdev
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run cli commnads

Change-Id: Ibf2631d0f6e42823793d3f5bd971586348811891

9 years agoGVariant visitor test 63/35563/6
Mateusz Malicki [Tue, 17 Feb 2015 14:49:35 +0000 (15:49 +0100)]
GVariant visitor test

[Bug/Feature]   GVariant visitor test
[Cause]         N/A
[Solution]      Test convert to and from GVariant
[Verification]  Build, run tests: vasum-server-unit-tests -t ConfigurationSuite

Change-Id: I8e7573bc3d44724b17560bfaa9a040922530ff40

9 years agoDon't store dynamic config in conf files 25/35425/1
Piotr Bartosiewicz [Thu, 12 Feb 2015 09:21:18 +0000 (10:21 +0100)]
Don't store dynamic config in conf files

[Bug/Feature]   Per-zone mutable config fields (ip, vt and more in
                the future) goes to dynamic config.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I2a59b0292fc326a689e3ff9375da1199dc8b7618

9 years agoCode refactor/cleanup 70/35370/1
Piotr Bartosiewicz [Thu, 12 Feb 2015 16:22:01 +0000 (17:22 +0100)]
Code refactor/cleanup

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I30a1358f9163c78afa44f6ea0731003171f0f9a7

9 years agoIPC: Asynchronous method result sending 47/35147/5
Jan Olszak [Fri, 6 Feb 2015 12:13:12 +0000 (13:13 +0100)]
IPC: Asynchronous method result sending

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests, run tests under valgrind

Change-Id: I16cc384545c273f65c8f57f11adde61709e08bc4

9 years agoCreate zone api method support templateName parameter 68/35068/1
Piotr Bartosiewicz [Mon, 26 Jan 2015 10:37:03 +0000 (11:37 +0100)]
Create zone api method support templateName parameter

[Bug/Feature]   Not implemented create zone parameter
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I5dff390db6b82927b1f8f300f82212c2a534a571

9 years agoCode cleanup 53/35053/1
Piotr Bartosiewicz [Fri, 6 Feb 2015 11:49:43 +0000 (12:49 +0100)]
Code cleanup

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I8911fcc2e51bd14fa94eac6d75e655ba1ce275d8

9 years agoAdd remove and list to vasum-server and vasum-client 97/34497/7
Mateusz Malicki [Tue, 27 Jan 2015 15:53:35 +0000 (16:53 +0100)]
Add remove and list to vasum-server and vasum-client

[Bug/Feature]   Ability to list and remove provision
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I57783a0b79466ef60d781e6206b92fb266fe5f38

9 years agoIPC: Added unique PeerID to the API to identify peers 38/34938/8
Jan Olszak [Wed, 4 Feb 2015 13:26:31 +0000 (14:26 +0100)]
IPC: Added unique PeerID to the API to identify peers

[Bug/Feature]   PeerCallback takes peer's ID and fd
                All API methods take PeerID
                Replaced unordered map with a vector
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests, run tests under valgrind

Change-Id: I352fd3942c4a2e6f7f5c891b1dcc0109d8bf7128

9 years agoUpdate KVStore unit tests 00/35000/1
Piotr Bartosiewicz [Thu, 5 Feb 2015 13:54:21 +0000 (14:54 +0100)]
Update KVStore unit tests

[Bug/Feature]   N/A
[Cause]         libConfig has been changed
[Solution]      N/A
[Verification]  Run tests

Change-Id: Ib958bb74160b5025c410ac3d60a3f21a12b663d2

9 years agoFix generating IP and VT for new zones 24/34924/2
Piotr Bartosiewicz [Wed, 4 Feb 2015 11:11:35 +0000 (12:11 +0100)]
Fix generating IP and VT for new zones

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests, run daemon and add/remove some zones.

Change-Id: I9754ab249bb65d8407f1220d0804d2ddc0fad798

9 years agoFix test case ConfigurationSuite/FromKVWithDefaultsTest 52/34752/3
Mateusz Malicki [Mon, 2 Feb 2015 11:41:50 +0000 (12:41 +0100)]
Fix test case ConfigurationSuite/FromKVWithDefaultsTest

[Bug/Feature]   ConfigurationSuite/FromKVWithDefaultsTest fail
[Cause]         No field in sample json string
[Solution]      Added required field
[Verification]  Run ConfigurationSuite tests

Change-Id: I113f76f2d2edb700a490241d6993a8e3a506a47b

9 years agoIPC: Changed recursive_mutex to mutex in the Processor 07/34707/2
Jan Olszak [Fri, 30 Jan 2015 16:54:41 +0000 (17:54 +0100)]
IPC: Changed recursive_mutex to mutex in the Processor

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests, run tests under valgrind

Change-Id: If683c017354c5a9f7fdf8bb5ce2ad84f9dd82fdd

9 years agoFix use of uninitialized variable in ut 95/34695/1
Piotr Bartosiewicz [Fri, 30 Jan 2015 13:08:09 +0000 (14:08 +0100)]
Fix use of uninitialized variable in ut

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests under valgrind

Change-Id: Ibe0f6d7da3a8592abd660b66f252ae0bf2fbf896

9 years agoPreserve zones order. Fix switching zone to the next one. 87/34587/6
Piotr Bartosiewicz [Thu, 29 Jan 2015 09:11:47 +0000 (10:11 +0100)]
Preserve zones order. Fix switching zone to the next one.

[Bug/Feature]   An order of zones was not preserved.
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: I4cf9b235620bd0cf2b5e3de386ddfe6ba8a54813

9 years agoIPC: Remote error handling 63/34463/13
Jan Olszak [Mon, 26 Jan 2015 13:33:01 +0000 (14:33 +0100)]
IPC: Remote error handling

[Bug/Feature]  Passing errors to callbacks
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: Icbe4df6671144fd34a3bf8b43c4360c2242a6d3e

9 years agoCompile test of client C API 14/34514/2
Piotr Bartosiewicz [Wed, 28 Jan 2015 12:31:50 +0000 (13:31 +0100)]
Compile test of client C API

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I4c8d33904f9f23db70e8ffc0e6002bf2e3335ee8

9 years agoFix focus, defaultId, foregroundId logic 67/34467/3
Piotr Bartosiewicz [Tue, 27 Jan 2015 15:13:03 +0000 (16:13 +0100)]
Fix focus, defaultId, foregroundId logic

[Bug/Feature]   Buggy focus logic. DefaultId, foregroundId does not work
                after implementing dynamic zone adding and removing.
[Cause]         N/A
[Solution]      Update focus after remove, pause and stop zone.
                DefaultId moved to dynamic config. ForegroundId removed
                from config.
[Verification]  Build, run tests, run daemon and check focus after
                adding, pausing, removing zones, switching zones.

Change-Id: I325e501242b747802da07b103ccba4c20891138e

9 years agoAdd list and remove to ZoneProvision class 02/34402/10
Mateusz Malicki [Mon, 26 Jan 2015 14:40:57 +0000 (15:40 +0100)]
Add list and remove to ZoneProvision class

[Bug/Feature]   Ability to list and remove provision
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I3e3a566dd00298d4111fb9a3b5ec6d2351774ac7

9 years agoFix ut threading, ut refactor 44/34344/1
Piotr Bartosiewicz [Fri, 23 Jan 2015 15:32:02 +0000 (16:32 +0100)]
Fix ut threading, ut refactor

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I9eca161ee3752f29611395dccc73e9ba8e614e6d

9 years agoIPC: Support older glib 74/34274/6
Jan Olszak [Tue, 20 Jan 2015 15:15:39 +0000 (16:15 +0100)]
IPC: Support older glib

[Bug/Feature]  Replaced new calls with older equivalents
               Fixed SIGSEGV bug
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: I572321fb4055f8f5b033b755c883c3e4b00bfcda

9 years agoProvisioning uses dynamic configuration 59/34259/3
Piotr Bartosiewicz [Thu, 22 Jan 2015 08:34:38 +0000 (09:34 +0100)]
Provisioning uses dynamic configuration

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: If1762b8d0993a98048d2f9310981c53f2a913124

9 years agoFix LxcZoneSuite/StartStopTest 62/34262/1
Piotr Bartosiewicz [Thu, 22 Jan 2015 11:51:04 +0000 (12:51 +0100)]
Fix LxcZoneSuite/StartStopTest

[Bug/Feature]   Test was failing
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: Ia87dbd173cfe58f216adac1141a15d854e91159c

9 years agoImprove config tests 40/33440/3
Piotr Bartosiewicz [Fri, 9 Jan 2015 14:13:36 +0000 (15:13 +0100)]
Improve config tests

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I6fc7974d3379d4a96aa712e3e00b8798e6d90181

9 years agoSome synchronizations 36/34136/4
Mateusz Malicki [Wed, 21 Jan 2015 11:53:38 +0000 (12:53 +0100)]
Some synchronizations

[Bug/Feature]   Segfault may happen
[Cause]         Access to expired memory (stack), unset memory or data races
[Solution]      Synchronizations
[Verification]  Run tests in slow machine

Change-Id: Iebf1a3d7dc93341d4200f6380c0110ecd2d96075

9 years agoAdd ValueLatch interface and use it in IPC tests 71/33671/10
Lukasz Kostyra [Tue, 13 Jan 2015 10:13:44 +0000 (11:13 +0100)]
Add ValueLatch interface and use it in IPC tests

[Feature]       New ValueLatch interface.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I90e4f7523f57b2f5cb8543e932e0fadffff5b824

9 years agoFix: Abort tests on timeout 04/34004/4
Mateusz Malicki [Mon, 19 Jan 2015 14:59:23 +0000 (15:59 +0100)]
Fix: Abort tests on timeout

[Bug/Feature]   Abort testing if timeout was exceeded
[Cause]         Access to expired memory (stack) or unset memory
[Solution]      Move shared data on heap or change expiring order
[Verification]  Run tests (IPCSuite) in slow machine

Change-Id: Ib2621d1700cd7c53f9d0dfa29e4b603006525a81

9 years agoIPC: Single request queue 22/33922/8
Jan Olszak [Thu, 15 Jan 2015 15:37:06 +0000 (16:37 +0100)]
IPC: Single request queue

[Bug/Feature]  Single queue for passing data between threads
               Prefixes in loggs inside Processor
               Destructor always waits till Processor ends
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: Idc31496559b46e836528843dfc411cbdeaf259e0

9 years agoAdd prefix to config db 24/33924/1
Piotr Bartosiewicz [Fri, 16 Jan 2015 14:00:40 +0000 (15:00 +0100)]
Add prefix to config db

[Bug/Feature]   Added prefix to config db. Adjusted to libConfig
                changes.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: Ie2cbf4cd4c8b4ef6225b5a2bfa740e5f61129fcc

9 years agoPrevent from call method on partially destroyed object 56/33856/2
Mateusz Malicki [Thu, 15 Jan 2015 15:20:12 +0000 (16:20 +0100)]
Prevent from call method on partially destroyed object

[Bug]           startAsync can cause call method on partially destroyed object
[Cause]         async call are processed while ZoneManager is being destroyed
[Solution]      Ensure that all async calls was ended
[Verification]  Set EVENT_TIMEOUT=5 (ut-zones-manager.cpp), build, install,
                run ZonesManagerSuite/StartShutdownZoneTest with 1000
                times less speed.

Change-Id: I00bc8c0926be8a9a62ec23b81f62a2827db4799b

9 years agoFix persistence of dynamically created zones 30/33630/6
Piotr Bartosiewicz [Tue, 13 Jan 2015 10:25:52 +0000 (11:25 +0100)]
Fix persistence of dynamically created zones

[Bug]           No zones after daemon restart
[Cause]         N/A
[Solution]      Use database to store dynamic config
[Verification]  1) run tests
                2) - run daemon
                   - create new zone
                   - restart daemon, verify zone is working
                   - destroy that zone
                   - restart daemon, verify zone is gone

Change-Id: I43f3e2f4f2d9c897d20b52db812dd837c90ef155

9 years agoUnallocate provisioned resources in destructor 61/33761/5
Mateusz Malicki [Wed, 14 Jan 2015 09:18:14 +0000 (10:18 +0100)]
Unallocate provisioned resources in destructor

[Bug/Feature]   Provisioned resources aren't released when "zone->start" throws exception.
[Cause]         There is no destructor in ZoneProvsion class
[Solution]      Destructor was implemented
[Verification]  Build, install, run ZoneProvsionSuite tests

Change-Id: I4d610cae7b1ffee4fd3b06f2906b9e4631a1dcf7

9 years agoFix: Drop exception thrown from async callback 79/33779/3
Mateusz Malicki [Wed, 14 Jan 2015 14:28:01 +0000 (15:28 +0100)]
Fix: Drop exception thrown from async callback

[Bug/Feature]   Crash when exception are thrown from async callback
[Cause]         Exception from async callback
[Solution]      Drop exception
[Verification]  Build, install, run test on slp

Change-Id: I00fad962beb488508d25a21a68ee7e487f317ba0

9 years agoIPC: Single state mutex in Processor 55/33755/4
Jan Olszak [Fri, 9 Jan 2015 12:48:05 +0000 (13:48 +0100)]
IPC: Single state mutex in Processor

[Bug/Feature]  Fixed a bug in callSync.
               Replaced all mutexes in Processor with only one.
               Added LOGS loggs
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: I6b6ec26df5f5d7ba8b930e4321f766146fa556f0

9 years agoFix: Crash when testing ut-zones-manager 72/33672/1
Mateusz Malicki [Tue, 13 Jan 2015 14:36:23 +0000 (15:36 +0100)]
Fix: Crash when testing ut-zones-manager

[Bug/Feature]   Crash when testing ut-zones-manager
[Cause]         BOOST_CHECK is not thread safe
[Solution]      BOOSR_CHECK was removed from child thread
[Verification]  Build, install, run test on slp

Change-Id: I6cb10f626d8e5ec908e359de15b3fbbed9abb77c

9 years agoAdd get_zone_ids, get_active_zone_id and get_zones_status to cli 70/33270/7
Mateusz Malicki [Wed, 7 Jan 2015 13:29:30 +0000 (14:29 +0100)]
Add get_zone_ids, get_active_zone_id and get_zones_status to cli

[Feature]       Add get_zone_ids, get_active_zone_id and get_zones_status to cli
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run appropriate functions (through cli)

Change-Id: If6823243d66606d28bf6b45c5b2ece8ab7c06e49

9 years agoAdded testing wrong or unset union type 21/33521/2
Mateusz Malicki [Mon, 12 Jan 2015 15:16:47 +0000 (16:16 +0100)]
Added testing wrong or unset union type

[Bug/Feature]   Added testing wrong or unset union type
[Cause]         N/A
[Solution]      Throw ConfigException
[Verification]  Build, install, run ConfigurationSuite tests

Change-Id: I813b52870c4c12a58a9a614821056278a5445a68

9 years agoAdd test for LoggerScope 17/33517/2
Lukasz Kostyra [Wed, 17 Dec 2014 09:42:41 +0000 (10:42 +0100)]
Add test for LoggerScope

[Feature]       Test for new LoggerScope interface.
[Cause]         New interface in libLogger.
[Solution]      Test for new LoggerScope interface.
[Verification]  Build, install, run Log tests.

Change-Id: I43767c1f65d09ca8304046fd9d8586f1077a8b63

9 years agoIPC: Convert test synchronization method to Latch 73/33373/3
Lukasz Kostyra [Wed, 7 Jan 2015 14:39:02 +0000 (15:39 +0100)]
IPC: Convert test synchronization method to Latch

[Bug/Feature]   Some tests were using sleep_for in order to synchronize threads
[Cause]         N/A
[Solution]      Use Latch instead of atomic_bool set and sleep_for to
                synchronize threads in tests
[Verification]  Build, install, run tests. Should pass as they did before.

Change-Id: I3067ed1f13cdde047f720c0b6d05ce19ec156dbe

9 years agoFixed generation of log_sink file 33/33433/2
Mateusz Malicki [Fri, 9 Jan 2015 11:34:12 +0000 (12:34 +0100)]
Fixed generation of log_sink file

[Bug]i          log_sink file is invalid formated xml
[Cause]         Lxc invoke exit(0) after fork. Exit from child and
                from parent cause redundant log write
[Solution]      Add defintion to CMakeLists.txt
[Verification]  Build, install, build run test with '--log_sink=/tmp/log.xml',
                run 'xmllint --huge --format /tmp/log.xml' (there should
                be no parse errors).
                Note: StartHasStoppedTest can fail.

Change-Id: I9a1d4bee9030eb8e3958ff914ef7cf2dc1a953ce

9 years agoIPC: Cleaned up timeouts in tests 23/33423/4
Jan Olszak [Fri, 9 Jan 2015 09:11:28 +0000 (10:11 +0100)]
IPC: Cleaned up timeouts in tests

[Bug/Feature]  N/A
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: Ifee2dffed77a5686fdb2165b2a530f39aef0857a

9 years agoAdd correct button configuration 39/33339/1
Dariusz Michaluk [Thu, 8 Jan 2015 10:12:25 +0000 (11:12 +0100)]
Add correct button configuration

[Bug/Feature]   Add correct button configuration
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests, launch vasum

Change-Id: I3561823663c3dd9a058249a0467fa704105f19a1
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoUpdate tizen common (with wayland) lxc template 49/32949/3
Dariusz Michaluk [Tue, 30 Dec 2014 13:46:59 +0000 (14:46 +0100)]
Update tizen common (with wayland) lxc template

[Bug/Feature]   Adjust template to new platform image
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ic32677fa85a73249af5f1d84b63893b26d1eadd4
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoIPC: Fixed DisconnectedPeerError test 79/33279/1
Jan Olszak [Wed, 7 Jan 2015 15:02:54 +0000 (16:02 +0100)]
IPC: Fixed DisconnectedPeerError test

[Bug/Feature]  N/A
[Cause]        SERIALIZATION_ERROR may also be returned when peer disconnects
[Solution]     N/A
[Verification] Build, install, run tests

Change-Id: Ifaf67828796cfa0def8d5f56dc926314abb2d36b

9 years agoIPC: External polling loop with a Client 52/32052/12
Jan Olszak [Tue, 16 Dec 2014 13:09:33 +0000 (14:09 +0100)]
IPC: External polling loop with a Client

[Bug/Feature]  Using GMainLoop with a Client is possible.
               Fixed some buggs
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests

Change-Id: Iab3350b400739bb951d84e0d6b7de15d0cccf1d3

9 years agoSmall code cleanup 89/32989/2
Piotr Bartosiewicz [Wed, 31 Dec 2014 12:28:54 +0000 (13:28 +0100)]
Small code cleanup

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: I45d18c987c7ea90276a3cf6e1eac3760a9df1db7

9 years agoDebug utility class: SameThreadGuard 73/32673/2
Piotr Bartosiewicz [Mon, 22 Dec 2014 11:01:20 +0000 (12:01 +0100)]
Debug utility class: SameThreadGuard

[Bug/Feature]   A utility for checking the code against invalid assumes
                about synchronization needs.
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: I880f9c334d8d461e2472052db5244d9f5eab1bb8

9 years agoFix creating zone when USE_EXEC is defined 66/32766/1
Piotr Bartosiewicz [Tue, 23 Dec 2014 15:30:14 +0000 (16:30 +0100)]
Fix creating zone when USE_EXEC is defined

[Bug/Feature]   Broken zone creation using lxc-create
[Cause]         N/A
[Solution]      N/A
[Verification]  Compile with -DUSE_EXEC, sun server and create zone

Change-Id: I164ea2ea17e93e4e22e7b74d2f8539484cedea2f

9 years agoImplement grant and revoke device 11/32611/5
Piotr Bartosiewicz [Fri, 19 Dec 2014 13:56:56 +0000 (14:56 +0100)]
Implement grant and revoke device

[Bug/Feature]   Was not implemented
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests, run grant/revoke device cli commands

Change-Id: I4cfa67d99cb45d4747cfd780776bc2340c5f4535

9 years agoImplement shutdown/start function in server, client and cli 69/32669/2
Dariusz Michaluk [Thu, 18 Dec 2014 08:56:02 +0000 (09:56 +0100)]
Implement shutdown/start function in server, client and cli

[Bug/Feature]   Implement shutdown/start function in server, client and cli
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run appropriate function (through cli)

Change-Id: Ib06feff13305db134cf3415c38e83d0e836f149a
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoconfig (dynamic): unit tests, test config extracted 10/31710/13
Krzysztof Dynowski [Sat, 6 Dec 2014 12:05:46 +0000 (13:05 +0100)]
config (dynamic): unit tests, test config extracted

[Bug/Feature]   test loading config defaults from json
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ia9ad29af5e343642d9ca7ae26b126c3efe45beab

9 years agoTaking into account the provision configuration 07/31207/12
Mateusz Malicki [Tue, 9 Dec 2014 14:56:40 +0000 (15:56 +0100)]
Taking into account the provision configuration

[Feature]      Taking into account the provision configuration
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests

Change-Id: I2b564bb3f9af2514781ff2233cabb7b1ca654e69

9 years agoRearrange create zone process 92/32392/3
Dariusz Michaluk [Wed, 17 Dec 2014 14:46:59 +0000 (15:46 +0100)]
Rearrange create zone process

[Bug/Feature]   Remove start functionality, add VT support.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I67a7eebf6e45bb2cab29e833fbf53c1bdaeb88fb
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoFix synchronization issues 73/32373/2
Piotr Bartosiewicz [Wed, 17 Dec 2014 12:41:13 +0000 (13:41 +0100)]
Fix synchronization issues

[Bug/Feature]   Missing mutex
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Iec7e016b62a0f3a671fd4843957e1bc6a265f84e

9 years agoSome cppcheck fixes 53/32153/2
Mateusz Malicki [Tue, 16 Dec 2014 10:40:03 +0000 (11:40 +0100)]
Some cppcheck fixes

[Bug]           Some cppcheck fixes (const, uniused variable)
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run cppcheck

Change-Id: I58fa2e3434c6a7546441ba310bb437b59c7fd6de

9 years agoUpdate tizen common (with wayland) lxc template 85/32085/7
Dariusz Michaluk [Mon, 15 Dec 2014 11:55:16 +0000 (12:55 +0100)]
Update tizen common (with wayland) lxc template

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ib7621c70a708fea479dc0d2e7d4bbc528728c504
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoChange zonesPath and ExecStart command in service 84/32084/7
Dariusz Michaluk [Mon, 15 Dec 2014 12:13:52 +0000 (13:13 +0100)]
Change zonesPath and ExecStart command in service

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ie51e3bd436f039f926c93b92ea5343e27e7314c0
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdding support for --vt option in lxc-templates 83/32083/4
Dariusz Michaluk [Mon, 15 Dec 2014 11:36:25 +0000 (12:36 +0100)]
Adding support for --vt option in lxc-templates

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I11049b06922f763e168449d43cf6dd9527ea9324
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoWorker thread utility class 91/31891/7
Piotr Bartosiewicz [Thu, 11 Dec 2014 16:54:13 +0000 (17:54 +0100)]
Worker thread utility class

[Bug/Feature]   A utility class that wraps a queue of tasks executed in a
                dedicated thread.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I32788fd6321c2877cf4dafe7213c1a140c1d3fd2

9 years agoAdd "enabled" file 96/32096/3
Lukasz Kostyra [Mon, 15 Dec 2014 12:25:23 +0000 (13:25 +0100)]
Add "enabled" file

[Feature]       File indicating that zones are running in the system.
[Cause]         Other external services (eg. security-manager) must know when
                zones are active in the system.
[Solution]      Provide "enabled" file, which will appear when zones are
                launched. The file will appear when first zone will be created,
                and file will disappear when last zone will be destroyed.
[Verification]  Build, install, run tests.

Change-Id: I634e424e28c7d449276bbe1c2c80f3cb0e35bcb7

9 years agoIPC: Support for the external polling loop in Service 57/31957/9
Jan Olszak [Mon, 8 Dec 2014 15:48:21 +0000 (16:48 +0100)]
IPC: Support for the external polling loop in Service

[Bug/Feature]   Using GMainLoop is possible
[Cause]         N/A
[Solution]      For glib > v.2.36
[Verification]  Build, install, run tests

Change-Id: Ic6d74688c322dd79b29195d94658a4f2ffe0aa83

9 years agoFix build error ('out' may be used uninitialized) 01/32101/2
Dariusz Michaluk [Mon, 15 Dec 2014 14:20:26 +0000 (15:20 +0100)]
Fix build error ('out' may be used uninitialized)

[Bug/Feature]   build error
[Cause]         uninitialized variable
[Solution]      initialize variable
[Verification]  build

Change-Id: I15fa8909d96a5f61998fb774efbc698cb21744f8
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoSupport for boost version less then 1.54 -- disbale move in config union 32/31832/4
Mateusz Malicki [Wed, 10 Dec 2014 17:24:32 +0000 (18:24 +0100)]
Support for boost version less then 1.54 -- disbale move in config union

[Bug/Feature]   Boost < 1.54 doesn't support rvalues in boost::any, better rvalues tests
[Cause]         ConfigUnionTest doesn't pass if compiled with boost 1.51
[Solution]      Changes in libConfig; Disable moving in union
[Verification]  Build, install, run tests

Change-Id: I3bb6af655fa9393bfab66d535705fa252ecf6174

9 years agoFix doxy comments and some other warnings 75/31775/1
Piotr Bartosiewicz [Tue, 9 Dec 2014 16:08:00 +0000 (17:08 +0100)]
Fix doxy comments and some other warnings

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I5cff5b198d533ec256d551d9e8280a5c117e06d4

9 years agoCMake options for fsanitize and additional warnings 67/31767/1
Piotr Bartosiewicz [Tue, 9 Dec 2014 14:23:54 +0000 (15:23 +0100)]
CMake options for fsanitize and additional warnings

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I7d54cec67d9d15c750a7108bd9d24a508be0d103

9 years agoRename containers to zones 11/31711/3
Dariusz Michaluk [Mon, 8 Dec 2014 13:04:46 +0000 (14:04 +0100)]
Rename containers to zones

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I3d9eb8894c1d236061a0abe35691be6c57839702
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoRename security containers to vasum 51/31651/4
Dariusz Michaluk [Fri, 5 Dec 2014 15:25:48 +0000 (16:25 +0100)]
Rename security containers to vasum

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I1df0eb506d03bde0f288322deaa0159741930199
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoImplementation of provisioning functions (store declarations) 08/31208/10
Mateusz Malicki [Tue, 2 Dec 2014 13:52:47 +0000 (14:52 +0100)]
Implementation of provisioning functions (store declarations)

[Feature]       Posibility to store provisioning declarations
[Cause]         N/A
[Solution]      Store declarations in config file (using libConfig)
[Verification]  Build, install, run tests

Change-Id: Ie661f1b560adc96798acc7911a2d86eb12fa6616

9 years agoTest ability to copy union and to set union type 18/31218/5
Mateusz Malicki [Tue, 2 Dec 2014 15:17:13 +0000 (16:17 +0100)]
Test ability to copy union and to set union type

[Bug/Feature]   Test ability to copy union and to set union type
[Cause]         Need to copy and add new union elements
[Solution]      1) Clear vector with unions; 2) set, copy and move elements
[Verification]  Build, install, tests

Change-Id: Iea2d7eca36edcfd34f768d1e99a3da970300afd8

9 years agoIPC: Replace PeerID witch peer's file descriptor 59/31659/2
Jan Olszak [Mon, 8 Dec 2014 12:41:39 +0000 (13:41 +0100)]
IPC: Replace PeerID witch peer's file descriptor

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I30203990d9c9c3a58515d2fe09b074072122c156

9 years agoFix some other threading issues 50/31650/3
Piotr Bartosiewicz [Mon, 8 Dec 2014 11:52:32 +0000 (12:52 +0100)]
Fix some other threading issues

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I89b35811644f424773c007bb7d13d622ba57ac48

9 years agoFix ipc threading issues 49/31549/1
Piotr Bartosiewicz [Fri, 5 Dec 2014 14:57:49 +0000 (15:57 +0100)]
Fix ipc threading issues

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I0f403bdb9dd535186a7c1fa10a486da265858ad7

9 years agoUnit tests configs refactor 79/31379/1
Piotr Bartosiewicz [Thu, 4 Dec 2014 12:03:24 +0000 (13:03 +0100)]
Unit tests configs refactor

[Bug/Feature]   There was no possibility to test adding multiple zones
                using templates
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ie5ea1c2c2a227e0bb4ed9d02aa2965e5b2443f44

9 years agoRename domain to zone in files names 68/31368/1
Dariusz Michaluk [Thu, 4 Dec 2014 10:49:49 +0000 (11:49 +0100)]
Rename domain to zone in files names

Change-Id: If4e79cb41a4af6398ca27ba4c434554dbc090c16
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoRename domain to zone 64/31364/1
Dariusz Michaluk [Tue, 2 Dec 2014 14:18:51 +0000 (15:18 +0100)]
Rename domain to zone

Change-Id: Ic17dd814bc8fd19848bf936bd2ffebc7da1acf6c
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdded lock_domain/unlock_domain to container manager 11/31111/6
Dariusz Michaluk [Thu, 27 Nov 2014 14:05:36 +0000 (15:05 +0100)]
Added lock_domain/unlock_domain to container manager

[Feature]      Ability to lock/unlock domain
[Cause]        The need for the ability to lock/unlock domains
[Solution]     Add lock_domain/unlock_domain function
[Verification] Build, install, run

Change-Id: I169f94ceef462346a33530ec467c9bb239b57d85
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoFix: Removed comma at end of enum 55/31355/1
Mateusz Malicki [Thu, 4 Dec 2014 09:50:16 +0000 (10:50 +0100)]
Fix: Removed comma at end of enum

[Bug/Feature]   Gcc 4.6 does not complie
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Ic293014b3211fea8b0896a93e5336f59a3a9956f

9 years agoAdd stubs for provisioning 09/31209/5
Mateusz Malicki [Fri, 28 Nov 2014 13:50:15 +0000 (14:50 +0100)]
Add stubs for provisioning

[Bug/Feature]   Stubs (client and server) for provisioning
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Id8f4a0cb3d59fce8fed6f036b0d57f480ffff275

9 years agoFix compilation issue 05/31305/1
Piotr Bartosiewicz [Wed, 3 Dec 2014 16:03:43 +0000 (17:03 +0100)]
Fix compilation issue

[Bug/Feature]   Code does not compile under gcc 4.6
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I883ae5c04de5dafd690e4ac2c1956780f8d20725

9 years agoIPC: CallQueue 23/31223/5
Jan Olszak [Tue, 2 Dec 2014 16:27:17 +0000 (17:27 +0100)]
IPC: CallQueue

[Bug/Feature]   CallQueue to wrap the Calls' queue
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I9519114e1c6f2e4040e956ae54f5093646f2dfaf

9 years agoFix running tests under valgrind 19/31219/3
Piotr Bartosiewicz [Tue, 2 Dec 2014 15:27:25 +0000 (16:27 +0100)]
Fix running tests under valgrind

[Bug/Feature]   Running LXC commands via exec, new building flag
                USE_EXEC
[Cause]         N/A
[Solution]      N/A
[Verification]  Build with and without USE_EXEC, run tests

Change-Id: I42a2745d81d309922704bd213a72727b4c613c40

9 years agoIPC: Signals 19/31019/6
Jan Olszak [Thu, 27 Nov 2014 13:02:11 +0000 (14:02 +0100)]
IPC: Signals

    [Bug/Feature]   Signals in the IPC mechanism
    [Cause]         N/A
    [Solution]      N/A
    [Verification]  Build, install, run tests

Change-Id: Ie84b88ffa2956e744216d9ff7e9c227631f78e50

9 years agoSupport for destroying container 66/30966/3
Piotr Bartosiewicz [Thu, 27 Nov 2014 15:39:33 +0000 (16:39 +0100)]
Support for destroying container

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I4303284b06fdebf452a040c9dfa2c1cddc0b8abf

9 years agoAdded testing union in config file 88/30888/6
Mateusz Malicki [Wed, 26 Nov 2014 14:24:00 +0000 (15:24 +0100)]
Added testing union in config file

[Bug/Feature]   Testing union in config file
[Cause]         Added union to config
[Solution]      Added union field in testing structure
[Verification]  Build, install, run scs tests

Change-Id: I538e6ea370ea1a57f647bbde0f040b1585a4fd0a

9 years agoAdd tizen common (with wayland) lxc template 27/30727/5
Dariusz Michaluk [Mon, 24 Nov 2014 14:33:27 +0000 (15:33 +0100)]
Add tizen common (with wayland) lxc template

Change-Id: If6d1fe2641f9a36a7d3a8c16b9a658661491ff13
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdded lock_domain/unlock_domain to cli 32/30832/1
Dariusz Michaluk [Tue, 25 Nov 2014 15:13:41 +0000 (16:13 +0100)]
Added lock_domain/unlock_domain to cli

[Feature]      Ability to lock/unlock domain through cli
[Cause]        The need for the ability to lock/unlock domains
[Solution]     Add lock_domain/unlock_domain cli function
[Verification] Build, install, run

Change-Id: I4a017b328f0b44913f0561bd444e913c68f67359
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdd client stubs for domain lifetime management 18/30818/2
Dariusz Michaluk [Tue, 25 Nov 2014 13:33:28 +0000 (14:33 +0100)]
Add client stubs for domain lifetime management

[Bug/Feature]   Client stubs for domain lifetime management
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I4b6b659e4de5e18d2b00851ecbdeacfd80e3d442
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoTemplated network configuration 19/30819/2
Piotr Bartosiewicz [Tue, 25 Nov 2014 13:47:58 +0000 (14:47 +0100)]
Templated network configuration

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run test

Change-Id: I46af4da7ad656b05193184fc972c1d7489eb25f6