<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/tests/net_inet, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>tests: Use .errno instead of .args[0] for OSError exceptions.</title>
<updated>2021-04-23T12:03:46+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-22T09:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=3123f6918ba18b0a3f7a89500b450f4cb15e1aee'/>
<id>3123f6918ba18b0a3f7a89500b450f4cb15e1aee</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/net_inet: Add 'Strict-Transport-Security' to exp file.</title>
<updated>2021-04-18T13:20:26+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-18T13:20:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=7d911d20698b3b11269f34ecec97d3b4bfabac94'/>
<id>7d911d20698b3b11269f34ecec97d3b4bfabac94</id>
<content type='text'>
Because micropython.org now adds this to the headers.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because micropython.org now adds this to the headers.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Rename run-tests to run-tests.py for consistency.</title>
<updated>2021-03-12T08:56:09+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-03-11T05:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=6129b8e401c36cc68e0f7ba8180da27a40d17621'/>
<id>6129b8e401c36cc68e0f7ba8180da27a40d17621</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/modussl: Fix ussl read/recv/send/write errors when non-blocking.</title>
<updated>2021-02-17T00:50:54+00:00</updated>
<author>
<name>Thorsten von Eicken</name>
</author>
<published>2020-04-02T17:01:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=2c1299b0071c2c528cc01e3cde9eb22743820176'/>
<id>2c1299b0071c2c528cc01e3cde9eb22743820176</id>
<content type='text'>
Also fix related problems with socket on esp32, improve docs for
wrap_socket, and add more tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fix related problems with socket on esp32, improve docs for
wrap_socket, and add more tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/modussl_mbedtls: Integrate shorter error strings.</title>
<updated>2020-07-20T14:31:05+00:00</updated>
<author>
<name>Thorsten von Eicken</name>
</author>
<published>2020-07-02T19:34:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=5264478007c78b7737972404bda18ab39d792e17'/>
<id>5264478007c78b7737972404bda18ab39d792e17</id>
<content type='text'>
The stm32 and esp32 ports now use shorter error strings for mbedtls errors.
Also, MBEDTLS_ERROR_C is enabled on stm32 by default to get these strings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The stm32 and esp32 ports now use shorter error strings for mbedtls errors.
Also, MBEDTLS_ERROR_C is enabled on stm32 by default to get these strings.
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/modussl: Improve exception error messages.</title>
<updated>2020-07-20T13:41:45+00:00</updated>
<author>
<name>Thorsten von Eicken</name>
</author>
<published>2020-03-27T06:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=9aa214077e6d1e0fba1a775431fedea4c8d76558'/>
<id>9aa214077e6d1e0fba1a775431fedea4c8d76558</id>
<content type='text'>
This commit adds human readable error messages when mbedtls or axtls raise
an exception.  Currently often just an EIO error is raised so the user is
lost and can't tell whether it's a cert error, buffer overrun, connecting
to a non-ssl port, etc.  The axtls and mbedtls error raising in the ussl
module is modified to raise:

    OSError(-err_num, "error string")

For axtls a small error table of strings is added and used for the second
argument of the OSErrer.  For mbedtls the code uses mbedtls' built-in
strerror function, and if there is an out of memory condition it just
produces OSError(-err_num).  Producing the error string for mbedtls is
conditional on them being included in the mbedtls build, via
MBEDTLS_ERROR_C.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds human readable error messages when mbedtls or axtls raise
an exception.  Currently often just an EIO error is raised so the user is
lost and can't tell whether it's a cert error, buffer overrun, connecting
to a non-ssl port, etc.  The axtls and mbedtls error raising in the ussl
module is modified to raise:

    OSError(-err_num, "error string")

For axtls a small error table of strings is added and used for the second
argument of the OSErrer.  For mbedtls the code uses mbedtls' built-in
strerror function, and if there is an out of memory condition it just
produces OSError(-err_num).  Producing the error string for mbedtls is
conditional on them being included in the mbedtls build, via
MBEDTLS_ERROR_C.
</pre>
</div>
</content>
</entry>
<entry>
<title>esp32/modsocket: Fix getaddrinfo to raise on error.</title>
<updated>2020-05-09T06:43:48+00:00</updated>
<author>
<name>Thorsten von Eicken</name>
</author>
<published>2020-04-28T17:58:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=ab4e197707cd456499d680091fdc9daeff18c62a'/>
<id>ab4e197707cd456499d680091fdc9daeff18c62a</id>
<content type='text'>
This commit fixes the behaviour of socket.getaddrinfo on the ESP32 so it
raises an OSError when the name resolution fails instead of returning a []
or a resolution for 0.0.0.0.

Tests are added (generic and ESP32-specific) to verify behaviour consistent
with CPython, modulo the different types of exceptions per MicroPython
documentation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit fixes the behaviour of socket.getaddrinfo on the ESP32 so it
raises an OSError when the name resolution fails instead of returning a []
or a resolution for 0.0.0.0.

Tests are added (generic and ESP32-specific) to verify behaviour consistent
with CPython, modulo the different types of exceptions per MicroPython
documentation.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Format all Python code with black, except tests in basics subdir.</title>
<updated>2020-03-30T02:21:58+00:00</updated>
<author>
<name>David Lechner</name>
</author>
<published>2020-03-23T02:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=3dc324d3f1312e40d3a8ed87e7244966bb756f26'/>
<id>3dc324d3f1312e40d3a8ed87e7244966bb756f26</id>
<content type='text'>
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py.  The basics/ subdirectory is excluded for now so we
aren't changing too much at once.

In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py.  The basics/ subdirectory is excluded for now so we
aren't changing too much at once.

In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/net_inet: Add uasyncio internet tests.</title>
<updated>2020-03-25T14:25:45+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-03-12T00:57:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=081d06766223b326b6d7eeceae817b7a3a3f57b0'/>
<id>081d06766223b326b6d7eeceae817b7a3a3f57b0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/net_inet: Update tls test to work with CPython and incl new site.</title>
<updated>2017-10-26T01:29:24+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2017-10-26T01:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=f36975b6792f6b702dc9184adcdb6e0d89ce23b4'/>
<id>f36975b6792f6b702dc9184adcdb6e0d89ce23b4</id>
<content type='text'>
CPython only supports the server_hostname keyword arg via the SSLContext
object, so use that instead of the top-level ssl.wrap_socket.  This allows
the test to run on CPython the same as uPy.

Also add the "Host:" header to correctly make a GET request (for URLs that
are hosted on other servers).  This is not strictly needed to test the SSL
connection but helps to debug things when printing the response.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CPython only supports the server_hostname keyword arg via the SSLContext
object, so use that instead of the top-level ssl.wrap_socket.  This allows
the test to run on CPython the same as uPy.

Also add the "Host:" header to correctly make a GET request (for URLs that
are hosted on other servers).  This is not strictly needed to test the SSL
connection but helps to debug things when printing the response.
</pre>
</div>
</content>
</entry>
</feed>
