platform/core/system/resourced.git
4 years agocpu-sched: check app list on startup 72/237472/5 accepted/tizen/unified/20200722.014938 submit/tizen/20200721.120800
Maciej Słodczyk [Tue, 30 Jun 2020 14:14:54 +0000 (16:14 +0200)]
cpu-sched: check app list on startup

Change-Id: Id0f468171e0b9b750bfc38e5e469928e270fa60f
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agocpu-sched: add apps' static cpusets 64/237364/6
Maciej Słodczyk [Mon, 29 Jun 2020 13:28:10 +0000 (15:28 +0200)]
cpu-sched: add apps' static cpusets

Change-Id: I1ce586e2923ea39c280c4e7bb53a04335554f5c1
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agocpu-sched: use apps' foreground events to pin to proper cpuset 65/236965/7
Maciej Słodczyk [Tue, 23 Jun 2020 20:24:08 +0000 (22:24 +0200)]
cpu-sched: use apps' foreground events to pin to proper cpuset

Change-Id: Icb19ef5628f1576aa87f9cc86ed3db59b24f18ef
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agocpu-sched: use cpu on/off events to create cpusets 64/236964/6
Maciej Słodczyk [Tue, 23 Jun 2020 19:24:48 +0000 (21:24 +0200)]
cpu-sched: use cpu on/off events to create cpusets

Change-Id: I158f2a8e26ae3334065717c06b16b9e161e3281e
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agocpu-sched: add cpu hotplug notification mechanism 11/236311/7
Maciej Słodczyk [Mon, 15 Jun 2020 14:12:38 +0000 (16:12 +0200)]
cpu-sched: add cpu hotplug notification mechanism

Change-Id: I8b01ef5d757501a709c3e067cdcf95223d522266
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agocpu-sched: foreground core set data structures 63/236963/6
Maciej Słodczyk [Tue, 23 Jun 2020 18:46:11 +0000 (20:46 +0200)]
cpu-sched: foreground core set data structures

Change-Id: I2bd110e85d7ebc8f30f0b7949abccbbb92cd6881
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agocpu-sched: add new module 62/236962/6
Maciej Słodczyk [Tue, 23 Jun 2020 13:57:59 +0000 (15:57 +0200)]
cpu-sched: add new module

Change-Id: I324d4e32be5d64ba993f8637d0500d8f76c3986b
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agoMerge "file-helper: fix possible memleak" into tizen
Maciej Slodczyk [Mon, 13 Jul 2020 05:32:50 +0000 (05:32 +0000)]
Merge "file-helper: fix possible memleak" into tizen

4 years agotests: Fix wrong operator 54/237954/2
sanghyeok.oh [Tue, 7 Jul 2020 02:47:07 +0000 (11:47 +0900)]
tests: Fix wrong operator

Change-Id: Ieb322a7824b29818f112b0fccd81e02821a48e24
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agofile-helper: fix possible memleak 29/237929/2
Maciej Słodczyk [Mon, 6 Jul 2020 12:45:55 +0000 (14:45 +0200)]
file-helper: fix possible memleak

Assigning NULL to **str passed pointer on fgets() error
may result in being unable to free memory pointed by *str
(if it was previously allocated dynamically).

Change-Id: Ieda457c4d9da02dab277d476ed79537da41e744e
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agoFix misspelled "swappiness" 07/237207/1
Dongwoo Lee [Mon, 20 Apr 2020 07:55:52 +0000 (16:55 +0900)]
Fix misspelled "swappiness"

Memcg attribute "swappiness" is misspelled as "swapness", so this
corrects them.

Change-Id: Ia6cf4774b26af613e344c25dca6591980a183247
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
4 years agoswap: fix wrong indentation 06/237206/1
Dongwoo Lee [Mon, 20 Apr 2020 07:48:56 +0000 (16:48 +0900)]
swap: fix wrong indentation

Change-Id: I95e53f4855ff04cf3241d997d2548e28d7cb3d37
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
4 years agoRelease 6.0.3 09/236209/1 accepted/tizen/unified/20200616.170900 submit/tizen/20200615.141410 submit/tizen/20200616.073101
Maciej Słodczyk [Mon, 15 Jun 2020 14:10:33 +0000 (16:10 +0200)]
Release 6.0.3

Change-Id: I5e84c4682e25a285dfa0b579530ad5db82c7cb23
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agosafe-kill: unit tests 77/235777/3
Maciej Słodczyk [Tue, 9 Jun 2020 15:34:42 +0000 (17:34 +0200)]
safe-kill: unit tests

Change-Id: I658e9e85aa57c2cdffc5ce0fa9a44bd28d5bbb28
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agosafe-kill: prevent processes from being killed while dumping a core 96/235196/12
Maciej Słodczyk [Tue, 2 Jun 2020 12:58:56 +0000 (14:58 +0200)]
safe-kill: prevent processes from being killed while dumping a core

Change-Id: I24bd152f04b90b3b7b4f64d06561e2833cf3d130
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agoMerge changes I4f376da7,I60270eda into tizen
Karol Lewandowski [Thu, 4 Jun 2020 13:33:42 +0000 (13:33 +0000)]
Merge changes I4f376da7,I60270eda into tizen

* changes:
  Add common module unit tests
  Fix improper behaviour of strstrip when string contains only whitespaces

4 years agoAdd common module unit tests 37/226437/15
Agnieszka Baumann [Wed, 19 Feb 2020 11:27:47 +0000 (12:27 +0100)]
Add common module unit tests

Change-Id: I4f376da7f1433dd6e4357080abc7927cf7b2c8a3

4 years agoFix improper behaviour of strstrip when string contains only whitespaces 21/226821/7
Agnieszka Baumann [Thu, 5 Mar 2020 19:14:45 +0000 (20:14 +0100)]
Fix improper behaviour of strstrip when string contains only whitespaces

Change-Id: I60270eda72f634cefd059a83c6f93dd0d4446aa9

4 years agoavoid truncate string warning when copying 58/235158/1
Maciej Słodczyk [Tue, 2 Jun 2020 08:05:03 +0000 (10:05 +0200)]
avoid truncate string warning when copying

Deliberately copying substring with strncpy() resulted
in 'output may be truncated' warning. Use memcpy()
to achieve the same without the warning.

Change-Id: Id6a74a3f096f83b1fd6a39728f2f3438172c76f2
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agotests: make sure all struct fields are initialized 57/235157/1
Maciej Słodczyk [Tue, 2 Jun 2020 08:04:18 +0000 (10:04 +0200)]
tests: make sure all struct fields are initialized

Change-Id: I89820b04c4ce8b15935aad33c6c48a7f5425874c
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agotests: make sure all vars are unreffed when not needed 56/235156/1
Maciej Słodczyk [Tue, 2 Jun 2020 08:03:47 +0000 (10:03 +0200)]
tests: make sure all vars are unreffed when not needed

Change-Id: I9320fa28495280d801cc6be6dc7ca42b13877787
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agoproc-watchdog: correct the change in the processing parts for each dbus signal 68/232868/1
Hyotaek Shim [Fri, 8 May 2020 05:19:05 +0000 (14:19 +0900)]
proc-watchdog: correct the change in the processing parts for each dbus signal

It was an old bug even though there is no big impact.
"freeze" signal has both type and pid,
and "suspend" signal has no param.
But it was reversed from the beginning and
an unnecessary error log was continuously being printed in the journal.

Change-Id: I964c99a04c55ec104148e954782a3069e835f0ae
Signed-off-by: ByungSoo Kim <bs1770.kim@samsung.com>
Change-Id: I244b637e62916fa5560ca27614aa8def3a4c3dca
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoMerge "Fix double free module_list variable" into tizen
Maciej Slodczyk [Tue, 5 May 2020 06:14:45 +0000 (06:14 +0000)]
Merge "Fix double free module_list variable" into tizen

4 years agoMerge "Fix g_list_remove and g_slist_remove bug" into tizen
Maciej Slodczyk [Tue, 5 May 2020 06:14:37 +0000 (06:14 +0000)]
Merge "Fix g_list_remove and g_slist_remove bug" into tizen

4 years agoFix double free module_list variable 02/231402/3
INSUN PYO [Tue, 21 Apr 2020 08:05:15 +0000 (17:05 +0900)]
Fix double free module_list variable

The modules_list is freed as destructor by remove_module() function.

Change-Id: If5b18c77f9e354599ee1c8d87b6d8cc5a3a93740

4 years agoBlock module priority NORMAL → LATE 75/231875/1 submit/tizen/20200427.110102
ByungSoo Kim [Fri, 24 Apr 2020 14:26:14 +0000 (16:26 +0200)]
Block module priority NORMAL → LATE

Change-Id: I0613ea96f7111ab75070cce702f9b859670d9501
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoInitialize late modules after BootingDone 74/231874/1
ByungSoo Kim [Fri, 24 Apr 2020 14:08:33 +0000 (16:08 +0200)]
Initialize late modules after BootingDone

Change-Id: Iadd21d6a6e402fbdb8bbef9e7d981ed3b8bc3c83
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoAdded variable initialization for g_variant_get 52/231552/1
INSUN PYO [Wed, 22 Apr 2020 09:33:18 +0000 (18:33 +0900)]
Added variable initialization for g_variant_get

Change-Id: Ica9c29a3ca755a83590ed9af1e8abddedf0cf14a

4 years agoFix g_list_remove and g_slist_remove bug 04/231404/3
INSUN PYO [Wed, 22 Apr 2020 00:39:41 +0000 (09:39 +0900)]
Fix g_list_remove and g_slist_remove bug

Change-Id: I6c460647b69e35f44b7e30a51de14e1c93c9f919

4 years agodbus: modified to reply error type message 26/224826/2
sanghyeok.oh [Thu, 13 Feb 2020 08:25:34 +0000 (17:25 +0900)]
dbus: modified to reply error type message

Change-Id: I4a2067c007810690e1607738099894b7f3b8341a
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoInclude all GPerf files verbatim 52/227952/1 accepted/tizen/unified/20200318.130501 submit/tizen/20200317.115543
Michal Bloch [Mon, 16 Mar 2020 13:46:12 +0000 (14:46 +0100)]
Include all GPerf files verbatim

GPerf compilation looks fragile and we already did this to one file
so might as well prevent the problem for the other two.

Change-Id: I808b24ed484e68f4d1ee3d74928d20756e501394
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoWorkaround build issue: include gperf file verbatim 26/227826/2
Michal Bloch [Mon, 16 Mar 2020 11:38:28 +0000 (12:38 +0100)]
Workaround build issue: include gperf file verbatim

Change-Id: Ib851cc25d9a2e53851ab22cc01f10217d8a7ef64
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoFix some warnings 51/227951/1
Michal Bloch [Tue, 17 Mar 2020 10:40:55 +0000 (11:40 +0100)]
Fix some warnings

Change-Id: Iece5804c05b2ff4dd36e33da4b827813f26eb2ad
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoTemporarily disable segfaulting tests 50/227950/1
Michal Bloch [Tue, 17 Mar 2020 10:13:22 +0000 (11:13 +0100)]
Temporarily disable segfaulting tests

They randomly started failing, let's not block the build process while I debug them

Change-Id: I42a2ecaeb3b3d5cf73d2f4bbed1a32dc68ba2d77
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoAdd .gitignore 60/227760/1 accepted/tizen/unified/20200316.221102 submit/tizen/20200316.080625
Hyotaek Shim [Mon, 16 Mar 2020 08:05:17 +0000 (17:05 +0900)]
Add .gitignore

Change-Id: Ibf481f8b9062e367746ca3899ea7c639f4d8d5d2
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoFix build error 58/227758/1
Hyotaek Shim [Mon, 16 Mar 2020 08:03:21 +0000 (17:03 +0900)]
Fix build error

[   39s] /usr/lib/gcc/armv7l-tizen-linux-gnueabi/9.2.0/include/c++/bits/stl_map.h: In member function 'int LowmemLimitEnv::
cgroup_make_subdir(const char*, const char*, bool*)':
[   39s] /usr/lib/gcc/armv7l-tizen-linux-gnueabi/9.2.0/include/c++/bits/stl_map.h:499:8: note: parameter passing for argument of
type 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, LowmemLimitEnv::CGroupData>
, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, LowmemLimitEnv::CGroupData> >, std::less<std::__cxx11::basic_
string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, LowmemLimitEnv::CGroupData> > >::const_iterator'
{aka 'std::_Rb_tree_const_iterator<std::pair<const std::__cxx11::basic_string<char>, LowmemLimitEnv::CGroupData> >'} changed in GCC 7.1

Change-Id: Ia62b225a8d26983eced992f7dac5d6b625254487
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoFix: parse_bytes prevent out of range value 98/227398/4
Agnieszka Baumann [Wed, 11 Mar 2020 14:45:41 +0000 (15:45 +0100)]
Fix: parse_bytes prevent out of range value

Change-Id: I5a8c59176fc936f02c419cb494548eeac37d0638

4 years agoFix improper behaviour of parse_bytes when string contains only one letter 94/227094/4
Agnieszka Baumann [Mon, 9 Mar 2020 14:13:16 +0000 (15:13 +0100)]
Fix improper behaviour of parse_bytes when string contains only one letter

Change-Id: Ie50ff0a666eedf4396f9e78d3d3aff07d9802885

4 years agoRevert "Temporarily disable built test" 66/227366/2 accepted/tizen/unified/20200312.131057 submit/tizen/20200312.020749
Hyotaek Shim [Wed, 11 Mar 2020 11:34:38 +0000 (11:34 +0000)]
Revert "Temporarily disable built test"

This reverts commit fc88a028951abd2ab116c119c6d3c7de3895073e.

Change-Id: I6a818f8c18195adbfd28a663d0b7bc709b65ea04

4 years agoFix a build test error 32/227232/22
Michal Bloch [Tue, 10 Mar 2020 15:39:47 +0000 (16:39 +0100)]
Fix a build test error

Change-Id: Id4a129f6a88ceec8939b1c4730bbc5b5f6671a6e

4 years agoFix a compilation failure 62/227362/1 submit/tizen/20200311.110552
Michal Bloch [Wed, 11 Mar 2020 10:58:15 +0000 (11:58 +0100)]
Fix a compilation failure

Change-Id: Idc3c8a892a748a7c0f2ded99501c96397a90f603
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoTemporarily disable built test 46/227246/2 accepted/tizen/unified/20200311.130752 submit/tizen/20200311.021008
Hyotaek Shim [Wed, 11 Mar 2020 02:09:18 +0000 (11:09 +0900)]
Temporarily disable built test

Change-Id: If64ec46bfedbd94f56d31a38605f4033cddf957e
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoparse_bytes prevent out of range value 36/226436/4
Agnieszka Baumann [Mon, 2 Mar 2020 12:16:15 +0000 (13:16 +0100)]
parse_bytes prevent out of range value

Change-Id: I65fd241855fa480ffea53b94f6914c925fde9cda

4 years agocoverity: Fix coverity issue 18/226118/4 accepted/tizen/unified/20200228.123728 submit/tizen/20200227.094013
sanghyeok.oh [Thu, 27 Feb 2020 04:14:03 +0000 (13:14 +0900)]
coverity: Fix coverity issue

Coverity: #1092538 Buffer not null terminated

Change-Id: Ib56db8edb211e819aa947f734894a1b757d5a518

4 years agoAdd proc_app_list test case 53/224453/2
Agnieszka Baumann [Thu, 6 Feb 2020 09:48:07 +0000 (10:48 +0100)]
Add proc_app_list test case

Change-Id: Ie311ee403d35f3200095796c1d535b5a59a60afb

4 years agoFix coverity bugs 71/224871/1 accepted/tizen/unified/20200214.120106 submit/tizen/20200213.180722
Agnieszka Baumann [Thu, 13 Feb 2020 12:21:20 +0000 (13:21 +0100)]
Fix coverity bugs

Change-Id: Ie1f584a9f4b4d42543247dc3657e998b902ddada

4 years agounit tests: add license headers 48/224448/1
Maciej Slodczyk [Mon, 10 Feb 2020 14:12:39 +0000 (15:12 +0100)]
unit tests: add license headers

Change-Id: I4a6d761690c526fb1919688437784eafb947495f
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agounit tests: remove unnecessary cflags 47/224447/1
Maciej Slodczyk [Mon, 10 Feb 2020 13:47:49 +0000 (14:47 +0100)]
unit tests: remove unnecessary cflags

Change-Id: I7dd8ba4ac8c2232d4d98b6be91435b73837b1e55
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoAdd skipped unfinished tests 24/224024/3
Agnieszka Baumann [Tue, 4 Feb 2020 09:30:17 +0000 (10:30 +0100)]
Add skipped unfinished tests

Change-Id: I90935144c9b9d83dfc171919a6821c3ce2af02ee

4 years agoFix -Wextra and -pedantic errors 08/224308/2
Agnieszka Baumann [Wed, 5 Feb 2020 15:31:53 +0000 (16:31 +0100)]
Fix -Wextra and -pedantic errors

Change-Id: I8eddbe7c94cfbbc497d6c1d59c180717d6dde898

4 years agomake filenames consistent 48/223748/2
Agnieszka Baumann [Mon, 3 Feb 2020 15:09:33 +0000 (16:09 +0100)]
make filenames consistent

Change-Id: I4e1bea4a32939d00a312d1efaa8ec28f8f1ba472

4 years agoAdd proc_app_info childs list unit test 27/223427/3
Baumann [Thu, 9 Jan 2020 08:29:44 +0000 (09:29 +0100)]
Add proc_app_info childs list unit test

Change-Id: I61859321333ce5e56a837e7536b290b15fca1706

4 years agounit-tests: file-helper 39/219239/15
Maciej Slodczyk [Mon, 9 Dec 2019 10:26:07 +0000 (11:26 +0100)]
unit-tests: file-helper

Change-Id: If6060efbebcc48abf1398d31e58564c184bd843c
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agocommon: preserve correct errno value when writing logs 25/223225/2
Maciej Slodczyk [Mon, 27 Jan 2020 18:09:43 +0000 (19:09 +0100)]
common: preserve correct errno value when writing logs

Change-Id: I51dc6443dbb1e3275fdf8887d398f41896ed814e
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoAdd dbus_get_cpu_lists tests 19/223219/1
Maciej Slodczyk [Mon, 27 Jan 2020 13:56:57 +0000 (14:56 +0100)]
Add dbus_get_cpu_lists tests

Change-Id: I2f03065f55ca627d1977f854af5de2af230f8199
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoAdd dbus_get_memory_lists tests 66/222966/7
Maciej Slodczyk [Mon, 20 Jan 2020 12:16:33 +0000 (13:16 +0100)]
Add dbus_get_memory_lists tests

Change-Id: Ib0a5678825af80d0048ecb798a890c9b35d83926
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoAdd proc_add_app_info cmocka unit test 49/221949/10
Baumann [Mon, 16 Dec 2019 14:49:04 +0000 (15:49 +0100)]
Add proc_add_app_info cmocka unit test

Change-Id: I516946ca67fab4787a1d51153ae8a8e191c9bed2

4 years agounit tests: extend proc_dbus_aul_group tests 60/220360/9
Maciej Slodczyk [Tue, 17 Dec 2019 17:02:08 +0000 (18:02 +0100)]
unit tests: extend proc_dbus_aul_group tests

Change-Id: I6735f09b0e8f7b3a312434c709cb4ee82b86e59f
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoMerge "tests: fix mocking of large-file syscall versions" into tizen
Maciej Slodczyk [Tue, 21 Jan 2020 13:19:34 +0000 (13:19 +0000)]
Merge "tests: fix mocking of large-file syscall versions" into tizen

4 years agotests: fix mocking of large-file syscall versions 56/222956/1
Michal Bloch [Tue, 21 Jan 2020 12:19:49 +0000 (13:19 +0100)]
tests: fix mocking of large-file syscall versions

Some buildchains produce code that links to large-file versions
of most syscalls (e.g. opendir → opendir64) which also need to
be mocked.

Change-Id: Ia1983069a15ded569172fc326e5f1de07f3cf2d4
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoAdd DBus cmocka unit tests 53/220253/9
Baumann [Mon, 18 Nov 2019 14:55:06 +0000 (15:55 +0100)]
Add DBus cmocka unit tests

Change-Id: I62008486b3144f27d91ef91916bd32acef28eb8c
Signed-off-by: Baumann <a.baumann@samsung.com>
4 years agotests: add tests for lowmem-dbus module 02/222102/4
Adrian Szyndela [Thu, 9 Jan 2020 15:18:04 +0000 (16:18 +0100)]
tests: add tests for lowmem-dbus module

Change-Id: Ib92de33c9fbc380dee4037cd787ee8eb33504a02

4 years agotests: add triggering for dbus signals 01/222101/4
Adrian Szyndela [Thu, 9 Jan 2020 15:15:28 +0000 (16:15 +0100)]
tests: add triggering for dbus signals

This adds mocked dbus signals registration function, a registration,
and callback mechanisms. It allows checking if dbus signals handlers
do their thing.

Change-Id: Id6af42d25fd00985e8f84d759d10457e031d39b8

4 years agotests: add lowmem-system tests 76/221976/2
Adrian Szyndela [Wed, 8 Jan 2020 15:38:21 +0000 (16:38 +0100)]
tests: add lowmem-system tests

