[Top][All Lists]

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

[patch #10239] add two tests about find and xargs

From: Bernhard Voelker
Subject: [patch #10239] add two tests about find and xargs
Date: Mon, 4 Jul 2022 17:48:58 -0400 (EDT)

Update of patch #10239 (project findutils):

                  Status:                    None => In Progress            
             Assigned to:                    None => berny                  


Follow-up Comment #1:

Thanks for the patch - highly appreciated.

First of all, GNU findutils as a GNU project requires copyright assignment
to the Free Software Foundation from contributors of non-trivial patches.
As such, we'd need to get this paperwork done before accepting the patch.
Are you willing to do this?

Re. the patch content: it needs some massage before applying.

First of all, we want to have clean patches; 'git apply-mail' complains:

$ git am ~/Downloads/0001-testcodes-about-find-and-xargs.patch 
Applying: tests: add tests about find -newer.. and xargs -d with escapechars
Add two tests, one test is about find -anewer, -cnewer and newerXY, the other
is about xargs -d delim , the delim is a escape character, like \a,\n.
.git/rebase-apply/patch:73: trailing whitespace.
# Test xargs -d delim with escapechars. like \a , \b, \f , \n , \r, \t ,\v ,
warning: 1 line adds whitespace errors.

Next, a patch should concentrate on one topic only.
In this case, there's no relation between the 'find -newer' tests and the
xargs tests.
Therefore, I'd like to split into 2 commits.

Let's concentrate on the 'find -newer' tests first.

+for d in 1 2 3; do
+    touch filetest$d \
+        && sleep 1s \
+        || skip_ "creating files with different timestamp failed"

sleep(1) makes the tests unnecessarily slow, but as `touch -t` doesn't set
the ctime of the created file to the given timestamp, I think we have to
go with sleep(1) for now.
At least, we can save the last 'sleep 1', because that's not needed.

The list of options to check can be expanded.  I added some more
options, e.g. -newer -neweram -neweraa -newercc, and tests
with reference timestamps: -newerat -newerct -newermt.

Furthermore, I have adjusted the naming of variables and the test filename
a bit, including the indentation of the file (2-char indentation is

Finally, test shell scripts should be executable: --> chmod +x.

The attached shows the new version of the 'find -newer' tests.
BTW: wouldn't you prefer to have your real name there?

Again, the patch can only be accepted with proper Copyright assignment
in place;  this needs to be solved first.

Thanks & have a nice day,

(file #53394)


Additional Item Attachment:

File name: 0001-tests-add-tests-for-the-find-newer-family.patch Size:3 KB


Reply to this item at:


Message sent via Savannah

reply via email to

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