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

GMP tests for mpz_inp_str fail #1221

Open
lzcunt opened this issue Jan 14, 2025 · 0 comments · May be fixed by #1236
Open

GMP tests for mpz_inp_str fail #1221

lzcunt opened this issue Jan 14, 2025 · 0 comments · May be fixed by #1236

Comments

@lzcunt
Copy link
Contributor

lzcunt commented Jan 14, 2025

Currently, all GMP test pass except these two:

tests/mpz/io.c:

mpz_inp_str nread doesn't match ftell
  nread  5
  ftell  6
FAIL io (exit status: 134)

tests/mpz/t-inp_str.c:

mpz_inp_str nread wrong
  inp          "0"
  base         10
  pre          0
  post         1
  got_nread    1
  ftell_nread  2
FAIL t-inp_str (exit status: 134)

Seemingly there is an off-by-one somewhere that causes ftell or mpz_inp_str's read bytes to be wrong.

lzcunt added a commit to lzcunt/mlibc that referenced this issue Jan 28, 2025
This patch adds a simple test for ftell's functionality which also
acts as a simple reproducible test case for the failing GMP tests
documented in managarm#1221. This test currently fails because our behaviour
when checking ftell after a ungetc doesn't match glibc.
lzcunt added a commit to lzcunt/mlibc that referenced this issue Jan 28, 2025
This patch adds a simple test for ftell's functionality which also
acts as a simple reproducible test case for the failing GMP tests
documented in managarm#1221. This test currently fails because our behaviour
when checking ftell after a ungetc doesn't match glibc.
@lzcunt lzcunt linked a pull request Jan 28, 2025 that will close this issue
lzcunt added a commit to lzcunt/mlibc that referenced this issue Jan 28, 2025
This patch adds a simple test for ftell's functionality which also
acts as a simple reproducible test case for the failing GMP tests
documented in managarm#1221. This test currently fails because our behaviour
when checking ftell after a ungetc doesn't match glibc.
lzcunt added a commit to lzcunt/mlibc that referenced this issue Jan 28, 2025
Fixes the failing GMP tests documented in managarm#1221.
lzcunt added a commit to lzcunt/mlibc that referenced this issue Jan 28, 2025
This patch adds a simple test for ftell's functionality which also
acts as a simple reproducible test case for the failing GMP tests
documented in managarm#1221. This test used to fail because our behaviour when
checking ftell after a ungetc doesn't match glibc.
lzcunt added a commit to lzcunt/mlibc that referenced this issue Jan 28, 2025
This patch adds a simple test for ftell's functionality which also
acts as a simple reproducible test case for the failing GMP tests
documented in managarm#1221. This test used to fail because our behaviour when
checking ftell after a ungetc didn't match glibc.
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.

1 participant