From patchwork Tue Jul 4 15:22:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 72080 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B90803851ABC for ; Tue, 4 Jul 2023 15:23:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B90803851ABC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1688484239; bh=qlT6NWnA117BtEp4OTwtH4P644YNxJpV+p4TmFJoWMM=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=byaTU/LoN5M3PrYs+Aq8EYCj7e7y5nsGY43+3HqgJCJXNRta2jOYn9iUqqwlN/Tli K89kH1ctz9Opk/V8R1TTF9rGW7u8CjRAXpIq6LZGDn2E3SqUxBxQQDqvqaQN5D72jp KlHyOF8GTmA9AOOqGu0mmPYVln4bibwfzY+gEJ+0= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 920EB3856DD0 for ; Tue, 4 Jul 2023 15:23:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 920EB3856DD0 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-523-w0Z2UikzPhmFKjfPj7NK0w-1; Tue, 04 Jul 2023 11:23:14 -0400 X-MC-Unique: w0Z2UikzPhmFKjfPj7NK0w-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3fa979d0c32so33378305e9.2 for ; Tue, 04 Jul 2023 08:23:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688484192; x=1691076192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qlT6NWnA117BtEp4OTwtH4P644YNxJpV+p4TmFJoWMM=; b=Vzby9mBwDNLPXtvzfNU5paWys3d0AqlQqg+HP8ZcMQz6s8q1egKXqYbAcZh6S5/HbP Yhk7VzYiyEjitJBPOl7Xobpk+SEhZ7h+yhPnMzEbRggX80Jml66kUvNJP2QsZI+EJ+vM nK6aV9oy0dIlGfg8wsf3nm9NxPNYBv5TZDLu4LEeyuFasue10ftk6cI7XdKArYkzH34s CSSwnCc29+IT95ZCzgGfLNGD1mOZT1FhwjsNPz8qQOdhLcDPDLFD1v3XjSeXd31Z6Eqq FR9pAfR5T1/kHDIQurhVtO+awq9pU4lcz462jxN6lOSTdf78jKFl5+KwNFyI29U+QA9T NmNg== X-Gm-Message-State: AC+VfDyuGM5B7ZUqPIKfGHRPrn9y0/47U204Tk8XYlTDNmxvYpy6D4Zg m77SG7Pvky3yB7YipH6HQjE08ccLd7dX1l71e9kd/q4Y924BMSROW2QUch1GAyzDJZfVMQ8rFeQ lLx3PzhKAyox91lWGUl81mAplmr+xyka8J49X3Lsnhsgxyp/kfYmwi8zFdx8+5RdSwT7Q6JUfIa FFKqZSlA== X-Received: by 2002:a1c:f70a:0:b0:3fb:c060:8b3d with SMTP id v10-20020a1cf70a000000b003fbc0608b3dmr10459371wmh.40.1688484192669; Tue, 04 Jul 2023 08:23:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5LFqJUrbdCfFN8OR+WqzafFQAJvj2CuY3GToA67scUedsJzetcHV7AztNkrpRBl80nbe3wdQ== X-Received: by 2002:a1c:f70a:0:b0:3fb:c060:8b3d with SMTP id v10-20020a1cf70a000000b003fbc0608b3dmr10459354wmh.40.1688484192309; Tue, 04 Jul 2023 08:23:12 -0700 (PDT) Received: from localhost (2.72.115.87.dyn.plus.net. [87.115.72.2]) by smtp.gmail.com with ESMTPSA id p23-20020a1c7417000000b003fbdd9c72aasm3895753wmc.21.2023.07.04.08.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 08:23:12 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Andrew Burgess , tankut.baris.aktemur@intel.com Subject: [PATCHv2 7/8] gdb/testsuite: remove use of sleep from gdb.base/foll-vfork.exp Date: Tue, 4 Jul 2023 16:22:57 +0100 Message-Id: <36f84df0fd365f78be0c94b8cdb382c2c272e94e.1688484032.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" While working on gdb.base/foll-vfork.exp I noticed that there are several random 'sleep' calls throughout the test. The comment suggests these are to allow for output from a vforked child to arrive, but in each case the test is about to close and restart GDB, so I don't see how random output from a child process could impact testing. I removed the sleep calls and couldn't reproduce any failures from this test, I left the test running for a couple of hours, and tried loading my machine, and the test seems fine with these removed. I've left this as a separate commit so that if, in the future, someone can show that these are required, it will be easy to revert this one patch and bring them back. There should be no change in what is tested after this commit. --- gdb/testsuite/gdb.base/foll-vfork.exp | 48 --------------------------- 1 file changed, 48 deletions(-) diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp index be0715b05c0..43fc25cc2c0 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -105,12 +105,6 @@ proc_with_prefix vfork_parent_follow_through_step { binfile srcfile } { pass $gdb_test_name } } - - # The child has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any gdb_expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc_with_prefix vfork_parent_follow_to_bp { binfile srcfile } { @@ -127,12 +121,6 @@ proc_with_prefix vfork_parent_follow_to_bp { binfile srcfile } { pass $gdb_test_name } } - - # The child has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc_with_prefix vfork_child_follow_to_exit { binfile srcfile } { @@ -149,12 +137,6 @@ proc_with_prefix vfork_child_follow_to_exit { binfile srcfile } { pass $gdb_test_name } } - - # The parent has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any gdb_expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc_with_prefix vfork_and_exec_child_follow_to_main_bp { binfile srcfile } { @@ -169,12 +151,6 @@ proc_with_prefix vfork_and_exec_child_follow_to_main_bp { binfile srcfile } { pass $gdb_test_name } } - - # The parent has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any gdb_expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc_with_prefix vfork_and_exec_child_follow_through_step { binfile srcfile } { @@ -190,12 +166,6 @@ proc_with_prefix vfork_and_exec_child_follow_through_step { binfile srcfile } { pass $gdb_test_name } } - - # The parent has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc continue_to_vfork {} { @@ -229,12 +199,6 @@ proc_with_prefix tcatch_vfork_then_parent_follow { binfile srcfile } { exp_continue } } - - # The child has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc_with_prefix tcatch_vfork_then_child_follow_exec { binfile srcfile } { @@ -261,12 +225,6 @@ proc_with_prefix tcatch_vfork_then_child_follow_exec { binfile srcfile } { pass "$gdb_test_name (followed exec)" } } - - # The parent has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc tcatch_vfork_then_child_follow_exit { binfile srcfile } { @@ -291,12 +249,6 @@ proc tcatch_vfork_then_child_follow_exit { binfile srcfile } { exp_continue } } - - # The parent has been detached; allow time for any output it might - # generate to arrive, so that output doesn't get confused with - # any expected debugger output from a subsequent testpoint. - # - exec sleep 1 } proc_with_prefix vfork_relations_in_info_inferiors { variant binfile srcfile non_stop } {