From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rm0LKI31J2alkDkAWB0awg (envelope-from ) for ; Tue, 23 Apr 2024 13:53:17 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bUl6ZqwC; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 905831E0C0; Tue, 23 Apr 2024 13:53:17 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 751C01E092 for ; Tue, 23 Apr 2024 13:53:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EEBD0384AB5F for ; Tue, 23 Apr 2024 17:53:14 +0000 (GMT) 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 06444385840D for ; Tue, 23 Apr 2024 17:52:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06444385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 06444385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713894776; cv=none; b=tmt2gpetUMewAOEePdfBLuScVBvtmW88HJi3J2SED5vMdlxhvi68dtBlptHfDdzXBJxLjQYTBXhfYXbrYf2BMWN6/xTvcCBwXtsVehpzBUpU7A831OUYoNvTQzR7sPiWRhSBS6JgpANxPGZKxWRAY7lK0BkXLXvCElJRGbI7K/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713894776; c=relaxed/simple; bh=AVyToBifanznki4mFSqWRDIVpucyOUDUAeQ/0Mqy4RU=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=RboEaD+b3/X2BZAiEKPaoqWzvJAbuRnhJDCQncK+rMo5gKl1PgqcnvWm+8bkb5L12PQYg2czkiMvjMXrw0rt+nN2KbkILhR2OtzpYUTVz62AxP9/mqx8SMR/g8PDclGOajiwIME+qacf7Z3iqYVVvwWM9Lb897EFslsMp/IFjKQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713894773; 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=8Yl+NjtLEiVOqhbd/NLQ/zTh3ErG84Ldd1uMUXWGWMs=; b=bUl6ZqwC2yxWSQ0k6nsG6rErySRR6KtiShpuF2V1DvHM/u7jpbCVs2PefDWlo1wXfl/ZGU 6he0ZPuzIXZ62D2EYVi0ryWDwbsimuwVs+0nfZmXIO8uZhEipZG6kXf+eZHKayuGGiTc1m S3+m1f2UM/khi8Xx2Wu3uTtI2mhulpE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-VYjpsvSsMDOvN2-27EZ3Cw-1; Tue, 23 Apr 2024 13:52:49 -0400 X-MC-Unique: VYjpsvSsMDOvN2-27EZ3Cw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F217810431; Tue, 23 Apr 2024 17:52:49 +0000 (UTC) Received: from f39-zbm-amd (unknown [10.22.16.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1ED1440C5C2; Tue, 23 Apr 2024 17:52:49 +0000 (UTC) Date: Tue, 23 Apr 2024 10:52:47 -0700 From: Kevin Buettner To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org, Luis Machado Subject: Re: [PATCH v3 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp Message-ID: <20240423105247.798dc561@f39-zbm-amd> In-Reply-To: <20240422230700.1173173-3-thiago.bauermann@linaro.org> References: <20240422230700.1173173-1-thiago.bauermann@linaro.org> <20240422230700.1173173-3-thiago.bauermann@linaro.org> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On Mon, 22 Apr 2024 20:07:00 -0300 Thiago Jung Bauermann wrote: > +set saw_watch_trigger 0 > +set saw_function 0 > +set is_supported 1 > +set message "continue until memcpy watchpoint hits" > +set watch_trigger \ > + [multi_line \ > + "Continuing\\." \ > + "" \ > + "(Hardware w|W)atchpoint ${decimal}: -location b\\\[28\\\]" \ > + "" \ > + "Old value = 101 'e'" \ > + "New value = 114 'r'"] > +gdb_test_multiple "continue" $message { > + -re $watch_trigger { > + set saw_watch_trigger 1 > + exp_continue > + } > + -re ".*memcpy.* \\(\\) at .*:$decimal\r\n" { > + set saw_function 1 > + exp_continue > + } > + -re ".*memcpy.* \\(\\) from .*libc\[^\r\n\]+\r\n" { > + set saw_function 1 > + exp_continue > + } > + -re "in \\?\\? \\(\\) from .*libc\[^\r\n\]+\r\n" { > + set is_supported 0 > + unsupported "symbol for memcpy not found" > + exp_continue > + } > + -re "$gdb_prompt $" { > + if { $is_supported } { > + setup_kfail breakpoints/31665 arm*-*-linux* > + gdb_assert { $saw_watch_trigger && $saw_function } $message > + } > + } > +} For this test, on Fedora 39 x86_64 without glibc debuginfo, I see: continue Continuing. Hardware watchpoint 3: -location b[28] Old value = 101 'e' New value = 114 'r' 0x00007ffff7e34b19 in __memmove_avx_unaligned () from /lib64/libc.so.6 (gdb) FAIL: gdb.base/memops-watchpoint.exp: continue until memcpy watchpoint hits When I run it on Fedora 39 x86_64 w/ glibc debuginfo, I see the expected PASS: continue Continuing. Hardware watchpoint 3: -location b[28] Old value = 101 'e' New value = 114 'r' __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:226 226 VMOVU %VMM(1), -VEC_SIZE(%rdi,%rdx) (gdb) PASS: gdb.base/memops-watchpoint.exp: continue until memcpy watchpoint hits I think you can fix the FAIL for the no-glibc-debuginfo case by tweaking the RE in the same way that you did for the memmove test. I also have Fedora 39 (Asahi Remix) running on an M1 macbook. When I try this test on that machine, I see some timeouts... (gdb) watch -location a[28] Hardware watchpoint 2: -location a[28] (gdb) PASS: gdb.base/memops-watchpoint.exp: set watch on a watch -location b[28] Hardware watchpoint 3: -location b[28] (gdb) PASS: gdb.base/memops-watchpoint.exp: set watchpoint on b watch -location c[28] Hardware watchpoint 4: -location c[28] (gdb) PASS: gdb.base/memops-watchpoint.exp: set watchpoint on c continue Continuing. Hardware watchpoint 2: -location a[28] Old value = 104 'h' New value = 0 '\000' __GI___memset_generic () at ../sysdeps/aarch64/memset.S:67 67 tbz count, 5, 1f (gdb) PASS: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits continue Continuing. FAIL: gdb.base/memops-watchpoint.exp: continue until memcpy watchpoint hits (timeout) continue FAIL: gdb.base/memops-watchpoint.exp: continue until memmove watchpoint hits (timeout) testcase /ironwood1/sourceware-git/macbook-review/bld/../../worktree-review/gdb/testsuite/gdb.base/memops-watchpoint.exp completed in 20 seconds === gdb Summary === # of expected passes 4 # of unexpected failures 2 Is this demonstrating the bug (31484) ? Kevin