Skip to content

pmb: fix test suite not running through twice

Oliver Smith requested to merge fix/run-testsuite-twice-fails into master

The test suite needed a pmbootstrap shutdown after running through, before it could successfully run again.

Explanation:

This was caused by test/test_pkgrel_bump.py, which creates a temporary work folder with every subfolder ("chroot_native", "cache_apk_x86_64", ...) linked to the original work folder except for the "packages" folder. At the end of the test case, pmbootstrap shutdown gets executed and is expected to umount everything as usual. But it does not umount anything because of the symlinks, so work/chroot_native/mnt/pmbootstrap-packages points to the fake packages folder of that test case, even after it is finished.

As a result, any test case that tries to access the packages folder in the native chroot, will fail until pmbootstrap shutdown gets called.

Detailed Changes:

  • Umount all folders inside the work folder, even if these are symlinks
  • Remove obsolete reference to "disable timestamp based rebuilds" in a comment in test/test_pkgrel_bump.py
  • Run pmbootstrap work_migrate and pmbootstrap shutdown at the beginning of test/testcases_fast.sh, in case the pkgrel_bump test case was aborted before it could properly shutdown and to make it more robust in general (user may have changed the mountpoints, work folder may need to be migrated)

How to Test:

Run test/testcase_fast.sh twice in a row. Without this merge request, it fails in the second run.

Fixes #1595 (closed).

Merge request reports