($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
To: Joshua Watt <jpewhacker@gmail.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel][RFC v2] prserv: Enable database sharing
Date: Tue, 30 Apr 2024 10:57:18 +0200	[thread overview]
Message-ID: <2245b58e-41b3-49d9-8eb2-d20a95d942a7@bootlin.com> (raw)
In-Reply-To: <CAJdd5GaEuVw+p=aw5D5cw6i1jAwS+eDDRqSF-s_5p4324GEWKA@mail.gmail.com>

Hi Joshua,

On 4/29/24 at 23:03, Joshua Watt wrote:
> On Mon, Apr 29, 2024 at 2:27 PM Michael Opdenacker
> <michael.opdenacker@bootlin.com> wrote:
>> Hi Joshua,
>>
>> On 4/26/24 at 19:55, Joshua Watt wrote:
>>> It has commit() calls also, look in sqlite.py. I frequently forget
>>> that the cursor doesn't implicitly commit when closed (unlike SQL
>>> Alchemy, which _does_ do that) :)
>> Correct, I must have checked the wrong file.
>>
>> Actually, my code should have all the commit() calls it needs. I put one
>> every time a change is made to the database.
>>
>> However, I still have this very weird issue:
>>
>>    * NOK: in bitbake-selftests, the tests that use the PR server run
>>      successfully (except test_3b_readonly, because of the issue), but
>>      the PR table is empty in the database file (if opened through the
>>      sqlite3 command line). It seems that the table is only updated in
>>      memory. It must be so, otherwise the tests wouldn't pass.
>>    * OK: the only bitbake-selftests that use the DB functions directly
>>      don't have this issue
>>    * OK: creating an image with BitBake does create a non empty table in
>>      the PR database file (cache/prserv.sqlite3)
>>
>> Would anyone have any clue why?
> I think it might actually be returning the correct value ("0").
> Remember that each test case starts with a blank database, and I don't
> see any code in that populates anything into the database in that
> test.... so "0" seems like it would be the correct PR value?


Wow, your remark made me understand that the setUp() function is run 
before *every test*, and not only once for each class of tests!
If I merge my read-only tests with the previous ones, making only one 
test, they now work as expected (except for the very last one, maybe a 
bug in my code).

Many thanks! You saved my day :)
Cheers
Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  reply	other threads:[~2024-04-30  8:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 18:25 [bitbake-devel][RFC] prserv: Enable database sharing Joshua Watt
2024-04-23 18:27 ` [bitbake-devel][RFC v2] " Joshua Watt
2024-04-24  8:15   ` Michael Opdenacker
     [not found]   ` <17C929449F85DB18.1247@lists.openembedded.org>
2024-04-24  9:20     ` Michael Opdenacker
2024-04-24 14:23       ` Joshua Watt
2024-04-26 12:53         ` Michael Opdenacker
2024-04-26 17:55           ` Joshua Watt
2024-04-29 20:27             ` Michael Opdenacker
2024-04-29 21:03               ` Joshua Watt
2024-04-30  8:57                 ` Michael Opdenacker [this message]
     [not found]         ` <17C9D59E2FED0839.6322@lists.openembedded.org>
2024-04-26 12:56           ` Michael Opdenacker
2024-04-26 18:01             ` Joshua Watt
     [not found]           ` <17C9D5CD5F9CF1DF.16940@lists.openembedded.org>
2024-04-26 13:50             ` Michael Opdenacker
2024-04-26 17:52               ` Joshua Watt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2245b58e-41b3-49d9-8eb2-d20a95d942a7@bootlin.com \
    --to=michael.opdenacker@bootlin.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=jpewhacker@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).