Change-Id: I2111d33c92d5dd5588685ee95373a8d53e015155

4 years agotests: extract common code for lowmem modules 75/221975/2
Adrian Szyndela [Wed, 8 Jan 2020 15:34:01 +0000 (16:34 +0100)]
tests: extract common code for lowmem modules

This extracts the code which is common for testing lowmem-limit
and lowmem-system modules to separate files.

Add minor improvements:
* extract function for adding test modules in CMakeLists.txt
* add cmocka_wrap.hpp which aims to make including cmocka.h easier.

Change-Id: I67c34e3dbd84316fbd86d075e72333f2d0d14625

4 years agoVarious string buffer size checks 64/221264/3 accepted/tizen/unified/20200108.131420 submit/tizen/20200107.114054
Michal Bloch [Mon, 30 Dec 2019 16:36:29 +0000 (17:36 +0100)]
Various string buffer size checks

Change-Id: I65547beb1beceb0d8eb4a9516dda11cda9d84599
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoasprintf(3) requires <stdio.h> with _GNU_SOURCE 67/221267/2
Michal Bloch [Mon, 30 Dec 2019 16:38:40 +0000 (17:38 +0100)]
asprintf(3) requires <stdio.h> with _GNU_SOURCE

Change-Id: I514b6c5d229005efa56b303708679c5ac11478e4
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoFix 64-bit builds (explicit type casting) 65/221265/2
Michal Bloch [Mon, 30 Dec 2019 16:37:09 +0000 (17:37 +0100)]
Fix 64-bit builds (explicit type casting)

Change-Id: I2f84c225d705aecd326015e3dc3d858457f7ae5b
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoFix an instance of errno pollution 66/221266/2
Michal Bloch [Mon, 30 Dec 2019 18:15:30 +0000 (19:15 +0100)]
Fix an instance of errno pollution

Change-Id: Iecfb9e9639a6ddf81ea038e844da66e46cfc0287
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoFix CMake flag restoration 63/221263/1
Michal Bloch [Mon, 30 Dec 2019 16:34:38 +0000 (17:34 +0100)]
Fix CMake flag restoration

Change-Id: Ib098276c83720d88ac8cf1809065f1355067e1f4
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoExplicit "(null)" for %s (-Werror=format-overflow) 53/221253/2
Michal Bloch [Mon, 30 Dec 2019 11:40:40 +0000 (12:40 +0100)]
Explicit "(null)" for %s (-Werror=format-overflow)

Change-Id: I4e9fa414b3bbb1196491bb9ba5258f83610770ec
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agotests: lowmem-limit 55/220255/12
Adrian Szyndela [Mon, 16 Dec 2019 12:32:02 +0000 (13:32 +0100)]
tests: lowmem-limit

This adds tests framework for lowmem_limit module.
The framework consists of:
- mocking layer (lowmem-limit-mock);
- mocked environment (lowmem-limit-env) - mocked system functions and
  implemented other functions used by lowmem_limit (lowmem-limit-env);
- test driver (lowmem-limit-test) - contains test cases and runs them.

Change-Id: Id70b8d755bbde4accb7c45d193e7f7c77523d007

4 years agospec: allow incremental builds 52/220352/3
Adrian Szyndela [Tue, 17 Dec 2019 14:13:02 +0000 (15:13 +0100)]
spec: allow incremental builds

This makes 'mkdir -p' from 'mkdir' to silence mkdir from complaining
when created directory already exists.

This is needed for incremental builds, as by their very nature they
build over something that was already built. That is, 'build' directory
was created with previous build, and now, while building we don't want
to bail out with error, because it already exists.

Enough said. This is good stuff. Really.

Change-Id: Iaba6fa9d6ecb0d1a9bc4040465c4d979df377695

4 years agomemory: allow lowmem_limit to reinit for tests 49/220349/1
Adrian Szyndela [Tue, 17 Dec 2019 12:40:36 +0000 (13:40 +0100)]
memory: allow lowmem_limit to reinit for tests

This sets memory_limit_hash to NULL after freeing memory
associated with it. This way we can initialize the module
again. It helps with performing consecutive tests
within a single binary.

Change-Id: Icfe2755c1d7689a314d04d0056c9cac05bdafcd7

4 years agolowmem: fix memleak on error 66/220266/3
Adrian Szyndela [Mon, 16 Dec 2019 16:16:49 +0000 (17:16 +0100)]
lowmem: fix memleak on error

Change-Id: I10a70086f0302335c9023b4892388b2b3209674c

4 years agoremove duplicated code 25/219825/1
Maciej Slodczyk [Tue, 10 Dec 2019 10:08:46 +0000 (11:08 +0100)]
remove duplicated code

Change-Id: I0a9dfa4534eb87c8e665268ff08b2060762a99f4
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoFix `aarch64` builds 23/219423/1
Michal Bloch [Wed, 4 Dec 2019 14:27:19 +0000 (15:27 +0100)]
Fix `aarch64` builds

Change-Id: I0636a683b342bd8e2460737260b7e6934d977d7e
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agounit tests: fd-handler 29/217829/6
Maciej Slodczyk [Thu, 14 Nov 2019 16:20:55 +0000 (17:20 +0100)]
unit tests: fd-handler

Change-Id: Id52044e532cc1873c6838f06e24c5f72229e107f
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agounit tests: config parser 35/217035/9
Maciej Slodczyk [Tue, 5 Nov 2019 16:58:21 +0000 (17:58 +0100)]
unit tests: config parser

Change-Id: If103e1b6a8a9d8ae647ea081fc5a9681c5767881
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoadd cmocka based unit testing framework to the build process 52/216252/7
Maciej Slodczyk [Tue, 12 Nov 2019 13:16:41 +0000 (14:16 +0100)]
add cmocka based unit testing framework to the build process

Contains a notifier test as a working example.

Change-Id: I545406edad50763d9687abf4c418c2e6b0f94b0d
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agofix file-helper return value on premature EOF 38/219238/3
Maciej Slodczyk [Tue, 3 Dec 2019 15:27:45 +0000 (16:27 +0100)]
fix file-helper return value on premature EOF

Change-Id: I022f22746db4a9285f50208fe53ec7c49063cb0d
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agovip : rearrange logging to provide more debugging information 32/171332/5
Łukasz Stelmach [Wed, 28 Feb 2018 14:27:17 +0000 (15:27 +0100)]
vip : rearrange logging to provide more debugging information

Change-Id: I7ece8e8d7b83ff288457f8607eaa39f24b1bfa4a
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
4 years agosvace fix 99/219199/5
sanghyeok.oh [Tue, 3 Dec 2019 06:26:54 +0000 (15:26 +0900)]
svace fix

Change-Id: Ifc22558c277143c9620b38c9b2eb1552d37b652b
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoRelease 6.0.2 34/218734/1 accepted/tizen/unified/20191202.140914 submit/tizen/20191127.110001
Michal Bloch [Wed, 27 Nov 2019 10:52:01 +0000 (11:52 +0100)]
Release 6.0.2

Adds some product related functionality.

Change-Id: Ib967cc2f76454576a87714f3b9335a7778a3b345

4 years agoproc: make new interface to change priority 54/212454/7
ByungSoo Kim [Fri, 11 Aug 2017 13:50:56 +0000 (22:50 +0900)]
proc: make new interface to change priority

Systemd can support changing priority of system services
but in case application, no one can change priority.
It adds new interface in order to increase, decrease, reset priority of application
with priviledge.

Change-Id: I268c4ccb4faf8669e200f175691d3bfc8770c947
Signed-off-by: ByungSoo Kim <bs1770.kim@samsung.com>
4 years agoproc: add new interface for getting ram size 67/212267/15
ByungSoo Kim [Tue, 10 Jan 2017 07:57:48 +0000 (16:57 +0900)]
proc: add new interface for getting ram size

There are many requirements to get total ram size in such as smart
manager or gear manager.
Kernel and bootloader have already known ram size information
and they wrote this to /proc/cmdline.
'mem=nn[KMG]        [KNL,BOOT] Force usage of a specific amount of
memory'

Since Resourced can parse this information,
it can avoid using the hard coded value in other modules.

Change-Id: Ib1aca7c23414391b453b9e55c6cd3b393499f49b

4 years agoPort heart-battery.c 34/215234/4
Michal Bloch [Thu, 3 Oct 2019 16:33:36 +0000 (18:33 +0200)]
Port heart-battery.c

Change-Id: I232bdda38ab5c2cc73a93c5f75104f31fc49327f
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoPort vmpressure-lowmem-handler.c 79/215379/4
Michal Bloch [Mon, 7 Oct 2019 14:42:46 +0000 (16:42 +0200)]
Port vmpressure-lowmem-handler.c

