From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 192AE3849AF1 for ; Wed, 24 Apr 2024 17:05:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 192AE3849AF1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 192AE3849AF1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713978343; cv=none; b=MShbyZM5KyGnEO+WWCixTq00PZFYxC/dINyl6wmH06YNEO1NPHT2Ey81j1av+Zd9Eg//LD2kViGoZYqSAi9jWu+uj3VLV3dD0ZihsIlK1XA8OP6Al3NSjKNMixDhG00lmFr9Yr6ECJAsRG2aiKK7Bn3a+6tmr2tomwi1y4h8Plk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713978343; c=relaxed/simple; bh=XIdJftKTIIpAI2sQn1RHFVN9lgWd/ezMQtBdPyIrTP8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YwFhltLkeTnS4tNuyoQjKQXZBK5Bs/ReaX+KKT6FAprxmRCcXESf3uztAIIdTYaEa/aSiPR3bjiCN1gVD/zRFw9xR/s4RoOmepsY2EAr6GbldlZugYp7kgLBR9UhXPZrEf314BH75jQvwalvp+swvM0qZHwIG+IgEG6e1z+u7tY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6ee0642f718so921013b3a.0 for ; Wed, 24 Apr 2024 10:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713978335; x=1714583135; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Pj3Ke5rcEcLcGXM49q2c/bZ3rpLxHDFkO5HZGI5701Y=; b=BASjUu+KW6CuO0dn97OIcWldwgG8qFG3zLaQEWUJGekirErblNS3gXC2alNZGFCDlE zjt5bwn/P2YyYIu9J47Vy6IilnwOJjtOwFPfytvBQauxPJyyPNgTeZQ9tVshRZdapjGW o4b8eVeY3euvhiNJkS/0KyMepPHwe0OA0swtM19LDmXxvE0eswfLJUNOrWpXW8onuj1x KUwGopoJ/CqDpap1ezlFuwYy5t/WSg+QiUXCZeHuZfuil1z97gVn0Nvl4zGObOv344mX RBwEf9ionqkVhLMeZT5Wem3dMN3eevrZxuJ759uemIOpyv4up16raFw8WBDhBvhr2CMP 3t+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713978335; x=1714583135; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Pj3Ke5rcEcLcGXM49q2c/bZ3rpLxHDFkO5HZGI5701Y=; b=fB0uAxZ4dFaRLUS9ZZ5A3amY0Lmaq3z4T62BVQZNQ9cpdeXd/9H9bC1dxslsxQ//UU OyGuqiI2QVXzQm63XFpmyHKP1pv43Iuglqr4lH7bQ2vJOa3zh26T1HYz7DIE9KKWGACQ RxTq8JmRZt66VbC2F/rRREnWMvd3ycxXayBTV8v1j3gUosIwfq2BSug0/StSPGgYUtaH MrntQcf/mcP+o79dV9FKtcrNXkZU/WHEm2W9AVubkYmvfzNifARf+q+hYlJ6zsG8Ivds 7mb4BWndS6Ayq7+uzmfAtRu8PnU8EUp22IW3+sE1ArYrlFspQBCLvz1u1AWebLTwesNw OapQ== X-Gm-Message-State: AOJu0YyAQex9bJhK/S/1yZEN303QmA24ALUllmMztaQnIBonYNPeZqkc hyK6OP3joOnC+u56sfSz+9jvX9Kc02B89al0H6XNPa/sAxIgAEtkAnFn7usNpyg= X-Google-Smtp-Source: AGHT+IFGqYa2+w78Gq4qT3Hw/Gs5HfcScink8iQWUIoytfEFlLl92y07EM/DTc9ILCPZDmhn/mkP6Q== X-Received: by 2002:a05:6a21:3945:b0:1a3:a821:f297 with SMTP id ac5-20020a056a21394500b001a3a821f297mr317662pzc.2.1713978334837; Wed, 24 Apr 2024 10:05:34 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:b65d:315b:9fcb:d747]) by smtp.gmail.com with ESMTPSA id k63-20020a638442000000b005fd88b393b4sm6731246pgd.59.2024.04.24.10.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:05:34 -0700 (PDT) From: Thiago Jung Bauermann To: Kevin Buettner Cc: gdb-patches@sourceware.org, Luis Machado Subject: Re: [PATCH v3 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp In-Reply-To: <20240423105247.798dc561@f39-zbm-amd> (Kevin Buettner's message of "Tue, 23 Apr 2024 10:52:47 -0700") References: <20240422230700.1173173-1-thiago.bauermann@linaro.org> <20240422230700.1173173-3-thiago.bauermann@linaro.org> <20240423105247.798dc561@f39-zbm-amd> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Wed, 24 Apr 2024 14:05:31 -0300 Message-ID: <87cyqe3d44.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: Kevin Buettner writes: > 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. That's true. Thanks! I'll make the change for v4. > 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) ? Hm. Probably. I haven't seen this behaviour in my tests. It's hard to say why GDB hung. Can you try to "set debug infrun on" at that point? diff --git a/gdb/testsuite/gdb.base/memops-watchpoint.exp b/gdb/testsuite/gdb.base/memops-watchpoint.exp index 4005b1eecf85..5920608453a4 100644 --- a/gdb/testsuite/gdb.base/memops-watchpoint.exp +++ b/gdb/testsuite/gdb.base/memops-watchpoint.exp @@ -82,6 +82,8 @@ gdb_test_multiple "continue" $message { } } +gdb_test_no_output "set debug infrun on" + set saw_watch_trigger 0 set saw_function 0 set is_supported 1 -- Thiago