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

ZTS: Remove non-standard awk hex numbers usage #16892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amotin
Copy link
Member

@amotin amotin commented Dec 20, 2024

FreeBSD recently removed non-standard hex numbers support from awk. Neither it supports -n argument, enabling it in gawk. Instead of depending on those rewrite list_file_blocks() function to handle the hex math in shell instead of awk.

Fixes #11141

How Has This Been Tested?

Called the function manually and saw it returning some numbers instead of constant 4MB offset and zero length.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

FreeBSD recently removed non-standard hex numbers support from awk.
Neither it supports -n argument, enabling it in gawk.  Instead of
depending on those rewrite list_file_blocks() fuction to handle the
hex math in shell instead of awk.

Signed-off-by:	Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
@amotin
Copy link
Member Author

amotin commented Dec 23, 2024

Looking on remaining failures I was able to reproduce one in rsend/recv_dedup_encrypted_zvol. It seems to be a diff regression in FreeBSD 15. The diff binary from FreeBSD 14 shows no problem, so it seems not a ZFS issue. I've sent email to possibly related developer.

PS: Fixed in FreeBSD by https://cgit.freebsd.org/src/commit/?id=893839b119880d3fe8ab18aba4563af6c80cb875 . I have suspicion that it might fix cli_root/zfs_diff/zfs_diff_mangle also, but I am not sure the test is fully correct there either, since it seems to rely on the assumption that diff won't ever exit early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Code Review Needed Ready for review and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants