coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/2] rm: Strip is_empty_dir call when possible


From: Ben
Subject: Re: [PATCH 0/2] rm: Strip is_empty_dir call when possible
Date: Fri, 15 Jan 2021 08:57:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Hi,

Forgot to commit test/local.mk needed for the tests:


diff --git a/tests/local.mk b/tests/local.mk
index d3cfbcd02..ff83e0721 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -221,9 +221,11 @@ all_tests =                                        \
   tests/rm/rm1.sh                              \
   tests/touch/empty-file.sh                    \
   tests/rm/rm2.sh                              \
-  tests/rm/rm3.sh                              \
+  tests/rm/rm3a.sh                             \
+  tests/rm/rm3b.sh                             \
   tests/rm/rm4.sh                              \
-  tests/rm/rm5.sh                              \
+  tests/rm/rm5a.sh                             \
+  tests/rm/rm5b.sh                             \
   tests/rm/sunos-1.sh                          \
   tests/rm/unread2.sh                          \
   tests/rm/unread3.sh                          \


On 14-01-2021 15:33, Ben wrote:
> Hi,
> 
> I was looking into optimizing rm, I saw that it always
> checked is_empty_dir in prompt, which can be skipped.
> 
> The first patch, fixes a minimal issue, the test relied
> on the readdir in prompt, which it shouldn't.
> 
> Instead of fixing tests/rm/rm3.sh and tests/rm/rm5.sh,
> I have thought about adding x->interactive as a flag to
> the skip_check test, but I don't think the interactive
> flag should interfere with behavior in that way.
> 
> But as the current change *does* change behavior,
> I leave it up to you to decide.
> 
> 
> Thank you,
> 
> Ben Wijen (2):
>   rm: Fix readdir test
>   rm: Skip is_empty_dir in prompt
> 
>  src/remove.c                 | 7 +++++--
>  tests/rm/rm-readdir-fail.sh  | 4 ++--
>  tests/rm/{rm3.sh => rm3a.sh} | 2 +-
>  tests/rm/{rm3.sh => rm3b.sh} | 4 ++++
>  tests/rm/{rm5.sh => rm5a.sh} | 2 +-
>  tests/rm/{rm5.sh => rm5b.sh} | 2 ++
>  6 files changed, 15 insertions(+), 6 deletions(-)
>  copy tests/rm/{rm3.sh => rm3a.sh} (98%)
>  rename tests/rm/{rm3.sh => rm3b.sh} (95%)
>  copy tests/rm/{rm5.sh => rm5a.sh} (97%)
>  rename tests/rm/{rm5.sh => rm5b.sh} (97%)
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]