[summary] This patch set modifies hwsim test to support python3 because python2 is deprecated from 2020. After applying this patch set, user can run hwsim test both python2 and python3. We can run with python3 by modifying run-tests.py. #!/usr/bin/env python2 | v #!/usr/bin/env python3 [testing environment] I have tested all the test cases with vm-run.sh. The vm-run.sh test is using this wireless-testing kernel. commit 24e1d9cd149ef4daed8d1fb457704cd03172d777 'Add localversion to identify builds from this tree'. hostap commit 3cd0adea2607c540c0603ef7c907d210da007ca1 'tests: wpa_supplicant config parsing and storing for new variables' host OS Ubuntu 18.04 x64 python version Python 2.7.15rc1 Python 3.6.7 [failing tests] Some test cases fails. This is not because of python3, it fails with python2 also. This is the list of the test cases. ap_acs(5) ap_acs_5ghz ap_acs_5ghz_40mhz ap_acs_vht ap_acs_vht40 ap_acs_vht160 ap_params(2) ap_country ap_spectrum_management_required ap_vht(11) ap_vht160 ap_vht160b ap_vht160_no_dfs ap_vht160_no_dfs_108_plus ap_vht160_no_dfs_100_plus ap_vht160_no_dfs_112_minus ap_vht160_no_dfs_116_plus ap_vht160_no_dfs_120_minus ap_vht160_no_dfs_124_plus ap_vht160_no_dfs_128_minus ap_vht80_pwr_constraint dbus(1) dbus_mesh rrm(2) rrm_beacon_req_passive_scan_vht rrm_beacon_req_passive_scan_vht160 wmediumd(1) wmediumd_path_ttl wnm(9) wnm_bss_tm wnm_bss_tm_scan_not_needed wnm_bss_tm_nei_vht wnm_bss_tm_nei_11a wnm_bss_tm_nei_11b wnm_bss_tm_scan_needed wnm_bss_tm_scan_needed_e4 wnm_bss_tm_reject wnm_bss_tm_rsn wpas_mesh(2) wpas_mesh_peer_disconnected wpas_mesh_max_peering [other modifications] Basically, this patch set is for hwsim test. Though, there are several python scripts other than hwsim test. This patch set modifies such a python scripts also. Just only modified "except", "print" statements. These are not re-tested because of trivial modifications. This is the list. hostapd/wps-ap-nfc.py wpa_supplicant/eapol_test.py wpa_supplicant/examples/*.py wpa_supplicant/utils/log2pcap.py Masashi Honma (50): tests: Use python3 compatible "except" statement tests: Use python3 compatible print statement tests: Use python3 compatible dict operation tests: Use python3 compatible range operation tests: Use python3 compatible function attribute tests: Use python3 compatible raise statement tests: Use int instead of long for python3 compatibility tests: Remove deprecated statement for python3 compatibility tests: Python3 does not allow mixed indentation tests: python3 require escaping tests: Use python3 compatible liblaries tests: Decode subprocess.check_output return value for python3 tests: Modify core functions for python3 tests: ap_eap test requires more memory tests: Modify ap_eap test sets for python3 tests: Modify ap_ft test sets for python3 tests: Modify ap_hs20 test sets for python3 tests: Modify ap_psk test sets for python3 tests: Modify ap_wps test sets for python3 tests: Modify cfg80211 test sets for python3 tests: Modify dbus test sets for python3 tests: Modify dbus_old test sets for python3 tests: Modify dpp test sets for python3 tests: Modify eap_proto test sets for python3 tests: Modify erp test sets for python3 tests: Modify fils test sets for python3 tests: Modify fst_config test sets for python3 tests: Modify gas test sets for python3 tests: Modify hs20_filter test sets for python3 tests: Modify ieee8021x test sets for python3 tests: Modify kernel test sets for python3 tests: Modify macsec test sets for python3 tests: Modify mbo test sets for python3 tests: Modify nfc_wps test sets for python3 tests: Modify ocv test sets for python3 tests: Modify p2p_channel test sets for python3 tests: Modify p2p_grpform test sets for python3 tests: Modify p2p_messages test sets for python3 tests: Modify pmksa_cache test sets for python3 tests: Modify radius test sets for python3 tests: Modify rrm test sets for python3 tests: Modify sae test sets for python3 tests: Add WPA-EAP-SUITE-B-192 support tests: Modify sigma_dut test sets for python3 tests: Modify ssid test sets for python3 tests: Modify wmediumd test sets for python3 tests: Modify wnm test sets for python3 tests: Modify wpas_ctrl test sets for python3 tests: Modify wpas_mesh test sets for python3 tests: Modify wpas_wmm_ac test sets for python3 hostapd/wps-ap-nfc.py | 62 +- tests/hwsim/example-hostapd.config | 1 + tests/hwsim/example-wpa_supplicant.config | 1 + tests/hwsim/fst_module_aux.py | 4 +- tests/hwsim/fst_test_common.py | 2 +- tests/hwsim/hostapd.py | 11 +- tests/hwsim/hwsim.py | 10 +- tests/hwsim/hwsim_utils.py | 8 +- tests/hwsim/netlink.py | 11 +- tests/hwsim/nl80211.py | 4 +- tests/hwsim/p2p_utils.py | 13 +- tests/hwsim/remotehost.py | 6 +- tests/hwsim/rfkill.py | 24 +- tests/hwsim/run-tests.py | 96 +-- tests/hwsim/test_ap_ciphers.py | 4 +- tests/hwsim/test_ap_dynamic.py | 4 +- tests/hwsim/test_ap_eap.py | 77 +- tests/hwsim/test_ap_ft.py | 134 ++-- tests/hwsim/test_ap_hs20.py | 197 +++--- tests/hwsim/test_ap_open.py | 2 +- tests/hwsim/test_ap_params.py | 2 +- tests/hwsim/test_ap_pmf.py | 6 +- tests/hwsim/test_ap_psk.py | 46 +- tests/hwsim/test_ap_tdls.py | 6 +- tests/hwsim/test_ap_vht.py | 32 +- tests/hwsim/test_ap_vlan.py | 2 +- tests/hwsim/test_ap_wps.py | 658 ++++++++++-------- tests/hwsim/test_cfg80211.py | 4 +- tests/hwsim/test_dbus.py | 611 ++++++++-------- tests/hwsim/test_dbus_old.py | 75 +- tests/hwsim/test_dpp.py | 71 +- tests/hwsim/test_eap_proto.py | 20 +- tests/hwsim/test_erp.py | 6 +- tests/hwsim/test_fils.py | 140 ++-- tests/hwsim/test_fst_config.py | 4 +- tests/hwsim/test_fst_module.py | 46 +- tests/hwsim/test_gas.py | 52 +- tests/hwsim/test_hostapd_oom.py | 4 +- tests/hwsim/test_hs20_filter.py | 10 +- tests/hwsim/test_hs20_pps_mo.py | 2 +- tests/hwsim/test_ibss.py | 8 +- tests/hwsim/test_ieee8021x.py | 2 +- tests/hwsim/test_kernel.py | 4 +- tests/hwsim/test_macsec.py | 20 +- tests/hwsim/test_mbo.py | 16 +- tests/hwsim/test_nfc_wps.py | 5 +- tests/hwsim/test_ocv.py | 14 +- tests/hwsim/test_p2p_channel.py | 2 +- tests/hwsim/test_p2p_grpform.py | 5 +- tests/hwsim/test_p2p_messages.py | 97 ++- tests/hwsim/test_p2p_wifi_display.py | 5 +- tests/hwsim/test_pmksa_cache.py | 14 +- tests/hwsim/test_radius.py | 4 +- tests/hwsim/test_rfkill.py | 2 +- tests/hwsim/test_rrm.py | 20 +- tests/hwsim/test_sae.py | 12 +- tests/hwsim/test_scan.py | 14 +- tests/hwsim/test_sigma_dut.py | 2 +- tests/hwsim/test_ssid.py | 4 +- tests/hwsim/test_wext.py | 2 +- tests/hwsim/test_wmediumd.py | 16 +- tests/hwsim/test_wnm.py | 20 +- tests/hwsim/test_wpas_ctrl.py | 25 +- tests/hwsim/test_wpas_mesh.py | 53 +- tests/hwsim/test_wpas_wmm_ac.py | 22 +- tests/hwsim/tshark.py | 18 +- tests/hwsim/vm/parallel-vm.py | 38 +- tests/hwsim/vm/vm-run.sh | 2 +- tests/hwsim/wlantest.py | 4 +- tests/hwsim/wpasupplicant.py | 19 +- tests/remote/hwsim_wrapper.py | 4 +- tests/remote/run-tests.py | 38 +- tests/remote/test_devices.py | 30 +- wpa_supplicant/eapol_test.py | 2 +- wpa_supplicant/examples/dbus-listen-preq.py | 16 +- wpa_supplicant/examples/dpp-qrcode.py | 36 +- wpa_supplicant/examples/p2p-nfc.py | 168 ++--- wpa_supplicant/examples/p2p/p2p_connect.py | 70 +- wpa_supplicant/examples/p2p/p2p_disconnect.py | 30 +- wpa_supplicant/examples/p2p/p2p_find.py | 34 +- wpa_supplicant/examples/p2p/p2p_flush.py | 30 +- wpa_supplicant/examples/p2p/p2p_group_add.py | 50 +- wpa_supplicant/examples/p2p/p2p_invite.py | 44 +- wpa_supplicant/examples/p2p/p2p_listen.py | 32 +- wpa_supplicant/examples/p2p/p2p_stop_find.py | 32 +- .../examples/wpas-dbus-new-getall.py | 28 +- .../examples/wpas-dbus-new-signals.py | 34 +- wpa_supplicant/examples/wpas-dbus-new-wps.py | 16 +- wpa_supplicant/examples/wpas-dbus-new.py | 20 +- wpa_supplicant/examples/wpas-test.py | 10 +- wpa_supplicant/examples/wps-nfc.py | 124 ++-- wpa_supplicant/utils/log2pcap.py | 2 +- wpaspy/test.py | 28 +- wpaspy/wpaspy.py | 15 +- 94 files changed, 2010 insertions(+), 1820 deletions(-) -- 2.17.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap