Attention is currently required from: arehbein, dexter, pespin.
fixeria has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email )
Change subject: write_queue: Enable updating max_length field
......................................................................
Patch Set 3: Code-Review-1
(2 comments)
File src/core/write_queue.c:
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/e8b97450_647808f4
PS3, Line 161: queue->current_length > queue->max_length
This condition can never be true because you're updating the `queue->max_length`
after the loop, not before. So now this function would not remove any items at all. Do you
have a unit test for the scenario of removing exceeding items? Oh, you do. See my other
comment then.
File tests/write_queue/wqueue_test.c:
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/a0b9fb44_a447ccb2
PS3, Line 98: OSMO_ASSERT
Somehow this `assert()` does not assert at all, no matter how I change the expected value.
This is weird. If I add a `printf()` here, I clearly see that the amount of dropped
messages is 0, as expected with the current implementation (see my other comment).
Ah, well... I see now. You're doing `=` instead of `==`!
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibfe51a2faf29f8ae160a9c330c9af0d09b5a9002
Gerrit-Change-Number: 34444
Gerrit-PatchSet: 3
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 18 Sep 2023 07:02:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment