To see why, we just need to modernize it.
Which is a Good Idea Anyway™.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | interdiff.txt | 4.42 KB | sun |
| #12 | file.delete-recursive.12.patch | 11.68 KB | sun |
| #7 | drupal8.file-delete-recursive.7.patch | 7.26 KB | sun |
| drupal8.file-delete-recursive.0.patch | 6.96 KB | sun |
Comments
Comment #1
sunExample test failure: https://qa.drupal.org/pifr/test/725328
Comment #3
berdirTest fail looks like this:
(Copying so that I can re-test that issue).
Comment #4
berdirThis seems to be the opposite of the old test, how so?
Comment #5
berdirRandom test failures are critical, this is happening frequently. See also #2194357: CacheArray::__destruct() invoked after test tables have been removed for the second type of new random test fails that we currently have.
Comment #6
neclimdulI'm never a fan of embedding test code into library functions. We can mitigate that concern though by changing "$chmod" to "$force" though. We don't need to expose the implementation, just that we're going to take extra steps to remove it even if it wouldn't normally be deleted.
Comment #7
sun@neclimdul: Good idea, done that.
@Berdir: Yeah, I've adjusted the test accordingly, because "deleting a file recursively" makes no whatsoever sense at all. :) The caller should already know whether it is dealing with a file or a directory.
Comment #9
sun7: drupal8.file-delete-recursive.7.patch queued for re-testing.
Comment #11
sunHrm. The test failures are permanent and are staying the same:
This means that even the
$forceflag offile_unmanaged_delete_recursive()is not able to delete the files in the test site directory.→ Typically, this just simply means CLI user != Apache user.
This would also explain why testbots are constantly running out of disk space, because run-tests.sh is simply not able to clean up all artifacts after each test run. — Every file that has been created by the separate Apache process cannot be deleted.
Comment #12
sunThis is a bit insane, but I wanted to see whether it resolves the test failures... :-)
Prepare test child site destruction via system route.
Comment #14
sunComment #15
catchHaven't seen this for a long time, is there an actual bug here?
Comment #16
sunThe errors are not visible, because
file_unmanaged_delete_recursive()+ its called functions are using @error-suppression.However, at this point, this is more of Testing system bug & File API bug than a random test failure.
Comment #17
jhedstromComment #18
mgiffordUnassigning stale issue. Hopefully someone else will pursue this.
Comment #20
jibranCan we close this now? I don't think #16 is valid now. Or is it?
Comment #28
quietone commentedThanks for opening.
Dig some digging and found this is no longer relevant, file_unmanaged_delete_recursive was deprecated in 8.7.0 in #2244513: Move the unmanaged file APIs to the file_system service (file.inc) and removed in #3062757: Remove deprecated legacy include files from Drupal 9 .