From patchwork Thu Aug 15 12:27:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 1972768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Vg2/QCTf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wl4Cq5cDDz1yNr for ; Thu, 15 Aug 2024 22:28:23 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3CE83858431 for ; Thu, 15 Aug 2024 12:28:21 +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 06871385842C for ; Thu, 15 Aug 2024 12:28:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06871385842C 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 06871385842C 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=1723724888; cv=none; b=rWNsounDqR+QmoGzR6j6lqrw63BlcYkYE48EZ5qEqrRB3GANYQmA9K/tmcIiNdRP6uDdM7Ha7np7U+6cgbRdMXGayuaWGn+Ftz0+6J+dWR88LLXHWAzBWgjMwYFmeB3nlk4FNw59tLe+Ezd/Tk723sNL+cN2XCP5cs2+Oh3uPG8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723724888; c=relaxed/simple; bh=ptUKVjbXpff/R0iYmgmGISpF3DCJ0R1lpY4DJjVgFTg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LOKy9qu2/vccRxHVri6OI/SU3plpc1JiM+n86FqWFR5OVZvXswvX5xy2jMDaen9t6DZsTCwYgdzz4oddH7WVIyRHpF+VSxEpzRWRMCKJwrOb5R76QbSGSCfTmEsaWujcBYhKeu21X+BL1+fIvYzgeA0f6AoXvJjw6lkJvQtoBgc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723724884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1cfaxnbcwS+w416vKITp783wwPQ1Ll0WQjPWkYw2xs=; b=Vg2/QCTf4rLAk0qCU32PRVPI0H7cSGij+5PWZIsUrotHcBDZHv0/mEhut+oOrEE2zKIHmf a+m4SpQbgE9p58ngYm5X8uzwcF/+qo+X0QK0gBfks18hYg0xJ12EIJtBg0RVLSI22GyNQD PPa+V4VvyA6xmYuqLNFfU9oddugdWbI= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-198-cBkGzhJGPxS_kziIZc9veQ-1; Thu, 15 Aug 2024 08:28:03 -0400 X-MC-Unique: cBkGzhJGPxS_kziIZc9veQ-1 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-4500d2fe009so14258241cf.0 for ; Thu, 15 Aug 2024 05:28:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723724882; x=1724329682; 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=m1cfaxnbcwS+w416vKITp783wwPQ1Ll0WQjPWkYw2xs=; b=Ztk1Qxs1nk7VfkCYOq6TuCe3O1CYW8SrTyUFWJPIs/14ZrJX110K56SwR/OZbYcM8t d9fCcjfkZnBVz7cL6/j6Ynyf4yYF1q8Qhkn+wbou8UzsdiicHeyKR2Eb+mgReqJylwYW QxtGBmVQkaF12suyGkMfuYRejwJctdqFhLX3lZo4tiBNbO4hOZDXCUCatmSyJhzeJdDc VB83Fwau/WQN1FCmEOeS6u6nR9O/+xSJhAnsCFDCJykOvzL0teTzjyHDo1h0SRQAWqkc yznBrq47wsopoyi8aYBP9xVqc6aPWYKFaEE2rvo9lYYIWwYsgtBmOAsTaJrh2A+lwSGb rnHQ== X-Gm-Message-State: AOJu0YxLqu0qgqeIgV5frQoqTuK0bGdZ4XtQgq5DM5L0Ld7tNwp+WEyY Oy4yOWS7je4NZ1VzdjIua/MaHkhccmTAxapeLA2rUwRLGsLVxiXp9/zCTfGGp0cPSXCBh/fNYKB AW5ro7s9xCpokzT1Dx9lIav/yPXQIV7VfJYlcM5qaLUiB7fYnOBbH/XDMrOj8kTdcMu0ERHXg9g ANDpxfPaB81Z3YazShfihbcSrqZ39gSKXJ3NnlTvRq3w== X-Received: by 2002:a05:622a:1805:b0:44f:e11c:b0d8 with SMTP id d75a77b69052e-4536784f786mr52485321cf.7.1723724882598; Thu, 15 Aug 2024 05:28:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlFjimHN9kC2L3IQ2oRUtzdP6cFkJxiwmNxBAftmR0Sbu4keIIr4Innpd40b6cFRYbHz4vVQ== X-Received: by 2002:a05:622a:1805:b0:44f:e11c:b0d8 with SMTP id d75a77b69052e-4536784f786mr52485011cf.7.1723724882240; Thu, 15 Aug 2024 05:28:02 -0700 (PDT) Received: from athas.redhat.com ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4536a0726afsm5364571cf.87.2024.08.15.05.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 05:28:01 -0700 (PDT) From: Carlos O'Donell To: libc-alpha@sourceware.org, fweimer@redhat.com Cc: Carlos O'Donell Subject: [PATCH] Report error if setaffinity wrapper fails (Bug 32040) Date: Thu, 15 Aug 2024 08:27:46 -0400 Message-ID: <20240815122756.260740-1-carlos@redhat.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-12.2 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, 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~incoming=patchwork.ozlabs.org@sourceware.org Previously if the setaffinity wrapper failed the rest of the subtest would not execute and the current subtest would be reported as passing. Now if the setaffinity wrapper fails the subtest is correctly reported as faling. Tested manually by changing the conditions of the affinity call including setting size to zero, or checking the wrong condition. No regressions on x86_64. Reviewed-by: Florian Weimer --- sysdeps/unix/sysv/linux/tst-skeleton-affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c index 31a15b3ad7..2f921ed397 100644 --- a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c +++ b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c @@ -157,7 +157,7 @@ test_size (const struct conf *conf, size_t size) if (setaffinity (kernel_size, initial_set) < 0) { printf ("error: size %zu: setaffinity: %m\n", size); - return true; + return false; } /* Use one-CPU set to test switching between CPUs. */