From patchwork Wed Jan 8 23:03:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 1220022 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=none (p=none dis=none) header.from=tu-ilmenau.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=nIzjzsmK; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47tPtW4nlqz9sR0 for ; Thu, 9 Jan 2020 10:03:31 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Yxpjoq2JGSROJItQnQKLWvf7kL0jjWPBKWIGmYeJJy0=; b=nIzjzsmKM5GUHP tVwRQSUtSiu741GuZXtFqrKdvKV1vBLTy0gPrnF07aMvSw2SlJ726+S3vTHB/Cp/kW5EDKpPgCI/B czZlWSz1xiKTiPE2DSLtqIyvAv1SrYLL37FsXiCNc/+PxAOaQKWG5PduYVC4bfMDFIcixaGFVKG7e 1ENRD6+EO4ClvE0slp4gtjGN7OX1FH4YtsiLIfMHnsLqUAplITDorcp5d5HPMGh9D6N1qdJHmKask PpM26zCEZDb5QzO+AQyn+WwFdrxT+q4xFGHCaQvUwzwfbw5ijnO1/y4DmVEBdCbnO/Pzmn+PrV/up eQZkfiSL+c2ww6ovZXWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipKMG-0005IA-Ph; Wed, 08 Jan 2020 23:03:24 +0000 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipKMD-0005Hf-Am for hostap@lists.infradead.org; Wed, 08 Jan 2020 23:03:22 +0000 Received: from legolas.fritz.box (unknown [109.41.128.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 340DA580074; Thu, 9 Jan 2020 00:03:18 +0100 (CET) From: Markus Theil To: hostap@lists.infradead.org Subject: [PATCH] tests: fix Python sleep function Date: Thu, 9 Jan 2020 00:03:02 +0100 Message-Id: <20200108230302.1694-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200108_150321_571889_5600A53D X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [141.24.186.67 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Theil Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Current Python versions have no os.sleep(), use time.sleep() instead. module 'os' has no attribute 'sleep' Traceback (most recent call last): File "./run-tests.py", line 521, in main t(dev, apdev) File "/home/mtheil/hostap/tests/hwsim/test_pmksa_cache.py", line 356, in test_pmksa_cache_expiration hapd.wait_ptkinitdone(dev[0].own_addr()) File "/home/mtheil/hostap/tests/hwsim/hostapd.py", line 282, in wait_ptkinitdone os.sleep(0.1) Signed-off-by: Markus Theil --- tests/hwsim/hostapd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index b4ebbdbf6..67e8a7fb8 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -279,7 +279,7 @@ class Hostapd: state = sta['hostapdWPAPTKState'] if state == "11": return - os.sleep(0.1) + time.sleep(0.1) timeout -= 0.1 raise Exception("Timeout while waiting for PTKINITDONE")