coreutils
coreutils copied to clipboard
rm: add support for removing empty dir with invalid permissions
add support for removing inaccessible/unreadable empty directories on unix platforms
I had to refactor handle_dir
because it was becoming unreadable and it fixed other GNU tests where we previously had to alter its output.
~~I don't think the last 2 fails are regressions according to #2949, but can someone confirm?~~
also partially fixes tests/rm/empty-inacc.sh
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
GNU test failed: tests/misc/pwd-long. tests/misc/pwd-long is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/cycle. tests/rm/cycle is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/deep-2. tests/rm/deep-2 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/fail-eacces. tests/rm/fail-eacces is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/rm2. tests/rm/rm2 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/unread2. tests/rm/unread2 is passing on 'main'. Maybe you have to rebase?
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
GNU test failed: tests/misc/pwd-long. tests/misc/pwd-long is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/cycle. tests/rm/cycle is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/deep-2. tests/rm/deep-2 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/fail-eacces. tests/rm/fail-eacces is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/rm2. tests/rm/rm2 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/unread2. tests/rm/unread2 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
Congrats! The gnu test tests/rm/rm1 is no longer failing!
Congrats! The gnu test tests/rm/unreadable is no longer failing!
Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!
GNU test failed: tests/misc/pwd-long. tests/misc/pwd-long is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/deep-2. tests/rm/deep-2 is passing on 'main'. Maybe you have to rebase?
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
Congrats! The gnu test tests/rm/rm1 is no longer failing!
Congrats! The gnu test tests/rm/unreadable is no longer failing!
GNU test failed: tests/misc/pwd-long. tests/misc/pwd-long is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/deep-2. tests/rm/deep-2 is passing on 'main'. Maybe you have to rebase?
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
Congrats! The gnu test tests/rm/rm1 is no longer failing!
Congrats! The gnu test tests/rm/unreadable is no longer failing!
GNU test failed: tests/misc/pwd-long. tests/misc/pwd-long is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/deep-2. tests/rm/deep-2 is passing on 'main'. Maybe you have to rebase?
both tests/misc/pwd-long & tests/rm/deep-2 were passing. Could you please have a look? thanks
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
Congrats! The gnu test tests/rm/rm1 is no longer failing!
Congrats! The gnu test tests/rm/unreadable is no longer failing!
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
Congrats! The gnu test tests/rm/rm1 is no longer failing!
Congrats! The gnu test tests/rm/unreadable is no longer failing!
resolves #3722
sorry we didn't merge this yet. I tried to rebase it, let's see if it works
GNU testsuite comparison:
Congrats! The gnu test tests/rm/rm2 is no longer failing!
Congrats! The gnu test tests/rm/unreadable is no longer failing!
GNU test failed: tests/rm/d-3. tests/rm/d-3 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/rm3. tests/rm/rm3 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/rm5. tests/rm/rm5 is passing on 'main'. Maybe you have to rebase?
We will need to fix the last three
GNU testsuite comparison:
Congrats! The gnu test tests/rm/ir-1 is no longer failing!
Congrats! The gnu test tests/rm/rm2 is no longer failing!
Congrats! The gnu test tests/rm/unreadable is no longer failing!
@sylvestre resolved, the lint error is fixed by #5360
Oh I forgot about this PR while writing https://github.com/uutils/coreutils/pull/5344, we're definitely gonna have some difficult merge conflicts between those two. I'll probably rebase mine on top of yours, but I'll look at this PR some more first to see how much we can port over.
An alternative solution is that I take what you've done here and implement it on my branch (with credit in git of course).
@tertsdiepraam you might need to update this one too :)