From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 46914384FB77 for ; Tue, 28 Feb 2023 11:32:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46914384FB77 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677583927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=paipShHyUfZlbRzYGGCMPdJBc5LzAwwWSVnNbKvBI8k=; b=SpRGXR9cfX+qumIxsIcFg8cJuMNWWW71aGGfXAm1TM58128FSHxcCery5d2k6sUshL4KS6 3tUYVzPnTpWH4wGLlCteFoAYn2KyUN4ZQaW6+K0AnTMORiq+IDdTeHeRZrvcR6FAXygKfu uJeUzYCNKiWM+GroPxF7lP4NIa+B4tE= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-269-k8ZR1QK5NMyYqrKLYWdQnA-1; Tue, 28 Feb 2023 06:32:06 -0500 X-MC-Unique: k8ZR1QK5NMyYqrKLYWdQnA-1 Received: by mail-qk1-f197.google.com with SMTP id d10-20020a05620a240a00b0073baf1de8ebso5790348qkn.19 for ; Tue, 28 Feb 2023 03:32:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677583926; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=paipShHyUfZlbRzYGGCMPdJBc5LzAwwWSVnNbKvBI8k=; b=SeePE3jAKWfdKH9ItjJa+I4gYJw33UXqXpNoxz7vO9pkPMpVLh1vvpYIgLUXrL1zyj h7Kx5tOpj9GRh/MhTG35szACHQP4MCHkeQEIoOjiDIq1U+8bU8pnF2j6ZcZrfoz2e32a m5/hvnJ1BRiX6sk90QYVRv2biEBWaaM2a33mNZaickPoVo5w8MMJF4vbSZeqMw6qg2PH E3f+FSHMEsqBM8oEEC3dOWeWeG4dIN9moOvl7ac53P5NVuLmxq/0i7lKwtOKulBG6pDF TEV7LUa2ExA6bHsNV2s4Bc/Pgi8kZjIl3YgBgUtraQA+u8pGqo9F45cQlt4OihNBiIPo Zb1Q== X-Gm-Message-State: AO0yUKUv7ww6lGrV12TdY/k17d/H8DcKw80OIRu2TeXmGecCmQWh8o8x pGhFcO3RtY19jF+piOEjRDpyPpTbhmgDQoiIVBlc1XQmiMpHN7pasFP5DklAxgDSjOlitGPWP/7 eqb7wT8jrfnReswUrMBHx4jJa0Lk/BzwHxE5mDk+Lci1tSAm3racRaIZr7WA5xtayaLX1y/aI6A == X-Received: by 2002:a05:622a:654:b0:3b8:6a20:675e with SMTP id a20-20020a05622a065400b003b86a20675emr4148017qtb.29.1677583926141; Tue, 28 Feb 2023 03:32:06 -0800 (PST) X-Google-Smtp-Source: AK7set98pW2JH64c8pgnZmOgoxAUIdDY1kk6OxLiPHwgVsfFi9GR9aTjbPKvDjYE7tPr38lfH3C/nA== X-Received: by 2002:a05:622a:654:b0:3b8:6a20:675e with SMTP id a20-20020a05622a065400b003b86a20675emr4147993qtb.29.1677583925864; Tue, 28 Feb 2023 03:32:05 -0800 (PST) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id 189-20020a3708c6000000b0073b27323c6dsm6562676qki.136.2023.02.28.03.32.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 03:32:05 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id A3A95581C79; Tue, 28 Feb 2023 12:32:03 +0100 (CET) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH, applied] abipkgdiff: Emit error when no vmlinux is found in debug package Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Tue, 28 Feb 2023 12:32:03 +0100 Message-ID: <87fsaqrpos.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.7 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_H2,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 List-Id: Hello, When given linux kernel packages to analyze using DWARF, the tool expects the (uncompressed) vmlinux binary to be found in the debug info package. This patch emits an error message when no vmlinux binary is found in the debug info package in that case. * tools/abipkgdiff.cc (compare_prepared_linux_kernel_packages): When no vmlinux binary is found in the debug info package, emit an error message. Signed-off-by: Dodji Seketeli --- tools/abipkgdiff.cc | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc index 8383ae98..a4b4f1a1 100644 --- a/tools/abipkgdiff.cc +++ b/tools/abipkgdiff.cc @@ -3107,11 +3107,25 @@ compare_prepared_linux_kernel_packages(package& first_package, string vmlinux_path1, vmlinux_path2; - if (!get_vmlinux_path_from_kernel_dist(debug_dir1, vmlinux_path1)) - return abigail::tools_utils::ABIDIFF_ERROR; + if (!vmlinux_path1.empty() + && !get_vmlinux_path_from_kernel_dist(debug_dir1, vmlinux_path1)) + { + emit_prefix("abipkgdiff", cerr) + << "Could not find vmlinux in debuginfo package '" + << first_package.path() + << "\n"; + return abigail::tools_utils::ABIDIFF_ERROR; + } - if (!get_vmlinux_path_from_kernel_dist(debug_dir2, vmlinux_path2)) - return abigail::tools_utils::ABIDIFF_ERROR; + if (!vmlinux_path2.empty() + && !get_vmlinux_path_from_kernel_dist(debug_dir2, vmlinux_path2)) + { + emit_prefix("abipkgdiff", cerr) + << "Could not find vmlinux in debuginfo package '" + << second_package.path() + << "\n"; + return abigail::tools_utils::ABIDIFF_ERROR; + } string dist_root1 = first_package.extracted_dir_path(); string dist_root2 = second_package.extracted_dir_path(); -- 2.39.2 -- Dodji