test: use flock when calling mkfs.btrfs

As stated in https://github.com/systemd/systemd/issues/21819#issuecomment-1064377645
`mkfs.btrfs` doesn't hold the lock for the whole duration of
`mkfs.btrfs`, thus causing unexpected races & test fails. Let's
wrap the `mkfs.btrfs` calls in an flock wrapper to mitigate this.

Hopefully fixes: #21819
This commit is contained in:
Frantisek Sumsal
2022-03-25 10:28:07 +09:00
committed by Yu Watanabe
parent ed1cbdc347
commit 41d1aaea64
2 changed files with 47 additions and 4 deletions
+1
View File
@@ -141,6 +141,7 @@ BASICTOOLS=(
echo
env
false
flock
getconf
getent
getfacl