platform/core/system/dlog.git
4 years agoAdd current usage accessor to the daemon protocol 24/233424/5
Agnieszka Baumann [Thu, 7 May 2020 09:16:52 +0000 (11:16 +0200)]
Add current usage accessor to the daemon protocol

Change-Id: Ia7446796068a8e06965fd6e8e44e416f1f066888

4 years agoClarify function names: getsize → get capacity 21/233421/5
Agnieszka Baumann [Thu, 14 May 2020 08:40:41 +0000 (10:40 +0200)]
Clarify function names: getsize → get capacity

Change-Id: I28955dd2359498370756555cbd88d6ff5a1fb7e1

4 years agoImprove server timestamp handling 33/234233/3
Mateusz Majewski [Fri, 22 May 2020 12:49:47 +0000 (14:49 +0200)]
Improve server timestamp handling

Change-Id: I2242f8ded640817cc7e627743056a37d0811bd38

4 years agoRename the test_libdlogutil.c file to ..._legacy.c 40/235540/2
Mateusz Majewski [Fri, 5 Jun 2020 09:46:26 +0000 (11:46 +0200)]
Rename the test_libdlogutil.c file to ..._legacy.c

The only purpose of this is to make the next commit kinda readable.

Change-Id: I3e0e6472df46f6ce40e5a2e08dd7592e09e6a8fd

4 years agoClean up: delete code that add and subtract zero 70/235470/2 accepted/tizen/unified/20200609.153542 submit/tizen/20200608.114627
INSUN PYO [Fri, 5 Jun 2020 00:45:19 +0000 (09:45 +0900)]
Clean up: delete code that add and subtract zero

Change-Id: I3f6b20601f8d964717857aa3e128515dd043938b

4 years agoMake all the files in the dynamic directory respected 31/232131/3
Mateusz Majewski [Tue, 28 Apr 2020 10:45:08 +0000 (12:45 +0200)]
Make all the files in the dynamic directory respected

Change-Id: Id1f881bc8a22169ada9df672d291f080d78df3b0

4 years agoFix garbage data in long-format strings 03/235303/2 submit/tizen/20200603.194620 submit/tizen/20200604.180558
Michal Bloch [Tue, 2 Jun 2020 15:56:23 +0000 (17:56 +0200)]
Fix garbage data in long-format strings

Change-Id: Ie271b8ca58f0cc018fb13b306f66f0fdf02af2e4
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoInitialize a value (fixes uninitialized access) 85/235185/2
Michal Bloch [Tue, 2 Jun 2020 11:09:28 +0000 (13:09 +0200)]
Initialize a value (fixes uninitialized access)

Change-Id: I1984ea4fe7c3ec1748d73ca546c8e550e31c9224
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoRelease 6.0.12 89/234989/1 accepted/tizen/unified/20200603.150119 submit/tizen/20200601.123311
Michal Bloch [Mon, 1 Jun 2020 10:17:53 +0000 (12:17 +0200)]
Release 6.0.12

This release allows the use of hybrid mode on pipe backend.

Change-Id: I74a4144996b1a34798c704f83f482227a91bfdec
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix an ASAN complaint 33/234733/3
Mateusz Majewski [Thu, 28 May 2020 07:18:57 +0000 (09:18 +0200)]
Fix an ASAN complaint

Change-Id: I8a33a66a75162fb76d3994308545f2642ad921da

4 years agoImprove libdlogutil timeout handling 04/234904/2
Mateusz Majewski [Fri, 29 May 2020 13:00:03 +0000 (15:00 +0200)]
Improve libdlogutil timeout handling

The current (lib-internal so far) API allows one to specify how much one
should wait for logs. Sometimes however, we should perform actions
despite this. In such cases, we should limit the timeout to a maximum
value. This commit implements this. Also, it allows us to remove the
unneccessary 100 ms fixed timeout.

Change-Id: Ia9ae0872098847e79c60607438bbc2a9438b40f8

4 years agoAllow hybrid mode for pipe backend 45/233845/3 accepted/tizen/unified/20200529.124143 submit/tizen/20200527.060137 submit/tizen/20200528.103513
Michal Bloch [Tue, 12 May 2020 12:28:47 +0000 (14:28 +0200)]
Allow hybrid mode for pipe backend

Partially reverts 44238daabe075f5b0c4852c61cfb9ee7f269bf97.

