ベアメタルRPi版MicroPythonの最小限のテストが完了

昨日に続き、今日もRaspberry Pi版MicroPythonのテスト&デバッグを行い、esp8266/esp32用のテストと同じ項目をクリアしました。(実装に追加していないモジュールも多いので、機能的に同等とはいきませんが)

実施したテストは昨日のbasicsテストに加えて、micropython、float、misc、extmodの各テストです。
結果をメモしておきます。

micropython:

20 tests performed (92 individual testcases)
20 tests passed
27 tests skipped: heapalloc_bytesio2 meminfo memstats native_closure native_const_intbig native_misc opt_level stack_use viper_addr viper_args viper_binop_arith viper_binop_comp viper_binop_comp_imm viper_binop_divmod viper_binop_multi_comp viper_cond viper_error viper_import viper_misc viper_misc_intbig viper_ptr16_load viper_ptr16_store viper_ptr32_load viper_ptr32_store viper_ptr8_load viper_ptr8_store viper_subscr

ネイティブコードViperコードはサポートしていませんので、この関連の項目がスキップされています。
また、BytesIOはesp32でしかサポートされていないようなので、当面見送りです。
meminfoは今後有効化しようかと思います。memstatsはqemu-armとunixでしかサポートされていませんので、これも見送りの予定です。

float:

39 tests performed (1687 individual testcases)
39 tests passed
6 tests skipped: cmath_fun_special float2int_doubleprec_intbig float_divmod float_parse_doubleprec math_domain_special math_fun_special

このテストとは直接関係ありませんが、現時点ではMicroPythonのビルド時にFPUを有効にする(-mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s)とfloatの演算が正常に行えません。
原因がまだ分からないので、FPUの扱いをどうするか悩み中です。
なおMicroPythonでは明示的にFPUを呼び出す機能もありますが、これはThumb-2命令とセットになっていて、RPi2 & RPi3ではThumb-2を使えますがRPi1では使えません。

misc:

5 tests performed (97 individual testcases)
4 tests passed
1 tests skipped: rge_sm
1 tests failed: print_exception

この1つだけFailしたテストは、エラーメッセージの文字列が異なっていることが原因です。Python3.6では

NameError: name 'X' is not defined

となるメッセージが、MicroPythonでは

NameError: name not defined

となっていました。本質的にはエラーではないので、無視することにしました。

extmod:

15 tests performed (463 individual testcases)
15 tests passed
68 tests skipped: btree1 machine1 machine_pinbase machine_pulse machine_signal ubinascii_a2b_base64 ubinascii_b2a_base64 ubinascii_crc32 ubinascii_hexlify ubinascii_micropython ubinascii_unhexlify ucryptolib_aes128_cbc ucryptolib_aes128_ecb ucryptolib_aes128_ecb_enc ucryptolib_aes128_ecb_inpl ucryptolib_aes128_ecb_into ucryptolib_aes256_cbc ucryptolib_aes256_ecb uctypes_32bit_intbig uctypes_array_assign_le uctypes_array_assign_native_le uctypes_array_assign_native_le_intbig uctypes_bytearray uctypes_byteat uctypes_error uctypes_le uctypes_le_float uctypes_native_float uctypes_native_le uctypes_print uctypes_ptr_le uctypes_ptr_native_le uctypes_sizeof uctypes_sizeof_float uctypes_sizeof_native uhashlib_sha1 uhashlib_sha256 uheapq1 ujson_dump ujson_dump_iobase ujson_dumps ujson_dumps_extra ujson_dumps_float ujson_load ujson_loads ujson_loads_float urandom_basic urandom_extra ure1 ure_debug ure_error ure_group ure_groups ure_namedclass ure_span ure_split ure_split_empty ure_split_notimpl ure_stack_overflow ure_sub ure_sub_unmatched ussl_basic utimeq1 utimeq_stable uzlib_decompio uzlib_decompio_gz uzlib_decompress websocket_basic

extmodは組み込んでいないものがほとんどなので、大量にskipされています。

コメント