From patchwork Thu Nov 15 07:19:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 998135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wXnf21hCz9sCQ for ; Thu, 15 Nov 2018 18:20:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="Zkh5lCfu"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42wXnd6g06zF3cX for ; Thu, 15 Nov 2018 18:20:21 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="Zkh5lCfu"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42wXmr5V7QzF3by for ; Thu, 15 Nov 2018 18:19:40 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="Zkh5lCfu"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42wXmr0Fcfz9sCQ; Thu, 15 Nov 2018 18:19:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1542266380; bh=0UoHQpBEtqYaBgZ2gLWJ+iKO540lVXV1lMN8aGlOmFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zkh5lCfucb7hf3EjwB+gAPUiItgpQdQXRob1bdrOOJrZeZWrHD1Y14DGoFzpqcjNy jg0SKRgTjlP6fzE7NPCG1WWVoTI5+xC3qP/D5zrelPaYofYC75MygCagAQAkegghKu 4wV3rvS6D+L/E+m5x9n6yRGnMkts4z5Ad6De9Dk2UNrLAqHVbiPEmIe0VhLnKmp/Zr HxMzy21IlfNHHGoZCmgYNVplQJFp3JjcKKqEG7Jsj87oVol6zsybQgok1klUyP2ugv a33THSHRErBIpa61NwmSJTzI03vq6vce4A60tr4uIxwEzaoUXuuEX7sI39fidOHodq 0Rp8hbffyIuSA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 15 Nov 2018 18:19:22 +1100 Message-Id: <20181115071929.206974-10-amitay@ozlabs.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115071929.206974-1-amitay@ozlabs.org> References: <20181115071929.206974-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 09/16] main: Fix probe() to print targets correctly X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- src/main.c | 11 ----------- tests/test_selection.sh | 43 +++-------------------------------------- 2 files changed, 3 insertions(+), 51 deletions(-) diff --git a/src/main.c b/src/main.c index 0a3a8fb..3b20bf0 100644 --- a/src/main.c +++ b/src/main.c @@ -678,8 +678,6 @@ void print_target(struct pdbg_target *target, int level) struct pdbg_target *next; enum pdbg_target_status status; - pdbg_target_probe(target); - /* Does this target actually exist? */ status = pdbg_target_status(target); if (status != PDBG_TARGET_ENABLED) @@ -708,9 +706,6 @@ void print_target(struct pdbg_target *target, int level) } pdbg_for_each_child_target(target, next) { - if (!target_selected(next)) - continue; - print_target(next, level + 1); } } @@ -720,15 +715,9 @@ static int probe(void) struct pdbg_target *target; pdbg_for_each_class_target("pib", target) { - if (!target_selected(target)) - continue; - print_target(target, 0); } - printf("\nNote that only selected targets will be shown above. If none are shown\n" - "try adding '-a' to select all targets\n"); - return 1; } OPTCMD_DEFINE_CMD(probe, probe); diff --git a/tests/test_selection.sh b/tests/test_selection.sh index 2b23ec1..8909796 100755 --- a/tests/test_selection.sh +++ b/tests/test_selection.sh @@ -13,10 +13,9 @@ do_skip () fi } -test_result 0 <