Change-Id: I49f75475f9285c24fde4f473b5e767c4953535be
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: add socket connections to the socket epoll 44/233844/3
Mateusz Majewski [Mon, 18 May 2020 10:15:47 +0000 (12:15 +0200)]
logger: add socket connections to the socket epoll

Change-Id: I2ca5f500b02818454fa69c5ab4cfcfa4f8d3b3b9

4 years agologger: add sockets to epoll 56/233856/2
Michal Bloch [Fri, 8 May 2020 19:19:52 +0000 (21:19 +0200)]
logger: add sockets to epoll

Change-Id: Ie6d4b87f62948973b2c95b9d735eeb265f9430dc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: fd entity manipulators work on epoll metadata 55/233855/2
Michal Bloch [Fri, 8 May 2020 16:10:05 +0000 (18:10 +0200)]
logger: fd entity manipulators work on epoll metadata

Change-Id: I26dab246c071bae6a6004ddc8516bf4e342f2ba2
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: handle the (empty) socket epoll instead of sleeping 54/233854/2
Michal Bloch [Thu, 7 May 2020 19:39:21 +0000 (21:39 +0200)]
logger: handle the (empty) socket epoll instead of sleeping

Change-Id: I666632213a1e99418a35ab5cde0d6ef1904e3650
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: add a (so far unused) epoll for socket FDs 53/233853/2
Michal Bloch [Thu, 7 May 2020 19:24:58 +0000 (21:24 +0200)]
logger: add a (so far unused) epoll for socket FDs

Change-Id: I87d93f99d4b76cf6759901822965d28964edcaa1
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: bind epoll meta lifetime to logger 52/233852/2
Michal Bloch [Thu, 7 May 2020 19:16:47 +0000 (21:16 +0200)]
logger: bind epoll meta lifetime to logger

Change-Id: Ifddd234c30f215ac501faff550a24cea60838f07
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: extract epoll handling function 51/233851/2
Michal Bloch [Thu, 7 May 2020 19:03:08 +0000 (21:03 +0200)]
logger: extract epoll handling function

Change-Id: I67e37cdceeab3a65643c6f8fc5872fef25fea35a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: extract epoll metadata to a struct 50/233850/2
Michal Bloch [Thu, 7 May 2020 17:26:21 +0000 (19:26 +0200)]
logger: extract epoll metadata to a struct

Change-Id: Idaedf8407fdb24260ba66f7bf39455c883a52e3c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: extract epoll dispatcher 49/233849/2
Michal Bloch [Thu, 7 May 2020 16:40:23 +0000 (18:40 +0200)]
logger: extract epoll dispatcher

Change-Id: I4202a56d7ee3b41ea9b2fe2c61d85112219ebff3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix a typo in Makefile 96/234196/1
Mateusz Majewski [Fri, 22 May 2020 10:51:32 +0000 (12:51 +0200)]
Fix a typo in Makefile

Change-Id: I8d382b0c620ffcb9a7e1373b550b1560c93f47bc

4 years agoMerge "logger: optimize reader time book-keeping" into tizen
Karol Lewandowski [Thu, 21 May 2020 19:49:15 +0000 (19:49 +0000)]
Merge "logger: optimize reader time book-keeping" into tizen

4 years agosort_vector divided into positive and negative tests 18/232318/4
Agnieszka Baumann [Thu, 16 Apr 2020 08:31:19 +0000 (10:31 +0200)]
sort_vector divided into positive and negative tests

Change-Id: Ibd6617f7d3e6d55deda7be859c33950d16734305

4 years agotests: logutil.c divided into positive and negative 65/232465/2
Agnieszka Baumann [Thu, 30 Apr 2020 16:32:32 +0000 (18:32 +0200)]
tests: logutil.c divided into positive and negative

Change-Id: I2f0c1078939005c8f95ec1cf36b2426d70347bba

4 years agoAdd CPU usage measurement 39/233839/2
Mateusz Majewski [Tue, 19 May 2020 10:31:35 +0000 (12:31 +0200)]
Add CPU usage measurement

Change-Id: I123a926433fd456e1860dd6cc9572a3ffe0e2d0c

4 years agologger: optimize reader time book-keeping 42/233842/1
Michal Bloch [Tue, 12 May 2020 12:51:09 +0000 (14:51 +0200)]
logger: optimize reader time book-keeping

Change-Id: I8449236f1c15261aa7550f175de1942b519ecbc1
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoApply lazy_polling_sleep_ms=100 86/233286/1
Hyotaek Shim [Wed, 13 May 2020 11:09:28 +0000 (20:09 +0900)]
Apply lazy_polling_sleep_ms=100

Change-Id: Ie2ce6ab2aae3b777306d19c9edac860a607e30ab
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoHybrid mode config: only use for Android Logger backend 40/232440/3
Michal Bloch [Mon, 4 May 2020 10:49:54 +0000 (12:49 +0200)]
Hybrid mode config: only use for Android Logger backend

Change-Id: Ifaac28dd807262cc27d0b46f9bffa56e734085f3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoRevert "Revert "logger: introduce lazy/hybrid approach to early logging"" 39/232439/2
Michal Bloch [Mon, 4 May 2020 10:30:39 +0000 (12:30 +0200)]
Revert "Revert "logger: introduce lazy/hybrid approach to early logging""

This reverts commit 064c096da525adedf0766d0b91de16b011841676.

Change-Id: I2cf0fecf8437766fe774a4f702622e3d8c0d0109

4 years agoAdd secure logs test 66/232466/1 submit/tizen/20200506.124304
Mateusz Majewski [Mon, 4 May 2020 13:18:19 +0000 (15:18 +0200)]
Add secure logs test

Change-Id: I1157dae0c859b1b7b3e035e9c186efa553cc5aa8

4 years agoAdd secure log flag to dlogsend 54/232454/3
Mateusz Majewski [Mon, 4 May 2020 12:36:46 +0000 (14:36 +0200)]
Add secure log flag to dlogsend

Change-Id: I1dec52e921afdbbf5a0ff402d55516117f614cfd

4 years agoFix first secure log ignoring the config 60/232460/2
Michal Bloch [Tue, 5 May 2020 12:07:27 +0000 (14:07 +0200)]
Fix first secure log ignoring the config

Change-Id: Ifb575f0077fd35556e4263ef002535e274b95187
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlog: add `enable_secure_logs` config entry 21/232321/2
Michal Bloch [Thu, 30 Apr 2020 16:23:24 +0000 (18:23 +0200)]
libdlog: add `enable_secure_logs` config entry

If it is set to 0, __dlog_sec_print will just
return 0. Defaults to 1.

Change-Id: Ie3a00c5aa25bd4035444ae27383d649acf0e1d23
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoRevert "Revert "Fix a bottleneck in log processing"" 92/232392/2
Hyotaek Shim [Mon, 4 May 2020 06:22:25 +0000 (06:22 +0000)]
Revert "Revert "Fix a bottleneck in log processing""

This reverts commit 161899c8835dbacedde7eafc36cbc94725dffddb.

Change-Id: I92027e73240b32569572ad244cee50d0c452f155

4 years agoRevert "Revert "Move some more getters around"" 91/232391/2
Hyotaek Shim [Mon, 4 May 2020 06:15:56 +0000 (06:15 +0000)]
Revert "Revert "Move some more getters around""

This reverts commit 146458f9b77c55345efbb3419ee82e423c66e993.

Change-Id: I20602b26aa154a277a6735209036edb658a42569

4 years agoRevert "Fix a bottleneck in log processing" 87/232387/2 accepted/tizen/unified/20200504.040710 submit/tizen/20200504.040553
Hyotaek Shim [Mon, 4 May 2020 03:55:55 +0000 (03:55 +0000)]
Revert "Fix a bottleneck in log processing"

This reverts commit e2144aefea4b4091a4f653c59f0fc4aeecf7cb42.t

Change-Id: I3333f245fb836316b582ac0c82ad987dfde48c84

4 years agoRevert "logger: introduce lazy/hybrid approach to early logging" 83/232383/2
Hyotaek Shim [Mon, 4 May 2020 03:04:37 +0000 (03:04 +0000)]
Revert "logger: introduce lazy/hybrid approach to early logging"

This reverts commit 4fe8f45ca0edf377bc5ef4fde82346e45c1a1145.

Change-Id: I47e25decfb352b6534cce03af3eb85414be43f6f

4 years agoRevert "Move some more getters around" 84/232384/2 submit/tizen/20200504.032742
Hyotaek Shim [Mon, 4 May 2020 03:09:53 +0000 (03:09 +0000)]
Revert "Move some more getters around"

This reverts commit f97985fd478b5e8229d58e84620349889ad9cd69.

Change-Id: I2313ea90bc0213aade119d2aff5aca0173c8ae72

4 years agoMerge "Fix a mistake" into tizen
Michal Bloch [Thu, 30 Apr 2020 17:39:29 +0000 (17:39 +0000)]
Merge "Fix a mistake" into tizen

4 years agoFix a mistake 83/232283/1
Mateusz Majewski [Wed, 29 Apr 2020 15:09:56 +0000 (17:09 +0200)]
Fix a mistake

Oof!

Change-Id: Ia3a1f227645dce7b674792a6fee4298b50755703

4 years agoMake logctl lock the config file 80/232280/2
Mateusz Majewski [Wed, 29 Apr 2020 14:30:01 +0000 (16:30 +0200)]
Make logctl lock the config file

Somebody pointed out that, if two logctls are launched simultanously,
it may result in a race condition and one of the changes dropped. Our
minds quickly flocked to a solution in which we use exclusive locks to
lock the file on write. This means we will always see the file in a
consistent state.

Change-Id: I5062bdcddc6c880bfd11ec66dad9cc4927e0536b

4 years agoRewrite logctl to use open + fdopen instead of fopen 79/232279/2
Mateusz Majewski [Wed, 29 Apr 2020 14:18:39 +0000 (16:18 +0200)]
Rewrite logctl to use open + fdopen instead of fopen

Sounds useless, but allows us to avoid a hack in which we open the file
in append mode despite only ever intenting to read from it. Also, this
gives us access to the fd, which will prove useful in the future.

Change-Id: I8f2e32decf363e7bcc4c726d0f3eeedbe6c5ce4d

4 years agoRelease 6.0.11 18/232118/2 accepted/tizen/unified/20200429.032945 submit/tizen/20200428.114258 submit/tizen/20200429.062821
Michal Bloch [Tue, 28 Apr 2020 09:46:47 +0000 (11:46 +0200)]
Release 6.0.11

This realease brings the lazy polling mode as a solution to CPU usage.

Change-Id: I776d9163505b985e738c537b5e1e62e6da86bd0a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: introduce lazy/hybrid approach to early logging 41/230841/5
Michal Bloch [Wed, 22 Apr 2020 18:28:09 +0000 (20:28 +0200)]
logger: introduce lazy/hybrid approach to early logging

This mode is introduced in an attempt to limit CPU usage during boot time.
The logger will now wake up exactly after (instead of up to) the epoll delay
for some configurable amount of time (by default 10s). Ideally this would
just be waiting on BootingDone but the daemon doesn't handle DBus yet, which
would be a larger undertaking. After that delay, it switches back to usual
epoll behaviour (waking up on each log, limiting log loss).

Change-Id: I55555978902d18b2d922663a24fe1caeb6d330e8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix a bottleneck in log processing 16/232116/1
Michal Bloch [Tue, 28 Apr 2020 09:19:32 +0000 (11:19 +0200)]
Fix a bottleneck in log processing

Change-Id: I64cd95f2f6d6f1ba8b9967e4978f43e02bfdb311
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoMove some more getters around 33/230833/3
Mateusz Majewski [Tue, 14 Apr 2020 11:05:13 +0000 (13:05 +0200)]
Move some more getters around

Change-Id: I99b1cfc0964be3658e3059102dc00f11fe89f701

4 years agoFix logger backend integration test 13/230213/5
Mateusz Majewski [Wed, 8 Apr 2020 12:39:35 +0000 (14:39 +0200)]
Fix logger backend integration test

When we wrote the test, we assumed that the size of the buffer on the
logger backend is constant. This assumption turned out to be naïve and
completely wrong; the buffer on the emulator is much smaller.

Change-Id: Ied05dc9930688108c727969fb189e5cd3fb739bf

4 years agologger: allow polling time control through config 40/230840/5
Michal Bloch [Wed, 22 Apr 2020 18:18:08 +0000 (20:18 +0200)]
logger: allow polling time control through config

"epoll_time_ms" entry.

Change-Id: I0c911978902d18b2d922663a24fe1caeb6d330e8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: allow disabling KMSG buffer through config 39/230839/5
Michal Bloch [Fri, 10 Apr 2020 14:16:35 +0000 (16:16 +0200)]
logger: allow disabling KMSG buffer through config

