From patchwork Thu Jan 24 07:45:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 1030298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fnuHd9/5"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LfVALO+y"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43lZ4F5Dfpz9sBn for ; Thu, 24 Jan 2019 18:47:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=xiTyvJSI6+tcgwQky6eSMemekdXjlyyFQePl2UDilPU=; b=fnu Hd9/5n4bCHOuLu5tlC3TDCdFxdWfkuYNr24OgedKMKH7dkfBG94YD1D6uN6f2WZ5kI+nJOIV0oxsf kU8AajkngXIJjW83RHdPlVGkxziK0ybptzy0nmDybLaJROJnokPEHg1EEDckFbzU98YLCs0S8VMfJ T1omYHS/OimchLK2hLWsDAIr0oYMWzKiIXX/o22ydfaJUvV12XCCUvvgeW9eZUWvCOR9KpJfcwSNd N4TDQpFWH+PQUlGNDzo91OkAu07ac6+4ci/5qYcTltvVVIDCS7j0kBrwsqTI/j4asmWfJqNixX/cl nz6phIM/nEgO7Q/N+Nz7adq7bz31pKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmZiv-0005i7-ID; Thu, 24 Jan 2019 07:46:53 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmZim-0005Z9-RI for hostap@lists.infradead.org; Thu, 24 Jan 2019 07:46:49 +0000 Received: by mail-pf1-x432.google.com with SMTP id b7so2579951pfi.8 for ; Wed, 23 Jan 2019 23:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=camK4F4NdCCZtU68Pg4FhlRNJzMPWc3CGegiaHWaNZc=; b=LfVALO+yL2ZgA+NvPUgbqyFl0HDmu1g0JaTtWPogSoWE4YBHuXnE2Zw6fDhBxLHS5g x2npvQdNjPub6gaOzpY5cemMTPU58WitqVzanB0TcUOSTx4+smtZCtRVtPJry4/LUrmD N5KcWs8LEuIU0sNM0YJO2t8WHNJcL9q014tB5lueC/CfJ3aO33BLtUFdotq1wO8jtgRz 8ZDKbfjkm7krUxu2ONFcBWmsffBwrkEBl3/cmwt/x0X91PmZvo2GfZNozOVA3mCgTDR9 9Z/7kJh/gBwAt5Hvgkl785M1Uxgld6Y7QiGEhBIo5HXs/+E0gktmqCcR87VquTzSaJk8 gSeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=camK4F4NdCCZtU68Pg4FhlRNJzMPWc3CGegiaHWaNZc=; b=jsE0ACyBYtp8vmKu+bn/BKhq5khFJlApUXNuR3Tqv0aM+TtTgsjEBdwnIGyO0wiNru Y1fZgIrAj91F0GMKyB66hyERWdFFsw+2YroWY4d/qqV2AGQMEALQGFkjQXrvVt/KZ4IT +iJPn2slmbynB/Z6BEHgpGl6BqrpMRxlk8+bcHmKppNh9AWZgd13FhVMYoKGA3/bfNOk QczDL/k3R8JbtnmgYBl7yNV6aMGLqYDBCqPa8Srsl86PESt+ViBHfisfnUbhF4fTdsqI iDet/zvjHuP+gfhtASrGLee58O+J/xETU3M90u6UNDEsOwk5akKq9l9wGxlaKnAp0EPs mGMw== X-Gm-Message-State: AJcUukdC2m73Crw7m6LEv9WBE+Yeo0fRjpVOB2UQ72vqQbGzkOYeaj+4 f7L7hPw8/Miqm9EfOJ17cmoQIEaA X-Google-Smtp-Source: ALg8bN5QuvD5Ykj1P8fzN+Ggqx6FdoH04zIxZijt0J5Hoa6ROjZoVERR9HVDx99hFkDztcpEugPhmw== X-Received: by 2002:a62:3241:: with SMTP id y62mr5431700pfy.178.1548316002971; Wed, 23 Jan 2019 23:46:42 -0800 (PST) Received: from gtx740.flets-east.jp ([2409:11:321:2100:c5e5:17d6:d698:81bb]) by smtp.gmail.com with ESMTPSA id i193sm73264227pgc.22.2019.01.23.23.46.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 23:46:42 -0800 (PST) From: Masashi Honma To: hostap@lists.infradead.org Subject: [PATCH 00/50] Use python3 compatible codes for hwsim tests Date: Thu, 24 Jan 2019 16:45:40 +0900 Message-Id: <20190124074630.4192-1-masashi.honma@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190123_234645_337656_C47EA301 X-CRM114-Status: GOOD ( 12.04 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:432 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (masashi.honma[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masashi Honma MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org [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(-)