From patchwork Mon Jan 3 17:11:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 49485 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C2663858425 for ; Mon, 3 Jan 2022 17:13:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C2663858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1641230020; bh=Ik+G7Ce+/WzOOMpI7ITPMAT8Szyk1vqmjcgMh4/No/o=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Xt7aHp9+B6JYYNWjVNPEydwtzgMaTdLT41FeWJN0L6yNp5qwLt0C7lON7qPoNlAn0 Q2pirF6Uh3GjBhm0MjXfR30f5swabICep3tDjPYpkI8ESwVFxkc4bvtaXLd+W0YQfY Hp335nLLyoqxzxvBxa4v7D2dKC9d2ytA1fZYRB0k= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5D2AC3858421 for ; Mon, 3 Jan 2022 17:11:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5D2AC3858421 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-122-BcO-X7OuP6mABygor6l2bA-1; Mon, 03 Jan 2022 12:11:22 -0500 X-MC-Unique: BcO-X7OuP6mABygor6l2bA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 045B581CCB5 for ; Mon, 3 Jan 2022 17:11:22 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C89A77E82 for ; Mon, 3 Jan 2022 17:11:21 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 3/3] elf/tst-dl_find_object: Disable subtests for non-contiguous maps (bug 28732) In-Reply-To: References: X-From-Line: 636c6da259e612258791a6e816bfc7bbfed97e3a Mon Sep 17 00:00:00 2001 Message-Id: <636c6da259e612258791a6e816bfc7bbfed97e3a.1641228666.git.fweimer@redhat.com> Date: Mon, 03 Jan 2022 18:11:19 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 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_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- elf/tst-dl_find_object.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) Reviewed-by: H.J. Lu diff --git a/elf/tst-dl_find_object.c b/elf/tst-dl_find_object.c index 21cdc0f848..2ad1924088 100644 --- a/elf/tst-dl_find_object.c +++ b/elf/tst-dl_find_object.c @@ -71,19 +71,24 @@ check (void *address, __FILE__, line, address, actual.dlfo_flags, expected->dlfo_flags); } - if (actual.dlfo_flags != expected->dlfo_flags) + if (expected->dlfo_link_map->l_contiguous) { - support_record_failure (); - printf ("%s:%d: error: %p: map start is %p, expected %p\n", - __FILE__, line, - address, actual.dlfo_map_start, expected->dlfo_map_start); - } - if (actual.dlfo_map_end != expected->dlfo_map_end) - { - support_record_failure (); - printf ("%s:%d: error: %p: map end is %p, expected %p\n", - __FILE__, line, - address, actual.dlfo_map_end, expected->dlfo_map_end); + /* If the mappings are not contiguous, the actual and execpted + mappings may differ, so this subtest will not work. */ + if (actual.dlfo_flags != expected->dlfo_flags) + { + support_record_failure (); + printf ("%s:%d: error: %p: map start is %p, expected %p\n", + __FILE__, line, + address, actual.dlfo_map_start, expected->dlfo_map_start); + } + if (actual.dlfo_map_end != expected->dlfo_map_end) + { + support_record_failure (); + printf ("%s:%d: error: %p: map end is %p, expected %p\n", + __FILE__, line, + address, actual.dlfo_map_end, expected->dlfo_map_end); + } } if (actual.dlfo_link_map != expected->dlfo_link_map) {