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

tty normal normal tests fails for me on Fedora mockbuild #687

Closed
cryptomilk opened this issue Jan 14, 2024 · 4 comments · Fixed by #688
Closed

tty normal normal tests fails for me on Fedora mockbuild #687

cryptomilk opened this issue Jan 14, 2024 · 4 comments · Fixed by #688

Comments

@cryptomilk
Copy link
Contributor

cryptomilk commented Jan 14, 2024

I've tried to update the Fedora lua-luv package to the latest version but the tty normal test fails in assert(stype == uv.guess_handle(0)).

I added some debug printing:

  XXXXXX stype: tty
  XXXXXX handle(0): file
  XXXXXX handle(1): pipe
  ./tests/test-tty.lua:27: assertion failed!
  stack traceback:
    [C]: in function 'assert'
    ./tests/test-tty.lua:27: in function 'fn'
    ./lib/tap.lua:59: in function <./lib/tap.lua:48>
    [C]: in function 'xpcall'
    ./lib/tap.lua:48: in function 'run'
    ./lib/tap.lua:146: in function 'tap'
    tests/run.lua:23: in main chunk
    [C]: at 0x55e3f0db6e50
not ok 119 tty - tty normal
@cryptomilk
Copy link
Contributor Author

In the build env, the output is going to a log file. It might be that's why we are getting file.

Is there a way to skip single tests?

@Bilal2453
Copy link
Contributor

I just tested this on Fedora with my own build of Luv, the said test passes just fine, and besides:
image

Where/how are the tests running? besides renaming the test you don't want to run (for example to disabled-test-tty.lua, there isn't a way make exceptions.

@cryptomilk
Copy link
Contributor Author

It happens as part of the rpmbuild process inside of fedpkg mockbuild.

Try running the test and redirect the output (stdout, stderr) to a file):

lua tests/run.lua >/tmp/luv.log 2>&1

The problem is uv.guess_handle(0) is file then and not tty ;-)

It would be nice disable/skip only certain tests. I can comment out the test for now.

@Bilal2453
Copy link
Contributor

I see. To be fair the test does make an assumption (that standard output is a TTY) which indeed isn't always right, I wonder if it is worth removing that assumption entirely.

Implementing skipping individual tests shouldn't be hard, seems like we already skip tests that require a sufficient libuv version.

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 a pull request may close this issue.

2 participants