Message ID | 20201104150153.541326-10-pbonzini@redhat.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp5506585ilc; Wed, 4 Nov 2020 07:02:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzTDs5PXCsyU90/Lf7vdcR3Dle+xch1CgBI7fQyViFs7q+6WlXzTopVvCARIuEojaMww0Z X-Received: by 2002:a37:e0e:: with SMTP id 14mr25800425qko.455.1604502149694; Wed, 04 Nov 2020 07:02:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604502149; cv=none; d=google.com; s=arc-20160816; b=Teojs2SGjnP+hLa5FLXsiuN2pZHEbS7KbvECjMem93I5fSI/fXqVXMvIQw3gkJpLzW Qn2jbXGL/NKCkGxMUsXpTsF70oPf/tR7yv3tepAguVZ4fCsapcx80MfOmF1tcEZcrdyk OKmPkovU6PnKt5hLnWleknOz+SImworIEa2YODCG5ZsbTPWKfmcNHRDXKRPyBEUIogCD GzJYkpATknboB1kHVxF9V2le27Uux6rk99OOaP8MbT5BLwW/y2OuQguLoF16+4uEgjCH RuPRIXbVzN17+zTMXnwvkZmgMrArC/jzwrhKVfWkWYrr74a/2JlEcmA5WiSj/KstZ8Eu dl9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=e9BEGm1Q4og47egWEYDjCc+t61kdD3EHCWAUPII/OKE=; b=QgjsNFc5b2+qurXCQTL1poqUhKEN2gZtnngMFB+CncsdL68FlajWXkul32RHqjY4iA NAYGQ/M/GSVI5oqPAh4pVLQnv84SiiF+Nvv/E07vKFxDGuqQaQuOTo/CVJfhdZg3Pd6r 0kXMQJB8B9gCXdOZTWZYcuSUAJ2g8CnaEgjQr4oxDJ/UfHyL4SoiMJtXujPPcH+gki/f xxCcRHFCnfLYZxJE3xbu1BwYZvDrQJI7GWFE2C2mCoekSKEVoNaS0fUrXwS6agTgRn0x v6Lokw+1J+ZLVgQaJuH2KNiPEHSBOjsl9gFMWxxT2SBNUw/rwdryOVCOa80IsYNkDU/T fyiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FZP0UJYW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u17si159338qtf.43.2020.11.04.07.02.29 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Nov 2020 07:02:29 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FZP0UJYW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:45386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1kaKIv-00033Q-2u for patch@linaro.org; Wed, 04 Nov 2020 10:02:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>) id 1kaKIZ-00030K-6D for qemu-devel@nongnu.org; Wed, 04 Nov 2020 10:02:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>) id 1kaKIV-00062A-2U for qemu-devel@nongnu.org; Wed, 04 Nov 2020 10:02:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604502122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e9BEGm1Q4og47egWEYDjCc+t61kdD3EHCWAUPII/OKE=; b=FZP0UJYW2RWg7bCOGg5yzqpInXJ7U3C07otTLkzcoDw/kFwg8t9vljweJZ/8kR3FiRvBB1 DbMw01aXxDND2Yokgx5EgIkfd+tVd8SXnVQlY9jN7qfmINRz+TJkVrnzpmt8rN2dWi9Bss iO2LIVR2ICo1hjDu18uW36z4bnxzJ3Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-GclS-hlAOK2L56vyoRdFJA-1; Wed, 04 Nov 2020 10:02:00 -0500 X-MC-Unique: GclS-hlAOK2L56vyoRdFJA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07714801F9A; Wed, 4 Nov 2020 15:01:59 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB3111007501; Wed, 4 Nov 2020 15:01:58 +0000 (UTC) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Subject: [PULL 09/20] tests/qtest/libqtest.c: Check for setsockopt() failure Date: Wed, 4 Nov 2020 10:01:42 -0500 Message-Id: <20201104150153.541326-10-pbonzini@redhat.com> In-Reply-To: <20201104150153.541326-1-pbonzini@redhat.com> References: <20201104150153.541326-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/03 00:03:41 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
Misc patches for QEMU 5.2-rc1
|
expand
|
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 99deff47ef..be0fb430dd 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -110,8 +110,13 @@ static int socket_accept(int sock) struct timeval timeout = { .tv_sec = SOCKET_TIMEOUT, .tv_usec = 0 }; - setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (void *)&timeout, - sizeof(timeout)); + if (qemu_setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, + (void *)&timeout, sizeof(timeout))) { + fprintf(stderr, "%s failed to set SO_RCVTIMEO: %s\n", + __func__, strerror(errno)); + close(sock); + return -1; + } do { addrlen = sizeof(addr);