Done through the new "handle_kmsg" entry (defaults to 1).

Change-Id: I399605ae9a6513b233f0613f5330b4d4d1fa412d
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix whitespace 83/230383/3
Mateusz Majewski [Thu, 9 Apr 2020 16:42:23 +0000 (18:42 +0200)]
Fix whitespace

Change-Id: Ibe66948c041cc1277e43d613bd6425503a6b5d04

4 years agoMerge changes I4ae42ed3,Ief2d8cc6 into tizen
Michal Bloch [Wed, 22 Apr 2020 10:53:03 +0000 (10:53 +0000)]
Merge changes I4ae42ed3,Ief2d8cc6 into tizen

* changes:
  libdlogutil: make the epoll check stateful
  libdlogutil: put epoll check in the state (nominally)

4 years agoCover queued_entry_timestamp.c completely 29/231229/1 accepted/tizen/unified/20200422.123150 submit/tizen/20200421.052338
Mateusz Majewski [Mon, 20 Apr 2020 08:41:35 +0000 (10:41 +0200)]
Cover queued_entry_timestamp.c completely

Change-Id: I26471ddb94a04a716d08ec8fc71484c9c4d31982

4 years agoCover logctl.c completely 52/231152/1
Mateusz Majewski [Fri, 17 Apr 2020 12:59:18 +0000 (14:59 +0200)]
Cover logctl.c completely

Change-Id: I3a6a17976a463e2598f4d5f016e1c155481062f3

4 years agoCover loglimiter.c completely 51/231151/1
Mateusz Majewski [Fri, 17 Apr 2020 12:53:25 +0000 (14:53 +0200)]
Cover loglimiter.c completely

Change-Id: I847947c8f12b07f1013dc7cdca50a3b84c41f4c3

4 years agolibdlogutil: make the epoll check stateful 22/231022/1
Michal Bloch [Thu, 16 Apr 2020 16:38:29 +0000 (18:38 +0200)]
libdlogutil: make the epoll check stateful

Change-Id: I4ae42ed3a94f644e7e63f55c79c17c62edd0f52b
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: put epoll check in the state (nominally) 21/231021/1
Michal Bloch [Thu, 16 Apr 2020 11:35:28 +0000 (13:35 +0200)]
libdlogutil: put epoll check in the state (nominally)

It's not really stateful yet, just the refactors needed to make it so.

Change-Id: Ief2d8cc6a9e89911eb775fea3e838e8fd8997990
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoqueued_entry divided into positive and negative tests 84/230884/2
Agnieszka Baumann [Tue, 14 Apr 2020 15:25:45 +0000 (17:25 +0200)]
queued_entry divided into positive and negative tests

Change-Id: Ie41b5f119bca98f209a237e401e79dfaaf59d40a

4 years agoApply Nice=1 to dlog_logger.service 35/230835/2
Hyotaek Shim [Tue, 14 Apr 2020 12:26:38 +0000 (21:26 +0900)]
Apply Nice=1 to dlog_logger.service

Change-Id: I57961d4a336e2fc9736bc0ae5521b2f71090482c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agofdi_pipe divided into positive and negative tests 46/230846/2
Agnieszka Baumann [Tue, 7 Apr 2020 13:24:22 +0000 (15:24 +0200)]
fdi_pipe divided into positive and negative tests

Change-Id: I46bfa31f37391a478691428909b529e70cc89309

4 years agofdi_logger divided into positive and negative tests 00/230200/2
Agnieszka Baumann [Mon, 30 Mar 2020 11:22:53 +0000 (13:22 +0200)]
fdi_logger divided into positive and negative tests

Change-Id: I73c6729446d2025269c5517f4457fc68177fc4fa

4 years agoRemove another lie 11/230211/1
Mateusz Majewski [Wed, 8 Apr 2020 12:11:50 +0000 (14:11 +0200)]
Remove another lie

Change-Id: I232d4b9883d66c496fd77a95430a3271f35ce1d5

4 years agoMove dlogutil_entry_s accessors 19/230019/3
Mateusz Majewski [Fri, 27 Mar 2020 14:08:35 +0000 (15:08 +0100)]
Move dlogutil_entry_s accessors

They are mostly unrelated to the rest of the library codewise. If we
move them somewhere else, rest of the code that might want to use them
won't have to pull in everything needed by the library (for example, the
capability library).

This is a temporary solution, in infinity we should have nice accessors
for dlogutil_entry_s all available in one spot and the whole DLog
accesing the struct only using those accessors. Right now, however, it's
nothing but a pipe dream since we have more important things to do than
pitful refactors.

Change-Id: Ifa05d056437e5d2143eb3a6fb25ad9247b08b1d6

4 years agofd_info divided into positive and negative tests 36/230036/2
Agnieszka Baumann [Thu, 2 Apr 2020 12:48:49 +0000 (14:48 +0200)]
fd_info divided into positive and negative tests

Change-Id: I36f179f6c0ac1f3f5fb2d9fb7c8bd07d198c43d7

4 years agoRelease 6.0.10 82/229882/1 submit/tizen/20200406.080750
Michal Bloch [Mon, 6 Apr 2020 07:41:42 +0000 (09:41 +0200)]
Release 6.0.10

This release fixes a memleak and brings
further refactors to libdlogutil internals.

Change-Id: I510d45297b1abe2dd97de4e345664c69ebb5a9df
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: fix a memory leak 09/229809/1
Michal Bloch [Fri, 3 Apr 2020 17:13:38 +0000 (19:13 +0200)]
libdlogutil: fix a memory leak

Change-Id: I8cc20443c9cd956e2f3fa00e0e2f4cc9a6c8682e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: leak safety 08/229808/1
Michal Bloch [Fri, 3 Apr 2020 17:12:57 +0000 (19:12 +0200)]
libdlogutil: leak safety

Change-Id: I9c18dfa4c0ba91b98e50ff5f43f111baa332680b
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: split off flush target setting 34/229534/2
Michal Bloch [Tue, 31 Mar 2020 17:38:09 +0000 (19:38 +0200)]
libdlogutil: split off flush target setting

Change-Id: Ic4cefeb97d836eaf41eb355c1907f963018e5bfd
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: split off buffer replenishment 29/229529/2
Michal Bloch [Tue, 31 Mar 2020 17:37:22 +0000 (19:37 +0200)]
libdlogutil: split off buffer replenishment

Change-Id: Ic4cefeb97d836eaf41eb355c1907f963018e5bfc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: split off buffer removal 28/229528/2
Michal Bloch [Tue, 31 Mar 2020 17:35:34 +0000 (19:35 +0200)]
libdlogutil: split off buffer removal

Change-Id: Ic4cefeb97d836eaf41eb355c1907f963018e5bfb

4 years agolibdlogutil: split off continuous flushing 21/229521/3
Michal Bloch [Tue, 31 Mar 2020 17:34:26 +0000 (19:34 +0200)]
libdlogutil: split off continuous flushing

Change-Id: Ic4cefeb97d836eaf41eb355c1907f963018e5bfa

4 years agolibdlogutil: simplify -t mode sorting 86/229386/3
Michal Bloch [Tue, 31 Mar 2020 16:29:18 +0000 (18:29 +0200)]
libdlogutil: simplify -t mode sorting

Change-Id: I709b29b2b510d49410b790c648fa9eabe8802c18
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: extract a common check to a function 80/229680/1
Michal Bloch [Thu, 2 Apr 2020 12:52:26 +0000 (14:52 +0200)]
libdlogutil: extract a common check to a function

Change-Id: I220e891e97a57bf13f775f1b4a928333b24710d2
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: support timeout param (nominally) 85/229385/2
Michal Bloch [Fri, 27 Mar 2020 19:29:54 +0000 (20:29 +0100)]
libdlogutil: support timeout param (nominally)

Change-Id: I405093fb559b4f1935e404aa8ae3f597fcdf6cb0
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoMerge changes I138ad4f5,Ib6bc5b61 into tizen accepted/tizen/unified/20200406.133202 submit/tizen/20200402.112144
Michal Bloch [Tue, 31 Mar 2020 15:13:01 +0000 (15:13 +0000)]
Merge changes I138ad4f5,Ib6bc5b61 into tizen

* changes:
  Const correctness
  libdlogutil: remove callback/userdata from the state

4 years agoConst correctness 33/229233/1
Michal Bloch [Fri, 27 Mar 2020 19:52:10 +0000 (20:52 +0100)]
Const correctness

Change-Id: I138ad4f5b3f76006c88319a5c204d674de1d9cd9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolimiter divided into positive and negative tests 73/228973/2
Agnieszka Baumann [Wed, 25 Mar 2020 09:21:52 +0000 (10:21 +0100)]
limiter divided into positive and negative tests

Change-Id: I25b01d7c093d80cf01bd6585a8ef526ceda915ef

4 years agolibdlogutil: remove callback/userdata from the state 32/229232/1
Michal Bloch [Fri, 27 Mar 2020 14:39:21 +0000 (15:39 +0100)]
libdlogutil: remove callback/userdata from the state

Change-Id: Ib6bc5b618dd1fd95c6a77d6bf78bd5eda93ac91d
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: refactor mainloop to work on single logs 75/228675/7
Mateusz Majewski [Tue, 24 Mar 2020 15:00:13 +0000 (16:00 +0100)]
libdlogutil: refactor mainloop to work on single logs

The main worker function now calls the callback on a single log.
Backward compatibility is maintained through a wrapper.

Change-Id: Iaacc48977c360b12bba3b06ab0a51fe2ba18bf3f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: put logs into vector before polling 98/228798/1
Michal Bloch [Wed, 25 Mar 2020 14:20:43 +0000 (15:20 +0100)]
libdlogutil: put logs into vector before polling

Eventually we want the API to return a single log. With poll at the
front, it would be done for every log returned, which is unnecessary.

Additionally, remove the "poll returned nothing" condition which
allowed all buffers to be drained at the same time. It shouldn't
be helping much in practice and can be simplified away.

The callback is temporarily not allowed to return 1. This will go
away in the final version of the API.

Change-Id: I4ccb0a613a902484303f651830a946ccc8718130
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoMerge "test_ptrs_list divided into positive and negative tests" into tizen
Michal Bloch [Wed, 25 Mar 2020 13:38:34 +0000 (13:38 +0000)]
Merge "test_ptrs_list divided into positive and negative tests" into tizen

4 years agotest_ptrs_list divided into positive and negative tests 92/228792/1
Agnieszka Baumann [Mon, 23 Mar 2020 11:57:54 +0000 (12:57 +0100)]
test_ptrs_list divided into positive and negative tests

Change-Id: I1e3391f6c1568a8a0adf4398401a7e875dfe133c

4 years agosyslog_parser divided into positive and negative tests 78/228678/1
Agnieszka Baumann [Tue, 24 Mar 2020 14:47:00 +0000 (15:47 +0100)]
syslog_parser divided into positive and negative tests

Change-Id: I05366c4f2f884cde56e3b552fa01d94e84bd398d

4 years agolibdlogutil: flushing stateful, unlooped 37/228537/2
Mateusz Majewski [Thu, 12 Mar 2020 09:23:34 +0000 (10:23 +0100)]
libdlogutil: flushing stateful, unlooped

This is done in order to move closer to the goal of making that
function reentrant. The block of code handling flushing still
forms a loop but now it is going to be trivial to change it to
return a single log by changing a 'continue' into a 'return'.

The block of code moved to the beginning so that the 'continue'
can emulate a loop as before (i.e. without epoll and sorting
happening in between) since the function is not reentrant yet.

Change-Id: I95248cfd3e8132dd14310219e93e3be887903605

4 years agolibdlogutil: move extra options to the state 08/228208/4
Michal Bloch [Thu, 19 Mar 2020 13:36:32 +0000 (14:36 +0100)]
libdlogutil: move extra options to the state

Change-Id: I257424c7e1c4ec8667747a0e00e0c0594321a6db
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoAdd license boilerplate 35/228535/2
Michal Bloch [Mon, 23 Mar 2020 17:30:18 +0000 (18:30 +0100)]
Add license boilerplate

Change-Id: I5c107e25c8abba1fc8b1099f66a90aa09fcb0a0c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agotest_common divided into positive and negative tests 34/228534/1 submit/tizen/20200324.041440
Agnieszka Baumann [Wed, 4 Mar 2020 16:13:37 +0000 (17:13 +0100)]
test_common divided into positive and negative tests

Change-Id: I35fb99d45fdec21892019dc6268b7e1ed2a79c54

4 years agoEnforce correct Android Logger message size 31/228531/1 submit/tizen/20200323.123413
Michal Bloch [Mon, 23 Mar 2020 12:16:19 +0000 (13:16 +0100)]
Enforce correct Android Logger message size

Change-Id: Iabff9351c39f5a20c0ca6993730b23cb7ab301ca
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoMeasure code coverage only when gcov option is given 09/228109/1 accepted/tizen/unified/20200323.172959 submit/tizen/20200319.070253 submit/tizen/20200319.110534 submit/tizen/20200320.175301 submit/tizen/20200323.014258
Yunmi Ha [Thu, 19 Mar 2020 06:18:42 +0000 (15:18 +0900)]
Measure code coverage only when gcov option is given

Change-Id: I9b4e2abfbacfc96e51bdf4d4cd48dd32c1c699bf
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
4 years agoRelease 6.0.9 58/228058/2 submit/tizen/20200318.173155 submit/tizen/20200318.231205
Michal Bloch [Wed, 18 Mar 2020 12:54:40 +0000 (13:54 +0100)]
Release 6.0.9

This release brings the fix of a SIGBUS crash and various refactoring preparations.

Change-Id: I4b3dcbdcf3ccefe2de7b4c875b8873324f269df7
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoRemove some dead code 44/228044/3
Mateusz Majewski [Wed, 18 Mar 2020 09:42:42 +0000 (10:42 +0100)]
Remove some dead code

Right now, literally only purpose of those two functions is confusing
people.

Change-Id: I1b4e9a814b4b6589abd5215ac79749a49ab219e9

4 years agoFix a dlogutil regression 64/228064/2
Mateusz Majewski [Wed, 18 Mar 2020 14:09:50 +0000 (15:09 +0100)]
Fix a dlogutil regression

Change-Id: I0529ab65e04e2a19c7e326a9014cdd1bc4c22752

4 years agoMerge "Don't wait until lazy init to block SIGPIPE" into tizen
Michal Bloch [Wed, 18 Mar 2020 12:53:34 +0000 (12:53 +0000)]
Merge "Don't wait until lazy init to block SIGPIPE" into tizen

4 years agoCommentary for previous 55/228055/1
Michal Bloch [Wed, 18 Mar 2020 11:58:59 +0000 (12:58 +0100)]
Commentary for previous

Change-Id: I9b5f3f54f6089b4a2aa1713c698e922504371c28
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix SIGBUS in pipe backend 19/228019/3
Semun Lee [Wed, 18 Mar 2020 06:46:45 +0000 (15:46 +0900)]
Fix SIGBUS in pipe backend

make log entry to be aligned by 4

Change-Id: Ibe17b0f7e99dfcdf823b4dc8d328f4c65b4c436a
Signed-off-by: Semun Lee <semun.lee@samsung.com>
4 years agoMerge changes I6d9bf6cd,If5f5eebd,Icf4b49c2,Ib4f2522d into tizen submit/tizen/20200317.184359
Michal Bloch [Tue, 17 Mar 2020 18:38:49 +0000 (18:38 +0000)]
Merge changes I6d9bf6cd,If5f5eebd,Icf4b49c2,Ib4f2522d into tizen

* changes:
  libdlogutil: extract more locals into the state
  libdlogutil: mainloop accepts state by param
  libdlogutil: extract state initialisation
  libdlogutil mainloop: keep state in a struct

4 years agoFix integration tests 69/227969/3
Mateusz Majewski [Tue, 17 Mar 2020 15:59:42 +0000 (16:59 +0100)]
Fix integration tests

Change-Id: I1ce295e95902e44d319999d98435434d14eb971f

4 years agoWorkaround gettid test failure 68/227968/3
Michal Bloch [Tue, 17 Mar 2020 15:11:56 +0000 (16:11 +0100)]
Workaround gettid test failure

Change-Id: Ie36fb856973f2d180da562d3c0d6d6ee380f46c7
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlog_android divided into positive and negative tests 25/227825/1
Agnieszka Baumann [Mon, 9 Mar 2020 19:00:30 +0000 (20:00 +0100)]
libdlog_android divided into positive and negative tests

Change-Id: I06842f7ed3a9ac619b94d5b767fbee8560fcc090

4 years agolibdlog_base divided into positive and negative tests 24/227824/1
Agnieszka Baumann [Mon, 9 Mar 2020 17:18:03 +0000 (18:18 +0100)]
libdlog_base divided into positive and negative tests

Change-Id: I75319256eca5d110cf5c2439097e9c1f50a65d79