Change-Id: I21fe594cd921aea9943f82bb968e3759d8226fcf

4 years agoRemaining Useful Life (RUL) implementation 22/207422/4
Amandeep Chauhan [Mon, 3 Jun 2019 14:48:17 +0000 (16:48 +0200)]
Remaining Useful Life (RUL) implementation

RUL implementation for monitoring battery health
and detecting when battery needs to be replaced

Change-Id: Id286f292630ede1670be2859e4439f236551631f
Signed-off-by: Amandeep Chauhan <a.chauhan@samsung.com>
4 years agoFix indent 05/218005/2 accepted/tizen/unified/20191121.073441 submit/tizen/20191121.052121
INSUN PYO [Mon, 18 Nov 2019 10:57:37 +0000 (19:57 +0900)]
Fix indent

Change-Id: I38295ad9d738103ae2041db8c5a4eea08153d554

4 years agoRelease 6.0.1 22/217722/2 accepted/tizen/unified/20191115.083924 submit/tizen/20191114.101902
Karol Lewandowski [Wed, 13 Nov 2019 15:41:49 +0000 (16:41 +0100)]
Release 6.0.1

This version introduces plugin system, allowing to drop -light
variant as all functionality can be enabled/disabled by providing
or not respective modules.

Change-Id: Ifb5b37652c622a7ea335ac4166b9c2e51be8032b

4 years agoDrop light variant if favour of plugins 66/216266/6
Karol Lewandowski [Tue, 22 Oct 2019 21:18:08 +0000 (23:18 +0200)]
Drop light variant if favour of plugins

Change-Id: Ie00753f470a0d214db3c0d478df88d9f4bb5445a

4 years agoplugins: Separate heart module 65/216265/5
Karol Lewandowski [Fri, 8 Nov 2019 14:32:19 +0000 (15:32 +0100)]
plugins: Separate heart module

Change-Id: I6a87903ad00e7bc65879eca2fd4661d5e1f64e70

4 years agoplugins: Separate swap module 48/216248/9
Karol Lewandowski [Tue, 22 Oct 2019 12:37:55 +0000 (14:37 +0200)]
plugins: Separate swap module

Change-Id: Iea7ce4fefe2444de444b7f353df733322f561aac

4 years agoplugins: Separate freezer module 33/216233/10
Karol Lewandowski [Tue, 22 Oct 2019 10:00:50 +0000 (12:00 +0200)]
plugins: Separate freezer module

Change-Id: Id5a60a03a93064a8e8666cef682214e750baca50

4 years agoplugins: Separate block module 32/216232/9
Karol Lewandowski [Tue, 22 Oct 2019 09:13:47 +0000 (11:13 +0200)]
plugins: Separate block module

Change-Id: I43a67d96c0796df8d3da96ab612458c79064ab3a

4 years agoplugins: Introduce private API and plugin architecture 58/216058/13
Karol Lewandowski [Mon, 21 Oct 2019 09:13:04 +0000 (11:13 +0200)]
plugins: Introduce private API and plugin architecture

Split resourced into:
  + private api (libresourced-private-api library and headers)
  + plugins using the api (/usr/lib/resourced/plugins)

Change-Id: I426a9ed26b74f389194300936508cb3f055a2c00

4 years agoBring back some "unused" functions for module use 51/217351/2
Michal Bloch [Fri, 8 Nov 2019 13:11:14 +0000 (14:11 +0100)]
Bring back some "unused" functions for module use

These are used in freezer.

This partially reverts ced08db5bb62fd4ba35f0fbc38799097d2da3240.

Change-Id: I2ca2b63c51f2aae6ed576a9a01d9630ef429b1de
Signed-off-by: Michal Bloch <m.bloch@partner.samsung.com>
4 years agoDrop debugging defines 31/216231/6
Karol Lewandowski [Tue, 22 Oct 2019 09:10:30 +0000 (11:10 +0200)]
Drop debugging defines

These are rarely/never used - leave them in .c files so that one
can still enable these if really needed.

Change-Id: I2005d9f5121f01d48ede99d7b86ada04c208ad09

4 years agoAvoid redundant module redefinitions 36/215936/8
Karol Lewandowski [Mon, 21 Oct 2019 09:10:46 +0000 (11:10 +0200)]
Avoid redundant module redefinitions

Change-Id: Icbd38fa648cb14817ecde3c38d6e9434b5371417