From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1642FC2B9F4 for ; Tue, 22 Jun 2021 11:08:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8946361351 for ; Tue, 22 Jun 2021 11:08:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8946361351 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lveGI-0002Gk-Pe for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 07:08:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lveCy-0008BP-7a for qemu-devel@nongnu.org; Tue, 22 Jun 2021 07:04:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lveCv-0002ap-Rl for qemu-devel@nongnu.org; Tue, 22 Jun 2021 07:04:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624359880; 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=8ET2k+rRIHWSb2EbzFkqbXbj9NWpqsOIkjL0HUdQU9E=; b=Ha3gRcx74RS16jfyzidU2qb6UIw6vMbkKeft3rXT36A9APPzm3uWEeOnWP6zk4aFAJRrsR Q2wj8AFHPC7oeA2v/shYFPCT7KBVqTNQMxb5S+Ru/2suYwLKa2gXFwPk6/KYz4CgwYqWyO h0NHjDq25rr3TyxUuwxPhE7li9OLslY= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-mb2-IQIjNBqIz62s94hHqg-1; Tue, 22 Jun 2021 07:04:39 -0400 X-MC-Unique: mb2-IQIjNBqIz62s94hHqg-1 Received: by mail-ed1-f69.google.com with SMTP id y18-20020a0564022712b029038ffac1995eso9342385edd.12 for ; Tue, 22 Jun 2021 04:04:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8ET2k+rRIHWSb2EbzFkqbXbj9NWpqsOIkjL0HUdQU9E=; b=jaZ8SwYmzVEuN/5ZQeqDzXKNbQ2UYQEHhhz6P13aBdIdV2fWS5iX2DGREc6Y02IJHF wFgJtxnc4ofOq3V29OwWZh8ulRu5gyAavaS15dXjRRjHvVWDpDq+DgZuZd3bG+mZHEwN j6CVlT5DwmMRxZ03JjhJwSFzjy2bjQrbIK4BGhUCZOyDsyQx+Dde6QASJUDfmXBB10jG tx+yuF5FiEXnldyXj1iD2PXo9Ig+/1ckp1t1BK7TQxPbKO5Dy7u53wCe2imNHUGIyUTb XG9BuSxK8Ub3g2y8IFbIv7hbvPUMxEMqrdCt1EM+5QWoWUt8wTih2+gNpvVP6rLZ8aWz 3qog== X-Gm-Message-State: AOAM531xkfyghWwp9+msB/cHlEPPgb6ZA6f9PwJ3flKrxBS9OUN8YMwp 8nvDyRL+mqPFdLBx42gHq4ztQj6jzcfb157UdaH7JVn53nktM8aPcdPvdzCOg/OKqmCw62ZVt9V 94ruOCLifrbJpoAy8Fl12/s5fymlJB9sv4HxdwQKQ23Gu8YO9s6BOyex57mvlto7r56o= X-Received: by 2002:a17:907:1185:: with SMTP id uz5mr3333175ejb.26.1624359878113; Tue, 22 Jun 2021 04:04:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVh2QxqZMVITo7Rg5pP98+I+jSRTfoUVf8I/iIAG+GsHJQwy7hD1ds7oNaLyhYbWV9Tqxmmw== X-Received: by 2002:a17:907:1185:: with SMTP id uz5mr3333135ejb.26.1624359877874; Tue, 22 Jun 2021 04:04:37 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:4:31cb:e591:1e1e:abde:a8f1]) by smtp.gmail.com with ESMTPSA id dd15sm4996668edb.45.2021.06.22.04.04.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jun 2021 04:04:37 -0700 (PDT) Subject: Re: [PATCH v6 06/16] qemu-iotests: delay QMP socket timers To: Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org References: <20210621103337.36637-1-eesposit@redhat.com> <20210621103337.36637-7-eesposit@redhat.com> <4179a6d2-3fc8-aae1-4747-b4ae541a8819@virtuozzo.com> From: Emanuele Giuseppe Esposito Message-ID: Date: Tue, 22 Jun 2021 13:04:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <4179a6d2-3fc8-aae1-4747-b4ae541a8819@virtuozzo.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eesposit@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.223, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Eduardo Habkost , qemu-devel@nongnu.org, Max Reitz , Cleber Rosa , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 22/06/2021 12:50, Vladimir Sementsov-Ogievskiy wrote: > 21.06.2021 13:33, Emanuele Giuseppe Esposito wrote: >> Attaching gdbserver implies that the qmp socket >> should wait indefinitely for an answer from QEMU. >> >> Signed-off-by: Emanuele Giuseppe Esposito >> Reviewed-by: Vladimir Sementsov-Ogievskiy > > Please, let this patch go without my r-b. I don't like it, I explained > my thoughts, and you even used my suggested way in previous version. > > What I don't like: good component - Timeout class, which is currently > independent of outer code and can be simply moved to another module > becomes dependent on global variable, which doesn't relate to the class > itself. Neither I like logic of the dependency which just make the whole > class do nothing by skipping any action internally. So, IMHO Timeout > class becomes worse. > > I'm not a maintainer here anyway, so my r-b isn't necessary :) Oh okay. Sorry I understood from previous versions that you liked it even without your suggested change. Apologies. Emanuele > >> --- >>   tests/qemu-iotests/iotests.py | 6 +++++- >>   1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/tests/qemu-iotests/iotests.py >> b/tests/qemu-iotests/iotests.py >> index c86f239d81..e176a84620 100644 >> --- a/tests/qemu-iotests/iotests.py >> +++ b/tests/qemu-iotests/iotests.py >> @@ -477,10 +477,14 @@ def __init__(self, seconds, errmsg="Timeout"): >>           self.seconds = seconds >>           self.errmsg = errmsg >>       def __enter__(self): >> +        if qemu_gdb: >> +            return self >>           signal.signal(signal.SIGALRM, self.timeout) >>           signal.setitimer(signal.ITIMER_REAL, self.seconds) >>           return self >>       def __exit__(self, exc_type, value, traceback): >> +        if qemu_gdb: >> +            return False >>           signal.setitimer(signal.ITIMER_REAL, 0) >>           return False >>       def timeout(self, signum, frame): >> @@ -575,7 +579,7 @@ class VM(qtest.QEMUQtestMachine): >>       def __init__(self, path_suffix=''): >>           name = "qemu%s-%d" % (path_suffix, os.getpid()) >> -        timer = 15.0 >> +        timer = 15.0 if not qemu_gdb else None >>           super().__init__(qemu_prog, qemu_opts, name=name, >>                            base_temp_dir=test_dir, >>                            socket_scm_helper=socket_scm_helper, >> > >