Package: vlock Version: 2.2.2-14 Severity: minor X-Debbugs-Cc: [email protected]
Dear Maintainer, Makefile linking error – `vlock-test` fails to link because `-lcunit` is placed in `LDFLAGS` instead of `LDLIBS`. Bad designed unit test – `test_wait_for_death` in `tests/test_process.c` relies on timing that is platform‑dependent, causing failures on slower systems (e.g., Banana Pi 5). * What led up to the situation? - The project’s test suite was executed on a new target platform (Banana Pi 5). - The build failed because the `vlock-test` target could not link against the CUnit library - the linker reported unresolved symbols. - After fixing the linking, the test suite ran but `test_wait_for_death` consistently failed on the Banana Pi 5, although it had passed on faster x86 development machines. * What exactly did you do (or not do) that was effective (or ineffective)? - Ineffective: I initially kept `-lcunit` in `LDFLAGS`, thinking the flag order was the only problem. I tried rearranging the link line manually, but the library still wasn’t pulled in correctly because `LDFLAGS` is processed too early in the build recipe. - Effective: I moved `-lcunit` from `LDFLAGS` to `LDLIBS` (using `override LDLIBS += -lcunit`). - Ineffective: I attempted to adjust the sleep values (e.g., increasing 2000 ms to 5000 ms) to accommodate slower hardware. This did work, but does not guarantt reliable test passing on all paltforms. - Effective: I replaced the external command `/bin/true` with a controlled child process that explicitly `sleep` before exiting. This makes the test’s independent of platform speed. * What was the outcome of this action? - After the Makefile fix, the `vlock-test` binary compiled and linked without errors. - After the test fix, `test_wait_for_death` now passes reliably on all platforms, we tested: fast x86, slower ARM (Banana Pi 5). * What outcome did you expect instead? - For the build, I expected the `vlock-test` target to link cleanly against CUnit without manual intervention. Using `LDLIBS` is the standard practice, so the fix aligns with expected Makefile behaviour. - For the test, I expected a unit test to be deterministic and portable - it should pass or fail based on the logic of `wait_for_death`, not on the OS scheduler or the execution speed of an external binary. -- System Information: Debian Release: forky/sid APT prefers resolute-updates APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 7.0.0-27-generic (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages vlock depends on: ii adduser 3.153ubuntu1 ii libc6 2.43-2ubuntu2 ii libpam-modules 1.7.0-5ubuntu3 ii libpam0g 1.7.0-5ubuntu3 vlock recommends no packages. vlock suggests no packages.

