Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 20/07/2022 um 15:06 schrieb Vladimir Sementsov-Ogievskiy: > On 7/19/22 15:00, Emanuele Giuseppe Esposito wrote: >> >> >> Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: >>> >>> That made me ask: >>> >>> 1. Are all tests always run in main loop? If yes, why to protect status >>>

Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 15:00, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: That made me ask: 1. Are all tests always run in main loop? If yes, why to protect status reading in test_complete_in_standby() ? 2. Maybe, we don't need to protect anything

Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-19 Thread Emanuele Giuseppe Esposito
Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: > > That made me ask: > > 1. Are all tests always run in main loop? If yes, why to protect status > reading in test_complete_in_standby() ? > > 2. Maybe, we don't need to protect anything here? Why to protect other > things if we

Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-11 Thread Vladimir Sementsov-Ogievskiy
On 7/6/22 23:15, Emanuele Giuseppe Esposito wrote: Add missing job synchronization in the unit tests, with explicit locks. We are deliberately using _locked functions wrapped by a guard instead of a normal call because the normal call will be removed in future, as the only usage is limited to

[PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-06 Thread Emanuele Giuseppe Esposito
Add missing job synchronization in the unit tests, with explicit locks. We are deliberately using _locked functions wrapped by a guard instead of a normal call because the normal call will be removed in future, as the only usage is limited to the tests. In other words, if a function like