Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp392981lqt; Thu, 6 Jun 2024 06:54:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYruJ4/F1BMX4m+8uAm0o6KX/yVM5fQkCHEpo7njYgoQ/bFuNyT4N6kj1t8ijaJiSSjLcOQiAK6xD9VArngCq2Lbd8posmY+i/c902Yg== X-Google-Smtp-Source: AGHT+IEX+OrRk3W3PvMmeO9J6QA5OpD+0FNCsUEULKLwe9On0qUmPZHqNsmdwCPdMofLZkKusrzs X-Received: by 2002:a05:6830:20d5:b0:6f9:3938:2f5d with SMTP id 46e09a7af769-6f9436c95f2mr5827225a34.31.1717682048020; Thu, 06 Jun 2024 06:54:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717682047; cv=pass; d=google.com; s=arc-20160816; b=sjrCM2+pCI67dP0HUioStH4Lr8SIqg0P6AA3lXKzaIVi4lM/eYjrWacnFjBZfbjmma fiil0aYPyvyPnYDb1m8dlW+doAnYoPh3+y0h0AugaLV+dU647Kv7+xl8wzc3UX5QvNoC FEoDcYFgKHWFuogWFKiqS8BxoOfXPrx8eM6aUxWiiIsTQ3IFTV2jrXfwZMdYdXVgnXOv C5oEUo5D8bv6ldnw8lWbH6PdGC6bkkc3VPGEQzPNzl0TknZgahvbR3jzQalHhazdKdjO AD/z+G2TohjSvY2KhEefw6Rn9g5tieOUTWqTpDqPOL02rfALJTrp86JKMRSWaiXllpRh unXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NAmC2sHpZW/uyd30+ahP5F1fjRrkzir9nGwEyAcBFJ4=; fh=CPardtt8ThtDvd4FVGWs7NcHqaxn51hMuuyXS9lTbJ8=; b=mQlWVU2vKrEQ9s+2OewlXpLbtphDnG2q87nf0b5PM8+DqZWNfD9hARwGmzl8420T1t FfRAcAfSH3oatZ8Fnhkd7pii+AoC/KlLVhi3EPYkX/preS8FRiVypx36zfjEqzBimGQz OnUZxuYiDvjBpEH6M8fh+XTishHubSTsyGsmsjbcDadrz/wWD75oQZWYXGSFopBniEqy ZHpfTks86AUYqX4CIiRUXIyKiDZGAz7FutVkPPQ/IYF6au2jAYmdDSiQ4SVCsrP1xjoH 9CFQRTs9lkWxx9mAj+qvvv/kE5HmPvlRGNyBMaBy2EA2IlDAgdWnldxLwMlO3CwUObRv xkRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PJDibErN; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-204398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038b169dasi16208061cf.384.2024.06.06.06.54.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:54:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PJDibErN; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-204398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B50DA1C24534 for ; Thu, 6 Jun 2024 13:54:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3574319644F; Thu, 6 Jun 2024 13:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PJDibErN" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71C4C195998 for ; Thu, 6 Jun 2024 13:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717682043; cv=none; b=enmasmFFxz0htTEhehh3qrXult9Nr+FDZ8HVL2/RDdZp+StPsQx+LnOgeTHP8HythlPzpfxrY7M5uNBLB+/4Ty7EtrtPD3wZ7SsCu20c25EuSkH9aahJW4CgHYp73y/eB8PWOg1L++jo+neoz3KbDeOQFhKZJy9Ym/6l/QxlMkI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717682043; c=relaxed/simple; bh=y3GcMq9ZluqUW1sUBi+CcpJL5Dhf/CqcuOjLkAPEl0Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QlwsFEST3w8/z14DNDgyASXEQO8Zvd98LMIsfGZnHfBwaD7HVwOUPIqT62E5IBtEgU1FOli5ux0m8k+5M3NEcuPvRUFT5wTBkrXZYz1QiCUdqcoWHsR58qLHXFADMKzRGdGRgb/y+UnfewkCpzBwAeafDJoyIEA37ez8NXzAn30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PJDibErN; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717682040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NAmC2sHpZW/uyd30+ahP5F1fjRrkzir9nGwEyAcBFJ4=; b=PJDibErN0KnpITXpF13r9Pn7N72/3sm8AbSxiP1i9jX03e02C+b1XyM/I9IW1PGWMHMOaj HHTS0mP1bC9inqE9oYOTP4xg2WU4fB8frkzOk6P07ZbjJnURl+pffuv0vLDTzSi5dIMqPF lqa22M3klQx/2Gy6O0sqtJGO4o1p8us= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-416-Py2nbBFJOOOxKaczvQIzLA-1; Thu, 06 Jun 2024 09:53:54 -0400 X-MC-Unique: Py2nbBFJOOOxKaczvQIzLA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8BF6E3C025B2; Thu, 6 Jun 2024 13:53:53 +0000 (UTC) Received: from sullivan-work.redhat.com (unknown [10.22.34.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D8132166B00; Thu, 6 Jun 2024 13:53:52 +0000 (UTC) From: Ryan Sullivan To: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mpdesouza@suse.com, jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org Subject: [PATCH] selftests/livepatch: define max test-syscall processes Date: Thu, 6 Jun 2024 09:53:48 -0400 Message-ID: <20240606135348.4708-1-rysulliv@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 Define a maximum allowable number of pids that can be livepatched in test-syscall.sh as with extremely large machines the output from a large number of processes overflows the dev/kmsg "expect" buffer in the "check_result" function and causes a false error. Reported-by: CKI Project Signed-off-by: Ryan Sullivan --- tools/testing/selftests/livepatch/test-syscall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/livepatch/test-syscall.sh b/tools/testing/selftests/livepatch/test-syscall.sh index b76a881d4013..289eb7d4c4b3 100755 --- a/tools/testing/selftests/livepatch/test-syscall.sh +++ b/tools/testing/selftests/livepatch/test-syscall.sh @@ -15,7 +15,10 @@ setup_config start_test "patch getpid syscall while being heavily hammered" -for i in $(seq 1 $(getconf _NPROCESSORS_ONLN)); do +NPROC=$(getconf _NPROCESSORS_ONLN) +MAXPROC=128 + +for i in $(seq 1 $(($NPROC < $MAXPROC ? $NPROC : $MAXPROC))); do ./test_klp-call_getpid & pids[$i]="$!" done -- 2.44.0