From patchwork Thu Sep 5 09:03:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 97140 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 81A28384F4B9 for ; Thu, 5 Sep 2024 09:04:15 +0000 (GMT) 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 ESMTP id 015623860C34 for ; Thu, 5 Sep 2024 09:03:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 015623860C34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 015623860C34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725527031; cv=none; b=hzDYnyPqCp6x3Llh68huzoDZ8fa8Zz52NUIrRe0/TVggljxg4qQrSJ21T1x33CGjKkdgdHhDpwjWOK1iVoFDInMNKuy+Hqo86q3/cd4gQ0B80KXpefnPjJBRANqdy9mtrQV2aVJWeW96kYNjNkR4JLg193EDAdbgLDgW9R7gvk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725527031; c=relaxed/simple; bh=gWQ2TgGoGsZQcbUxOhPk9W/E/WuwVFWmYFQJUhRdVCU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kdN+B2XuyTHe13Io/NMxRplWwsiiWHAOoWn2kNoRjoXOQOQf6MNy9BDROo/tnH148gjhG0r7V54pQWNgVlBhilbAQA8AZsc1NBJP60UZCoQd+gE54x0F7MWWWdEBWuDMfoEp4VzEVGGnrSwFtgaTJ7u0J6a7zGc0EaRVrNvQ+2Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725527028; 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=Zcg5uVbplBchm6UOXjCeo+GvdIdNHFgLaTF/aq26aF0=; b=ZiG/16YcbizvlmGyiyVGOVG9tM5phmPQpcTSwQsitNNhNeDckoVYRcyLsw0PZPYFdeRSle ADE0+RJ6EcMDSEZxQj5oyDQpdR8E23BH/YrRh0kdqGrI1x20eyTvanbDGxbr/NR4eRG38W Qpnc3Xi6fsyfbJh6/5z0YFeIExGUVE4= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-gaa-A45FP5in6bu5Hh0Y0g-1; Thu, 05 Sep 2024 05:03:47 -0400 X-MC-Unique: gaa-A45FP5in6bu5Hh0Y0g-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5E41A1954B16 for ; Thu, 5 Sep 2024 09:03:46 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.26]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 86E9819560AD for ; Thu, 5 Sep 2024 09:03:45 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] support: Enhance support/tst-support_descriptors compatibility Date: Thu, 05 Sep 2024 11:03:42 +0200 Message-ID: <87mskmh3pt.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-9.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_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Some container environments have different devices for /dev and /dev/null, leading to extra error output on the second line: error: descriptor 3 changed from "/dev/null" to "/dev" error: descriptor 3 changed device from 0:5 to 0:49 error: descriptor 3 changed ino from 4 to 1 The expected error matcher did not capture this before. Technically, the inode number can remain unchanged due to the changed device ID, so simply drop that check. --- support/tst-support_descriptors.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) base-commit: ed416ee402dd0d014ed55b76c3b50c4700d875e3 diff --git a/support/tst-support_descriptors.c b/support/tst-support_descriptors.c index 1e6e37a7fb..44ad152e21 100644 --- a/support/tst-support_descriptors.c +++ b/support/tst-support_descriptors.c @@ -130,9 +130,8 @@ test_run (void) expected = xasprintf ("\nDifferences:\n" "error: descriptor %d changed from \"/dev/null\"" - " to \"/dev\"\n" - "error: descriptor %d changed ino ", - free_descriptor, free_descriptor); + " to \"/dev\"\n", + free_descriptor); good = good && !support_record_failure_is_failed (); proc = support_capture_subprocess (&subprocess_changed_descriptor, NULL); good = good && support_record_failure_is_failed ();