]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
glibc: Enable NFS local file locking for glibc tests
authorDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Tue, 25 Nov 2025 08:40:05 +0000 (00:40 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Dec 2025 14:45:36 +0000 (14:45 +0000)
commitba4cc296f8cb9d91084f0d55382bf9ee3c1dda97
tree0db24c2e3b7e54d9a224048ec5a41ae44f3db35c
parent5eb80f3c562f6e395562c52df67fab60ae0ff32b
glibc: Enable NFS local file locking for glibc tests

Some glibc tests in oe-selftest were failing with

error: test-container.c:837: Cannot lock testroot

The issue came from test-container.c, which creates testroot.pristine/lock.fd
and uses flock() to coordinate test execution. The lock file itself was created
successfully, but flock() failed only on the NFS-mounted test directory,
while it worked everywhere else inside QEMU.

The root cause is that the default NFS mount options used by oe-selftest implicitly
set local_lock=none, which disables local file locking on NFSv3. With this setting in
place, every flock() call on the mounted directory failed with ENOLCK (“No locks available”).

Switching the mount to use local_lock=all restores local file locking on NFS and
allows flock() to work as expected. With this change, the locking-dependent glibc
tests run successfully.

Testing results:

            before    after   diff
PASS         6943      6968    +25
XPASS           4         4      0
FAIL           66        46    -20
XFAIL          16        16      0
UNSUPPORTED   108       103     -5

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/glibc.py