Skip to content

tests/extmod/vfs_fat_ramdisk.py: Fix tests failing on appveyor due to missing uerrno - #2399

Closed
deshipu wants to merge 1 commit into
micropython:masterfrom
deshipu:uerrno-fail
Closed

tests/extmod/vfs_fat_ramdisk.py: Fix tests failing on appveyor due to missing uerrno#2399
deshipu wants to merge 1 commit into
micropython:masterfrom
deshipu:uerrno-fail

Conversation

@deshipu

@deshipu deshipu commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@deshipu deshipu changed the title Fix tests failing on appveyor due to missing uerrno tests/extmod/vfs_fat_ramdisk.py: Fix tests failing on appveyor due to missing uerrno Sep 6, 2016
@deshipu

deshipu commented Sep 6, 2016

Copy link
Copy Markdown
Contributor Author

Appveyor fixed, but Travis died (I think it's unrelated to this change, though).

@dpgeorge

dpgeorge commented Sep 7, 2016

Copy link
Copy Markdown
Member

I would rather enable uerrno on windows build, that should be as simple as adding #define MICROPY_PY_UERRNO (1) to windows/mpconfig.h...

@deshipu

deshipu commented Sep 7, 2016

Copy link
Copy Markdown
Contributor Author

That indeed seems like a much saner approach, thanks for pointing it out.

@deshipu

deshipu commented Sep 7, 2016

Copy link
Copy Markdown
Contributor Author

Now this time Travis's failure seems legit https://travis-ci.org/micropython/micropython/builds/158131161#L3669-L3679

../py/moduerrno.c:63: error: ‘EOPNOTSUPP’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘EADDRINUSE’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘ECONNABORTED’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘ECONNRESET’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘ENOBUFS’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘ENOTCONN’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘ETIMEDOUT’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘ECONNREFUSED’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘EHOSTUNREACH’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘EALREADY’ undeclared here (not in a function)
../py/moduerrno.c:63: error: ‘EINPROGRESS’ undeclared here (not in a function)

I guess we need some additional #include on Windows?

@deshipu

deshipu commented Sep 7, 2016

Copy link
Copy Markdown
Contributor Author

Or we could move the ERRNO_LIST out of moduerror.c and into the individual mpconfigport.h files, and just skip those constants on Windows?

@deshipu

deshipu commented Sep 7, 2016

Copy link
Copy Markdown
Contributor Author

So I removed the troublesome constants from the Windows build for now. Perhaps they can be found in one of the header files specific to Windows, but I have no way to test that. I guess they could be added when they become needed.

@dpgeorge

dpgeorge commented Sep 8, 2016

Copy link
Copy Markdown
Member

Although there is a comment in moduerrno.c about putting ERROR_LIST in mpconfigport.h, I think it would be good to keep the centralised list in moduerrno.c to prevent too much difference across ports.

The windows port does build and pass all other tests so fixing this is not critical for release. Let's wait for @stinos to comment and/or provide a neater solution.

stinos added a commit to stinos/micropython that referenced this pull request Sep 9, 2016
This is actually long overdue: the README in the windows directory has been
updated once to indicate mingw32 is abandoned and not ok to use with uPy,
but we forgot travis builds were still using it.
As a bonus the travis build will succeed again since moduerrno.c now compiles.
(see micropython#2399)
@stinos

stinos commented Sep 9, 2016

Copy link
Copy Markdown
Contributor

Problem is for the mingw cross-compiler only: it builds fine with mingw here (which has EOPNOTSUPP and the others in errno.h, as it should be). looking into this I figured the real problem is travis uses mingw32 which is afaik abandoned and broken. See #2409 for a fix.

@deshipu deshipu closed this Sep 9, 2016
@deshipu
deshipu deleted the uerrno-fail branch September 9, 2016 14:34
dpgeorge pushed a commit that referenced this pull request Sep 10, 2016
This is actually long overdue: the README in the windows directory has been
updated once to indicate mingw32 is abandoned and not ok to use with uPy,
but we forgot travis builds were still using it.
As a bonus the travis build will succeed again since moduerrno.c now compiles.
(see #2399)
MarkR42 pushed a commit to MarkR42/micropython that referenced this pull request Oct 13, 2016
This is actually long overdue: the README in the windows directory has been
updated once to indicate mingw32 is abandoned and not ok to use with uPy,
but we forgot travis builds were still using it.
As a bonus the travis build will succeed again since moduerrno.c now compiles.
(see micropython#2399)
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 this pull request may close these issues.

3 participants