Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b72c64c0 authored by Qasim Javed's avatar Qasim Javed
Browse files

Wait for a string to appear in logs.

Currently, we have to wait for arbitrary amount of time before we check
the log for a particular string. Instead of that, add functionality to
wait for a provided string to appear in the logs.

When an fd is dup?()'ed, the oldfd and the newfd share the offset.
So when the offset is changed on the oldfd using lseek, that change in
offset is applied to the newfd as well. In the context of this change,
it means that when we Rewind(), that also changes where the logs will be
written in the backing store. It can cause problems if we are
Rewind()'ing while logs are being written.

This change keeps the dup'ed fd since its needed to create a backing
store. However, it creates adds a new fd which uses the open system call
to get a new fd to the underlying backing store file. Since this is a
separate fd, an lseek on this fd will not result in a change in offset
on the newfd and oldfd provided to dup3 system call.

Bug: 246955322
Tag: #gd-refactor
Test: atest bluetooth_test_gd_unit

Change-Id: Ib2fcfeef82d3419f4c02e1815b907b0b6ac499a9
parent a21f10ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment