Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenZFS 8858, 4580, 8929, 8868, 8860 - Correct use of grep #7053

Closed
wants to merge 1 commit into from

Conversation

dinatale2
Copy link
Contributor

@dinatale2 dinatale2 commented Jan 16, 2018

OpenZFS 8858 - /usr/bin/grep doesn't support -E option
OpenZFS 4580 - /usr/bin/grep can't handle multibyte characters
OpenZFS 8929 - tests are not delivered with system/test/utiltest
OpenZFS 8868 - tests are not delivered with system/test/utiltest
OpenZFS 8860 - Example in grep(1) is incorrect

Authored by: Alexander Pyhalov apyhalov@gmail.com
Reviewed by: Peter Tribble peter.tribble@gmail.com
Reviewed by: Toomas Soome tsoome@me.com
Reviewed by: Yuri Pankov yuripv@gmx.com
Approved by: Robert Mustacchi rm@joyent.com
Ported-by: Giuseppe Di Natale dinatale2@llnl.gov

OpenZFS-issue: https://www.illumos.org/issues/8858
OpenZFS-commit: openzfs/openzfs@d2d52addd5

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

OpenZFS 8858 - /usr/bin/grep doesn't support -E option
OpenZFS 4580 - /usr/bin/grep can't handle multibyte characters
OpenZFS 8929 - tests are not delivered with system/test/utiltest
OpenZFS 8868 - tests are not delivered with system/test/utiltest
OpenZFS 8860 - Example in grep(1) is incorrect

Authored by: Alexander Pyhalov <apyhalov@gmail.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/8858
OpenZFS-commit: openzfs/openzfs@d2d52addd5
@rlaager
Copy link
Member

rlaager commented Jan 16, 2018

This change is obviously correct. On Linux, there is no /usr/xpg4/bin/egrep.

@@ -410,7 +410,7 @@ function get_xattr #<obj>
fi

for xattr in `runat $obj ls | \
/usr/xpg4/bin/egrep -v -e SUNWattr_ro -e SUNWattr_rw` ; do
/usr/bin/egrep -v -e SUNWattr_ro -e SUNWattr_rw` ; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use grep -E instead since egrep is already technically deprecated. Yes, I realize this throws away the only part of this OpenZFS change which was applicable for Linux. It'd be reasonable to fold this change in to #7040 and then comment in the OpenZFS tracker that this change isn't applicable for Linux.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @behlendorf, let's push #7040 instead of egrep.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with folding this into #7040 if you don't mind refreshing it again.

@codecov
Copy link

codecov bot commented Jan 17, 2018

Codecov Report

Merging #7053 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #7053      +/-   ##
=========================================
- Coverage   75.41%   75.4%   -0.01%     
=========================================
  Files         296     296              
  Lines       95528   95528              
=========================================
- Hits        72043   72034       -9     
- Misses      23485   23494       +9
Flag Coverage Δ
#kernel 74.71% <ø> (-0.02%) ⬇️
#user 67.68% <ø> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d658b2c...2f9fee6. Read the comment docs.

@behlendorf
Copy link
Contributor

Closing. This fix was added to the #7040 stack and will be squashed when merged.

@behlendorf behlendorf closed this Jan 17, 2018
@dinatale2 dinatale2 deleted the autoport-oz8858 branch January 17, 2018 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants