Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81462

Regression in backup unit tests (affecting windows)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.4
    • 4.4
    • Unit tests
    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • Hide

      Given specific windows tests (see comments below) have passed, let's put this into automated CiBoT tests.

      • Verify that there aren't regressions @ CIs caused by this.
      Show
      Given specific windows tests (see comments below) have passed, let's put this into automated CiBoT tests. Verify that there aren't regressions @ CIs caused by this.

      Detected while advancing with the Moodle 4.4 release testing matrix.

      Since few weeks ago, there are a bunch of unit tests, backup related, failing under windows.

      To reproduce it just run, with Windows, the --testsuite core_backup_testsuite tests.

      Failures are as follow (only first failures added):

      6) core_backup\backup_stepslib_test::test_backup_section_structure_step
      rmdir(moodledata\integration_phpunit/temp/backup): Directory not empty
       
      integration\lib\moodlelib.php:9690
      integration\lib\moodlelib.php:9679
      integration\lib\testing\classes\util.php:719
      ntegration\lib\phpunit\classes\util.php:283
      integration\lib\phpunit\classes\advanced_testcase.php:511
      integration\lib\phpunit\classes\advanced_testcase.php:102
       
      7) core_backup\backup_xml_transformer_test::test_filephp_links_replace with data set #0 ('http://test.test/', 'http://test.test/')
      unlink(moodledata\integration_phpunit/temp/backup/e8060b3ac6850f45c26842d15da1bf25.log): Permission denied
       
      integration\lib\moodlelib.php:9681
      integration\lib\moodlelib.php:9679
      integration\lib\testing\
      ...
      ...
      

      Here there is a complete Windows run (that also has other, unrelated, failures): https://gist.github.com/stronk7/af199881313f3a25fbddef5536f697cc

      Bisecting between e567c21d6edb902e652fcbf1aaf4a49a82579f84 (good) and 38a3310c9272edfbac77ee4a8527e7838642072e (bad), has pointed to:

      15eda1d56a83f636fdb7b83f8ee49c874ba861ab is the first bad commit
      commit 15eda1d56a83f636fdb7b83f8ee49c874ba861ab
      Author: Ferran Recio <ferran@moodle.com>
      Date:   Tue Jan 30 11:29:21 2024 +0100
       
          MDL-80553 backup: fix section backup step phpunit
       
       backup/moodle2/tests/backup_stepslib_test.php | 28 ++++++++++++++++++++++++++-
       1 file changed, 27 insertions(+), 1 deletion(-)
      

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Simey Lameze Simey Lameze
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 40 minutes
                3h 40m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.