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

fix #7341: constrain tell() return value to [0,filesize] #7360

Merged
merged 3 commits into from
May 31, 2018

Conversation

mbargull
Copy link
Member

@mbargull mbargull commented May 31, 2018

fix #7341

I think that error being thrown essentially means that a fileobj.tell() (with fileobj being an io.BufferedReader created by open(..., 'rb')) can return negative values!? That's a really strange thing...
I'll submit a PR that constrains the values we use to

0 <= v <= max(1, fstat(fileobj.fileno()).st_size)

@mbargull mbargull requested a review from a team as a code owner May 31, 2018 17:14
Copy link
Contributor

@kalefranz kalefranz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Not sure what the status of tests are in the 4.5.x branch currently. Just coming back from a week of vacation. Might push directly to this branch to clean up test failures if we have any.

@mbargull
Copy link
Member Author

Not sure what the status of tests are in the 4.5.x branch currently.

Haven't been very active myself here lately, so can't tell either.

Just coming back from a week of vacation.

🏖️ 👍

Might push directly to this branch to clean up test failures if we have any.

Yes, feel free to do so!

@kalefranz
Copy link
Contributor

I guess we added gawk to the repo for unix platforms. That's the reason for the current failure. I'll refactor that test.

Signed-off-by: Kale Franz <kfranz@continuum.io>
@mbargull
Copy link
Member Author

Restarted py27 main tests. That one failed with the occasional

___________ ShellWrapperIntegrationTests.test_bash_basic_integration ___________
Traceback (most recent call last):
  File "/home/circleci/conda/tests/test_activate.py", line 1117, in test_bash_basic_integration
    self.basic_posix(shell)
  File "/home/circleci/conda/tests/test_activate.py", line 1092, in basic_posix
    shell.expect('Executing transaction: ...working... done.*\n', timeout=25)
  File "/home/circleci/conda/tests/test_activate.py", line 1034, in expect
    return self.p.expect(pattern, timeout, searchwindowsize, async)
  File "/opt/conda/lib/python2.7/site-packages/pexpect/spawnbase.py", line 327, in expect
    timeout, searchwindowsize, async_)
  File "/opt/conda/lib/python2.7/site-packages/pexpect/spawnbase.py", line 355, in expect_list
    return exp.expect_loop(timeout)
  File "/opt/conda/lib/python2.7/site-packages/pexpect/expect.py", line 106, in expect_loop
    return self.timeout(e)
  File "/opt/conda/lib/python2.7/site-packages/pexpect/expect.py", line 70, in timeout
    raise TIMEOUT(msg)
TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7fb79aef98d0>
searcher: searcher_re:
    0: re.compile("Executing transaction: ...working... done.*
")

we are getting from time to time.

Signed-off-by: Kale Franz <kfranz@continuum.io>
@kalefranz
Copy link
Contributor

I think that timeout=35 value is already in master. Might as well be in 4.5.x too.

@kalefranz kalefranz merged commit 0ce8cca into conda:4.5.x May 31, 2018
@kalefranz kalefranz added this to the 4.5.5 milestone Jun 29, 2018
@github-actions
Copy link

github-actions bot commented Sep 2, 2021

Hi there, thank you for your contribution to Conda!

This pull request has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue or pull request if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 2, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants