From patchwork Wed Jun 7 13:44:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 70733 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 C41B83857B98 for ; Wed, 7 Jun 2023 13:44:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C41B83857B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686145480; bh=k2WzwehysvjwCseBQAtTqGaMuALT4tk9JVxcSnOoW0o=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Jyxa1JrII88eW641g6kyAHcGUOpirKy/5UoDmwuMFq1X+k44Hhvc9IX5vbWio8ndq suUBQAy+qR9/Vn6pamYCoAGBg31obi2h/ZM+G4Ge2cDxEyMtC80U3nNObixw35wll1 LolBd4mLQVMroXRWzYGe40Kpg/OqG3rOiIOA/KJ0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id 36EF03858C54 for ; Wed, 7 Jun 2023 13:44:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 36EF03858C54 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-19f9f11ba3dso6667594fac.2 for ; Wed, 07 Jun 2023 06:44:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686145457; x=1688737457; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k2WzwehysvjwCseBQAtTqGaMuALT4tk9JVxcSnOoW0o=; b=BhkORmtj2NYzTDgTNzOiZrjlpHOJPO4ELT/SwgqhH1rV9tY4SAkpKClxCAFSYq954b z1MEkIDYf4ikrXT0B2QC0ODKfY49R6EuzU9Pmj2BslXNGSgtU3J0i8fGY3p+s7LQbWjA lGP/Ss8aoWzcs+8QX4zmybcRgw/l7SZce0stucmEfNSXJvOSEO5gxKEP8cJwQJOoCkAf TCXVvPCKX/xDlqvO0YJZ4EGplXT6pDoIxf5f6IzdPv27oAkKGVBRCVdGluukcZYygIco kjawuQE51ZGRwBnZIfFQEFY7qbVe5USw+U+NSalUAuIg6zmyzpwB4s0IMsveAburqx+K ZAow== X-Gm-Message-State: AC+VfDw1/wpCZiMj3co3mYU4vq54oiCR8QaLmxl8pQDYD3Q77jY/mEBI Toxrm6Ff5apjPjxvHgD4n4o2zksK6nrtV4eZDJadbA== X-Google-Smtp-Source: ACHHUZ4XXu07JXp4dsvde08WDRErwVdtT3d8AmcSbuWe58Eh1tQxe7F8YXNgYrqSFr2whzx8Tdj92Q== X-Received: by 2002:a05:6870:8c0d:b0:177:a158:9ef6 with SMTP id ec13-20020a0568708c0d00b00177a1589ef6mr4709009oab.52.1686145456954; Wed, 07 Jun 2023 06:44:16 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c1:fe49:e315:48d1:a728:2e0a]) by smtp.gmail.com with ESMTPSA id m25-20020a0568301e7900b006addf2a4110sm5386839otr.55.2023.06.07.06.44.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 06:44:16 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] nss_files: Tune down tst-nss-files-hosts-getent resource usage Date: Wed, 7 Jun 2023 10:44:12 -0300 Message-Id: <20230607134412.245650-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The tests creates about 4860 subprocesses, which might stress the system and generate a false-negative due timeout depending of the system load. For instance, on Ryzen 5900X on 5.19.0-43-generic without any system load $ time (nss/tst-nss-files-hosts-getent --direct) real 0m1,501s user 0m1,226s sys 0m0,275s However, if system does have some load: $ stress-ng -c $(nproc) -i 1 -m 1 --vm-bytes 128M -t 120s & $ time (nss/tst-nss-files-hosts-getent --direct) real 1m6,592s user 0m2,515s sys 0m0,389s The buffers size coverage also stresses similar code paths, so lower the maximum buffer size checked. Checked on x86_64-linux-gnu. --- nss/tst-nss-files-hosts-getent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nss/tst-nss-files-hosts-getent.c b/nss/tst-nss-files-hosts-getent.c index e52b845bb7..556347c373 100644 --- a/nss/tst-nss-files-hosts-getent.c +++ b/nss/tst-nss-files-hosts-getent.c @@ -251,8 +251,8 @@ do_test (void) FAIL_EXIT1 ("could not load " LIBNSS_DNS_SO ": %s", dlerror ()); /* Each name takes about 20 bytes, so this covers a wide range of - buffer sizes, from less than 1000 bytes to about 18000 bytes. */ - for (name_count = 40; name_count <= 850; ++name_count) + buffer sizes, from less than 1000 bytes to about 5000 bytes. */ + for (name_count = 40; name_count <= 250; ++name_count) { write_hosts ();