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

asciiquarium: fix test logic #70297

Closed
wants to merge 2 commits into from
Closed

Conversation

iMichka
Copy link
Member

@iMichka iMichka commented Feb 3, 2021

  • The stdin/sdtout variable names were inverted

  • Fixes: Errno::EIO: Input/output error @ io_fread - /dev/pts/2 on linux

  • Have you followed the guidelines for contributing?

  • Have you checked that there aren't other open pull requests for the same formula update/change?

  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?

  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?

  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?


@iMichka iMichka added the linux to homebrew-core Migration of linuxbrew-core to homebrew-core label Feb 3, 2021
@BrewTestBot BrewTestBot added deprecated license Formula uses a deprecated SPDX license which should be updated perl Perl use is a significant feature of the PR or issue labels Feb 3, 2021
@BrewTestBot BrewTestBot removed the deprecated license Formula uses a deprecated SPDX license which should be updated label Feb 3, 2021
@iMichka
Copy link
Member Author

iMichka commented Feb 10, 2021

@homebrew/core I need help with PTY.spawn, does anyone have experience with this? It's not working correctly on 11.0 and 10.15. Can someone test the output there?

@carlocab
Copy link
Member

I think it's broken:

❯ asciiquarium
[1]    22509 segmentation fault  asciiquarium

@carlocab
Copy link
Member

carlocab commented Feb 10, 2021

asciiquarium is an env wrapper for a perl script. So here's what I tried:

❯ perl /usr/local/Cellar/asciiquarium/1.1_1/libexec/bin/asciiquarium
Can't locate Term/Animation.pm in @INC (you may need to install the Term::Animation module) (@INC contains: /usr/local/Cellar/perl/5.32.1/lib/perl5/site_perl/5.32.1/darwin-thread-multi-2level /usr/local/Cellar/perl/5.32.1/lib/perl5/site_perl/5.32.1 /usr/local/Cellar/perl/5.32.1/lib/perl5/5.32.1/darwin-thread-multi-2level /usr/local/Cellar/perl/5.32.1/lib/perl5/5.32.1 /usr/local/lib/perl5/site_perl/5.32.1) at /usr/local/Cellar/asciiquarium/1.1_1/libexec/bin/asciiquarium line 42.
BEGIN failed--compilation aborted at /usr/local/Cellar/asciiquarium/1.1_1/libexec/bin/asciiquarium line 42.

That said, I don't know perl, so that may not have even been the right thing to do. Same error if I use /usr/bin/perl.

Ah, wait, no:

❯ export PERL5LIB="/usr/local/Cellar/asciiquarium/1.1_1/libexec/lib/perl5"
❯ /usr/bin/perl /usr/local/Cellar/asciiquarium/1.1_1/libexec/bin/asciiquarium
[1]    23421 segmentation fault  /usr/bin/perl /usr/local/Cellar/asciiquarium/1.1_1/libexec/bin/asciiquarium

@iMichka
Copy link
Member Author

iMichka commented Feb 10, 2021

I think I know what to do, I need to vendor that library. W do that with other perl formulae. Let me try that.

EDIT: actually it's already vendored.

@carlocab
Copy link
Member

If I stick it in lldb:

❯ lldb /usr/bin/perl
(lldb) target create "/usr/bin/perl"
Current executable set to '/usr/bin/perl' (x86_64).
(lldb) env PERL5LIB="/usr/local/Cellar/asciiquarium/1.1_1/libexec/lib/perl5"
(lldb) run /usr/local/Cellar/asciiquarium/1.1_1/libexec/bin/asciiquarium
error: process exited with status -1 (attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries when the attached failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))

Console log:
crash.tar.gz

@mitchblank
Copy link
Contributor

@iMichka / @carlocab -- you might take a look at my previous attempt to fix this formula: #66485

I had it working on my 11.0 box but had issues getting CI to pass. Ultimately the PR never got merged. Maybe you fixed the test issue now and just need to integrate those other fixes?

@iMichka iMichka force-pushed the asciiquarium branch 6 times, most recently from 3977268 to fa14c17 Compare March 2, 2021 17:24
@iMichka
Copy link
Member Author

iMichka commented Mar 10, 2021

@mitchblank I added your workaround but it still does not work. At this point I think I will disable the formulae for the broken macOS versions.

@iMichka iMichka added the help wanted Task(s) needing PRs from the community or maintainers label Mar 10, 2021
@mitchblank
Copy link
Contributor

It's a bit unfortunate since the package itself seems to build/run/test fine locally for me (at least after the changes I made) . Shame that the CI system has some problem with some formulae these days...

Or are you seeing the same failure that @carlocab was? On which OS?

@carlocab carlocab mentioned this pull request Mar 16, 2021
1 task
- The stdin/sdtout variable names were inverted
- Fixes: Errno::EIO: Input/output error @ io_fread - /dev/pts/2 on linux

Also fix the license

Use system perl and ncurses, update resource
@nandahkrishna nandahkrishna force-pushed the asciiquarium branch 2 times, most recently from 32e9524 to 668fc44 Compare April 14, 2021 00:25
@nandahkrishna
Copy link
Member

nandahkrishna commented Apr 14, 2021

@iMichka could you check if this is alright? Just took a shot with a very minor tweak and it seems to have worked.

@carlocab
Copy link
Member

I think @iMichka will be happy to take any fix here. 😄

Formula/asciiquarium.rb Outdated Show resolved Hide resolved
Formula/asciiquarium.rb Outdated Show resolved Hide resolved
  - Minor modification to the test.
  - Use `rewrite_shebang`.
  - Bump revision.
@nandahkrishna nandahkrishna removed the help wanted Task(s) needing PRs from the community or maintainers label Apr 14, 2021
@iMichka
Copy link
Member Author

iMichka commented Apr 14, 2021

Nice work. So it just missed a "q" to quit the process. People will be happy to get the fishes back on their screens :)

@nandahkrishna nandahkrishna added the ready to merge PR can be merged once CI is green label Apr 14, 2021
@BrewTestBot
Copy link
Member

:shipit: @iMichka has triggered a merge.

@iMichka iMichka deleted the asciiquarium branch April 14, 2021 11:14
@github-actions github-actions bot added the outdated PR was locked due to age label May 14, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linux to homebrew-core Migration of linuxbrew-core to homebrew-core outdated PR was locked due to age perl Perl use is a significant feature of the PR or issue ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants