From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id 668EF385841E for ; Thu, 19 Jan 2023 16:31:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 668EF385841E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd30.google.com with SMTP id b127so1206089iof.8 for ; Thu, 19 Jan 2023 08:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=c5y+zgo36q5hFuwbGUu0rUPxEeON0z36nusOty+TWEc=; b=O69ASMNmewlyI0NdGu/lNFK841l14QP4GIAqNFWQEu/OgCN6TqtZlxcXaE0dz9mN3P aeKZLYVgVKxUDJUeYfsnljZPjwTA0QFp22VOAU9Ju5TPlYxcCISlCjMfaVcdge0jc2wq hFwqDXZmm4Id0bIBc2BtvoGLV+f5PEDARW8VQFd4+AUUdlR6LPDUv41APmEFjCI5KbOo Gyy7m7o/9Yw5fipu48PekhIPW/ZLvqXXyTAz18Yz3Y2qDBwalblApttj7jLdh7P0BjoD W8R452Lyb+vQ6lIUBFD1hZeIo+KFijUmbKdlHXXjfOo2Rk6TR19+5Mw8g0YkJB790LV3 cRsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=c5y+zgo36q5hFuwbGUu0rUPxEeON0z36nusOty+TWEc=; b=vMZtxpPGtWh474pl8j2O01PlaEYQ5P0dJXA3gVG9j3s7QFjqOVEvveVyAtU+KLsaAG O0D6hHhf/h39b4eRgI73kAJJI2f3u/JUtpc+Moiekyype2D445SiiG7staendAQ2F1fs dVOVc6LT++FSZg1YNiz7FjOtqqJHe/K+9ESQoAqIbmagDpS0Q/hW6N/S3/tyqrIgeMHD n7ouuj07GYt+Bp11AlhayRntzvxkQxorX1nE6oP4GyYV4L4l1LgCkGtk4crHH/jpyPEF OVN3ceckqeA6DrcHMIO1MSmsjxk1XqRQOhvIfWAhAGmTmx7nHJeIL8tVDiu32d8IAneS mBxg== X-Gm-Message-State: AFqh2krrxzh3lPCys3WYZXTBeSnv63OwYsakqxPyJoBFNDLP2ZnzmEWs Zwk0/1Pk2Hf2K2sZifMfavG+H0dmWZtmaAWA X-Google-Smtp-Source: AMrXdXs10JrLhMUnLqLWiO/xiMM8rWPQJdt5EkcxDYAEWQJFMdRSRmGPH/yFnoDikmiUNwWTUFUVlQ== X-Received: by 2002:a6b:e206:0:b0:6ea:558f:6e4b with SMTP id z6-20020a6be206000000b006ea558f6e4bmr8363514ioc.19.1674145917564; Thu, 19 Jan 2023 08:31:57 -0800 (PST) Received: from localhost.localdomain (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id b20-20020a5d8914000000b006d8b7bcaa6esm12537905ion.4.2023.01.19.08.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 08:31:57 -0800 (PST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Make gdb.ada/ptype_tagged_param.exp pass Date: Thu, 19 Jan 2023 09:31:50 -0700 Message-Id: <20230119163150.492922-1-tromey@adacore.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 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: gdb.ada/ptype_tagged_param.exp is failing for me on x86-64 Fedora 36. However, it's actually generating the correct output -- it is just that the test thinks that the "ptype" will not work because I do not have the GNAT debuginfo installed. This patch changes the code to accept either result, and then to issue a kfail as appropriate. --- gdb/testsuite/gdb.ada/ptype_tagged_param.exp | 42 +++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp index 0050d60a0f2..eaf61ddde79 100644 --- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp +++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp @@ -31,23 +31,27 @@ if {![runto "pck.adb:20"]} { return -1 } -# Identifying the runtime type of S can only be done when we have the debug -# info for the GNAT runtime. - -if { $has_runtime_debug_info } { - gdb_test "ptype s" \ - [multi_line \ - "type = new pck.shape with record" \ - " r: integer;" \ - "end record"] \ - "ptype s, with debug info" -} else { - gdb_test "ptype s" \ - [multi_line \ - "type = tagged record" \ - " x: integer;" \ - " y: integer;" \ - "end record" ] \ - "ptype s, without debug info" +# With some versions of the compiler, identifying the runtime type of +# S can only be done when we have the debug info for the GNAT runtime. +set ordinary [multi_line \ + "type = new pck.shape with record" \ + " r: integer;" \ + "end record"] +set nodebug [multi_line \ + "type = tagged record" \ + " x: integer;" \ + " y: integer;" \ + "end record"] + +gdb_test_multiple "ptype s" "ptype s" { + -re -wrap $ordinary { + pass $gdb_test_name + } + -re -wrap $nodebug { + if {$has_runtime_debug_info} { + kfail "no debug info" $gdb_test_name + } else { + fail $gdb_test_name + } + } } - -- 2.38.1