Conditional expression incompatible with GNU if statement #4

Closed
opened 2 years ago by Ghost · 4 comments
Ghost commented 2 years ago

The ZFS test suite in OpenZFS uses the following statement in a math library function:

echo "if ($x > $y) 1" | bc

Tests using that function started failing when FreeBSD switched from the GNU bc to this one:

$ echo "if (1 > 3) 1" | bc

Parse error: block end cannot be found
    <stdin>:2

I've updated the test suite to use if ($x > $y) 1 else 0 which is compatible with both, but in the interest of avoiding (or documenting) future compatibility issues I'm reporting this to you anyway :)

The ZFS test suite in OpenZFS uses the following statement in a math library function: ``` echo "if ($x > $y) 1" | bc ``` Tests using that function started failing when FreeBSD switched from the GNU bc to this one: ``` $ echo "if (1 > 3) 1" | bc Parse error: block end cannot be found <stdin>:2 ``` I've updated the test suite to use `if ($x > $y) 1 else 0` which is compatible with both, but in the interest of avoiding (or documenting) future compatibility issues I'm reporting this to you anyway :)
Owner

Oh...yeah, that's a bug. Thank you for letting me know.

I will get working on a fix and should hopefully have one out soon.

Oh...yeah, that's a bug. Thank you for letting me know. I will get working on a fix and should hopefully have one out soon.
Owner

I have found the bug and the fix. I will release a new version when I get home and advise the FreeBSD maintainer that I have released a fix.

I will close this then.

I have found the bug and the fix. I will release a new version when I get home and advise the FreeBSD maintainer that I have released a fix. I will close this then.
Owner

This has now been fixed and released as 3.1.3. The FreeBSD maintainer has also been notified.

Thank you for the report. I think I can close this now, but feel free to reopen if the problem rears its head again.

This has now been fixed and released as `3.1.3`. The FreeBSD maintainer has also been notified. Thank you for the report. I think I can close this now, but feel free to reopen if the problem rears its head again.
gavin closed this issue 2 years ago
Poster

Awesome, thank you!

Awesome, thank you!
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.