From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
Peter Maydell <peter.maydell@linaro.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
peterx@redhat.com, Juan Quintela <quintela@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
berrange@redhat.com
Subject: [PULL 1/7] tests/tcg/linux-test: Fix random hangs in test_socket
Date: Mon, 1 Aug 2022 17:55:00 +0200 [thread overview]
Message-ID: <20220801155506.254316-2-thuth@redhat.com> (raw)
In-Reply-To: <20220801155506.254316-1-thuth@redhat.com>
From: Ilya Leoshkevich <iii@linux.ibm.com>
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 <iii@linux.ibm.com>
Message-Id: <20220725144251.192720-1-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/tcg/multiarch/linux/linux-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tcg/multiarch/linux/linux-test.c b/tests/tcg/multiarch/linux/linux-test.c
index 019d8175ca..5a2a4f2258 100644
--- a/tests/tcg/multiarch/linux/linux-test.c
+++ b/tests/tcg/multiarch/linux/linux-test.c
@@ -263,7 +263,7 @@ static int server_socket(void)
sockaddr.sin_port = htons(0); /* choose random ephemeral port) */
sockaddr.sin_addr.s_addr = 0;
chk_error(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)));
- chk_error(listen(fd, 0));
+ chk_error(listen(fd, 1));
return fd;
}
--
2.31.1
next prev parent reply other threads:[~2022-08-01 16:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 15:54 [PULL 0/7] Testing and wording fixes Thomas Huth
2022-08-01 15:55 ` Thomas Huth [this message]
2022-08-01 15:55 ` [PULL 2/7] migration-test: Use migrate_ensure_converge() for auto-converge Thomas Huth
2022-08-01 15:55 ` [PULL 3/7] migration-test: Allow test to run without uffd Thomas Huth
2022-08-01 15:55 ` [PULL 4/7] tests/unit/test-qga: Replace the word 'blacklist' in the guest agent unit test Thomas Huth
2022-08-01 15:55 ` [PULL 5/7] misc: fix commonly doubled up words Thomas Huth
2022-08-01 15:55 ` [PULL 6/7] trivial: Fix duplicated words Thomas Huth
2022-08-01 15:55 ` [PULL 7/7] tests/qtest/migration-test: Run the dirty ring tests only with the x86 target Thomas Huth
2022-08-01 18:59 ` [PULL 0/7] Testing and wording fixes Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220801155506.254316-2-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=iii@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).