patchfindutils - Patches: patch #10239, add two tests about find and xargs

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10239: add two tests about find and xargs

Submitter:  Shuiqing Zhou <zhoushuiqing>
Submitted:  Thu 23 Jun 2022 07:38:56 AM UTC
 
Category:  None Priority:  5 - Normal
Status:  In Progress Privacy:  Public
Assigned to:  berny Originator Name: 
Open/Closed:  Open Release:  None
Fixed Release:  None

Tue 09 Aug 2022 10:10:06 PM UTC, comment #5: 

Thanks, pushed at
https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=3c2d824ef5467c5b2adc711c175b74237b3cd018

with this fix for a typo found by `make syntax-check`:

-  rm -f out || framework_failure
+  rm -f out || framework_failure_

Bernhard Voelker <berny>
Project Administrator
Tue 09 Aug 2022 01:19:48 AM UTC, comment #4: 

Sorry for the inconvenience caused to you.
name: Shuiqing Zhou
email: -email is unavailable-

Shuiqing Zhou <zhoushuiqing>
Mon 08 Aug 2022 09:08:43 PM UTC, comment #3: 

Sorry regarding the question about the real name.
Somehow I was expecting at least 2 parts like a first and a last name,
but apparently this is not the case in all countries/languages.

I discussed with the other maintainers, and we agreed that this
patch can be accepted without formal Copyright Assignment to the
FSF being in place yet.  As I massaged it a bit, I'll add a
"Co-authored-by:" line with my name to reflect the origin of
the patch a bit better.
Of course, we'd appreciate if you would go for that assignment procedure
with the FSF legal clerk for further and larger contributions.
We can assist.

Before I push the patch, I'd like to clarify the author value once more:
in your initial patch, you used the email address ending on "outlook.com"
while your Savannah email address points to a huawei email address.
Which one should I take?  Assuming that you did that work
in your private time ... is it the outlook.com address?

Bernhard Voelker <berny>
Project Administrator
Fri 05 Aug 2022 09:04:26 AM UTC, comment #2: 

I am very sorry for the late reply.
Yes, I'm willing to add Copyright assignment. And thank you very much for accepting this patch.
My real name is zhoushuiqing, but it's a Chinese-style name. hahah...;-)

Shuiqing Zhou <zhoushuiqing>
Mon 04 Jul 2022 09:48:58 PM UTC, 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"
+done

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 preferred).

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,
Berny

(file #53394)

Bernhard Voelker <berny>
Project Administrator
Thu 23 Jun 2022 07:38:56 AM UTC, original submission:  

I counted the code coverage of findutils, some codes were not covered, so I added two test cases to test.
One is about find -anewer, -cnewer, -newerXY, I created three files with different timestamp, and watched the find program find the results.
The other is about xargs -d delim, the delimiter may be an escape character. I found no test cases to test this aspect.
Looking forward to your reply

Shuiqing Zhou <zhoushuiqing>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #53394:  0001-tests-add-tests-for-the-find-newer-family.patch added by berny (3KiB - text/x-patch - [PATCH] tests: add tests for the 'find -newer' family)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by berny (Updated the item)
  • -email is unavailable- added by zhoushuiqing (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-04 berny Attached File- Added 0001-tests-add-tests-for-the-find-newer-family.patch, #53394
        StatusNone In Progress
        Assigned toNone berny
    2022-06-23 zhoushuiqing Attached File- Added 0001-testcodes-about-find-and-xargs.patch, #53357

    Back to the top


    Powered by Savane 3.9