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

Vips::SourceCustom test failure in Debian #351

Open
lucaskanashiro opened this issue Dec 15, 2022 · 3 comments
Open

Vips::SourceCustom test failure in Debian #351

lucaskanashiro opened this issue Dec 15, 2022 · 3 comments
Labels

Comments

@lucaskanashiro
Copy link

Describe the bug
When running tests of version 2.1.4 in Debian we get the following failure:

  1) Vips::SourceCustom can write an image to a user output stream
     Failure/Error: expect(image.avg).to be_within(0.001).of(109.789)
       expected 109.41407425505706 to be within 0.001 of 109.789

This happens all the time, which makes me think if the range (0.001) is indeed correct.

To Reproduce
Steps to reproduce the behavior:

  1. Grab the debian package for ruby-vips version 2.1.4 (latest version)
  2. Try to build it.

I believe if you simple try to run tests in Debian unstable you will get the same failure. Currently the default is ruby 3.1.

Expected behavior
All tests pass.

Desktop (please complete the following information):

  • OS: Debian
  • Version: unstable (sid)
@jcupitt
Copy link
Member

jcupitt commented Dec 16, 2022

Hi @lucaskanashiro, you're right, it fails on current Ubuntu as well, I wonder what changed.

I'll have a look, thanks for the report.

jcupitt added a commit to libvips/libvips that referenced this issue Dec 16, 2022
In 8.13 we deprecated target_finish() (it did not have an error return)
to target_end() (now has an error return).

This PR makes target_end() also emit the "finish" signal for
compatibility with the previous API. ruby-vips, for example, looks for
on_finish() to close files.

See libvips/ruby-vips#351

Thanks lucaskanashiro
@jcupitt
Copy link
Member

jcupitt commented Dec 16, 2022

Oooof, it's actually a libvips bug, I've fixed it in 8.13 and in master, so ruby-vips now passes when built against the latest libvips.

ruby-vips will need a workaround when testing with libvips 8.13. I'll try to find one that's not too ugly.

jcupitt added a commit that referenced this issue Dec 16, 2022
Due to a libvips bug, we need to close in line with targetcustom output.

see #351
@jcupitt
Copy link
Member

jcupitt commented Dec 16, 2022

Ugh, not very pretty but git master ruby-vips has a workaround. Would you be able to test? Any suggestions for a less ugly test would be very welcome too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants