From nobody Fri May 3 08:23:03 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1622557362; cv=none; d=zohomail.com; s=zohoarc; b=SlMZsvvjdjuGVJ5IzzwkoevAoaYi/l1d3tULp8Twk2evI5/62k/L+/j630YJgsXcO5GtzDdhEg0tESr55FvXjd4ksrV+Sc+LS/PbAnDcqWf19y4tZrxwMsehKBDfgVBA08YeujUCknz5omi1KjvlA8EdNYunuXjjdxhJEzUl3qY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622557362; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=iWpkNnNt5AI5mZ441ej0NB4KU8gK0+mSO6ixHHBaTsU=; b=QpoJ5/Th+xzsNRk62BQpn6xDDEFMgaGKixg4sM8vSjKxJ9TnwfGPmS1pCVONRqyaKLt3R8O/uuPOsoYRCaxAL2R6Ovxycgxv/Ud90oZGuqavzm+0zrQKaNugpRqhbBy+nCTxCBKLoNN5Gv+ybZjcj+oeGaTx60LKrpYjwLkVVD0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622557362703519.2042005212967; Tue, 1 Jun 2021 07:22:42 -0700 (PDT) Received: from localhost ([::1]:45340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo5I1-0001Qx-Uf for importer2@patchew.org; Tue, 01 Jun 2021 10:22:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo5G5-0007jL-U4 for qemu-devel@nongnu.org; Tue, 01 Jun 2021 10:20:43 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:4290 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo5G4-0000mI-6a for qemu-devel@nongnu.org; Tue, 01 Jun 2021 10:20:41 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 151E4ZuX140910; Tue, 1 Jun 2021 10:20:38 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com with ESMTP id 38wht4h7hx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Jun 2021 10:20:38 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 151EE7sQ011781; Tue, 1 Jun 2021 14:20:37 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma02fra.de.ibm.com with ESMTP id 38w413ratf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Jun 2021 14:20:36 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 151EK1tP36962652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Jun 2021 14:20:01 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7DF3A4060; Tue, 1 Jun 2021 14:20:33 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F062A4054; Tue, 1 Jun 2021 14:20:33 +0000 (GMT) Received: from vm.lan (unknown [9.145.39.144]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 1 Jun 2021 14:20:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=iWpkNnNt5AI5mZ441ej0NB4KU8gK0+mSO6ixHHBaTsU=; b=XiWPLHsQ/0icWPP8L3j5tBzXkSuXxwjvzm2hoXOdNLMG9ClBBbg24nwSU1q2EFO0Jev4 CRVinFWBAX7s0yV+4gCqwi/lDZwY5joOGcCpw3qWFx0Rscvdlj+pAjtvR8A2Xx1px4x0 SCDNki2rZla63VCqwPc3Np0XYgELSd2TAfw5HSeRRfBvyE2quDDBghfguKcag9Ucbd9W SCviQ3KGu+achQm8qQj7g0M8jg2IpWeJjlyYyVyH6Zs/FEhf++GdnmrfcMq1qca5iD32 XYvrJtKv41eEgPvlZPnce7PccdKpBINqbf688XxU4iHQiaPrzKM4e4/yfO2OCX1jFyuR wg== From: Ilya Leoshkevich To: =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH] tests/tcg/linux-test: Fix random hangs in test_socket Date: Tue, 1 Jun 2021 16:20:30 +0200 Message-Id: <20210601142030.3129967-1-iii@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: vE0MU-JrSAtmBxHG8DC2DOwNumKoChGj X-Proofpoint-ORIG-GUID: vE0MU-JrSAtmBxHG8DC2DOwNumKoChGj X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-01_07:2021-06-01, 2021-06-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 clxscore=1011 spamscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106010092 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=iii@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Borntraeger , qemu-devel@nongnu.org, Ilya Leoshkevich Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" test_socket hangs randomly in connect(), especially when run without qemu. Apparently the reason is that linux started treating backlog value of 0 literally instead of rounding it up since v4.4 (commit ef547f2ac16b). So set it to 1 instead. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/linux-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-t= est.c index eba07273f7..3b256f6c02 100644 --- a/tests/tcg/multiarch/linux-test.c +++ b/tests/tcg/multiarch/linux-test.c @@ -263,7 +263,7 @@ static int server_socket(void) sockaddr.sin_port =3D htons(0); /* choose random ephemeral port) */ sockaddr.sin_addr.s_addr =3D 0; chk_error(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr))); - chk_error(listen(fd, 0)); + chk_error(listen(fd, 1)); return fd; =20 } --=20 2.31.1