Re: [dm-devel] [PATCH v2 28/37] multipath-tools tests: mock pthread_mutex_{lock, unlock}

2023-09-13 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:37PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > If some test fails with a lock held, cmocka doesn't deal well with > pthread_cleanup_pop(). Such tests can cause deadlock with the locking > primitives in the alias code, because locks don't get properly unl

[dm-devel] [PATCH v2 28/37] multipath-tools tests: mock pthread_mutex_{lock, unlock}

2023-09-11 Thread mwilck
From: Martin Wilck If some test fails with a lock held, cmocka doesn't deal well with pthread_cleanup_pop(). Such tests can cause deadlock with the locking primitives in the alias code, because locks don't get properly unlocked. Just mock the lock/unlock functions and generate an error if they w