Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp877384lqb; Wed, 29 May 2024 13:20:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgKObI+5P75YqZV4Zyl+8wsNt3exnMRXt1bnKIJ9Za4De63Luh4f1Z8+KLzGuITC7s0e8dqcfkZ0vHpTTj8BaLuwc+xnUHtZmON329Ng== X-Google-Smtp-Source: AGHT+IG+aMofTpvi3xqQvWGZQ4yTKfSenkqcKqI2oRJUAWhU4+hOPS1PHtc8yYxF4WpdDi5NJAPr X-Received: by 2002:a05:6358:650d:b0:17f:6b3f:1b0a with SMTP id e5c5f4694b2df-199b94c74c8mr244155d.15.1717014009886; Wed, 29 May 2024 13:20:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717014009; cv=pass; d=google.com; s=arc-20160816; b=cjYvVbkvv9wKgG9vNUw3eZiys20BaARJZNz0h3nkTjnk2Gq6vwdoJnduFU5pjWqpmU Zr+niQ15lsNNmRMlRgwesEQBqU6Tv8x+gAkXDlP3dUhUrj6CvkQSE5jrI6/HPcFCsVlY gRBhPr74wHNPW0Whc9LAhjPmx/BasvnM3EGFDev1ulRLronmstPy1J09GhNG3LzRBRjH TJ6bw7wh9zOwmyEZtw2Ntpq3L899miZpIKBY6CHmWY+omDaSBl83/Z1CkQx8rh3eSlmR llHd2QBMYKdGZAIRWL449YKEMjAxFP8k6h5iHvjf38iP+mkiGSBHZr5cNbuRsyE4w2H2 XVHw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=NAmC2sHpZW/uyd30+ahP5F1fjRrkzir9nGwEyAcBFJ4=; fh=CPardtt8ThtDvd4FVGWs7NcHqaxn51hMuuyXS9lTbJ8=; b=vLuSojpwEDm1BdotYoDX9A4aHU/wLgxDA8Hqkb+kij3ozo8aPIg8VyZbim+C8Ww2Xv z6qqVhO8Xs06LvYH9JQ/NW+KmAZJLG6SgKOPK36P4Z/32zD6vQWlDvMQS7XbWOWwY91f RMNuJgaLxbhqy0UmoEzs4OoSQab0LqKeYMwTtPTCfWNmyCKTGY7d6XxydXW4FHm3uz6j oAfwsBl+KR/GsE4NAY2ubse5X0HmXfmhhypqFHiAWt2KJf0i+kz/j5UC3FROHWT6Ah2I tCx+vd+JaSD7HDmBMXMtysqmlFdkw6T4/LhmRvcwriUUOpcsra2t9Xy4ZNsvXGQrIX2u Pm3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HpP7n7qw; 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-194648-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194648-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 6a1803df08f44-6ac070f335csi134885636d6.231.2024.05.29.13.20.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 13:20:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194648-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=HpP7n7qw; 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-194648-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194648-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 98DA01C21FF4 for ; Wed, 29 May 2024 20:20:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8797D1C8FAC; Wed, 29 May 2024 20:19:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HpP7n7qw" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 3F81F1C689D for ; Wed, 29 May 2024 20:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717013995; cv=none; b=TZoYavcM3tmIEBSVVlC1Ir5B/ynVnhwkNXu8rkTNSYqQIlADjxUBEsvLwIaZxel6Qa5T8jp5iSUvHLczqZjYowmjyd3um7GgTLDmClpIW1bdhsnneoQCZrIiMeSL2RoXgdtFlWrqB31eB/QmMnbXb+8udyJze4SRp+gkDhgwqIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717013995; c=relaxed/simple; bh=y3GcMq9ZluqUW1sUBi+CcpJL5Dhf/CqcuOjLkAPEl0Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VA8voI6hsxXC0ZzkZeqYr4zdihe5UfoqYfaPRgb+J0fMCEATu/MnuY6AnfchSmPXmr1P1KBwegqHRjJAY9Dq7f8XLHMTDX0q0ftLXUQedR28aZcq6egJiByMS8KkitAPyo2JKPA0iz2i5JVC6Lk8Xyq5Pluprfp2P+zYvif2In0= 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=HpP7n7qw; arc=none smtp.client-ip=170.10.129.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=1717013993; 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; bh=NAmC2sHpZW/uyd30+ahP5F1fjRrkzir9nGwEyAcBFJ4=; b=HpP7n7qwRRJHas1dqbeP0tPkFyY9CfvF5IvKEGufMStutbbmoXQWw4HGDeD6e6wTzVa5+C 8HRObPqq7her2Pkz+MA4+KuyzubSzFW5oUC0gsA0k4iPx+cEuFoP3ydFccbAnNzhKGyZJY QMiX6VkL6Qt3B0eCCuplB7O4Na881Hs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-DmCdbomkPdiGAttvQvWPfQ-1; Wed, 29 May 2024 16:19:47 -0400 X-MC-Unique: DmCdbomkPdiGAttvQvWPfQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 9E928101A52C; Wed, 29 May 2024 20:19:46 +0000 (UTC) Received: from sullivan-work.redhat.com (unknown [10.22.9.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD32AC15BB1; Wed, 29 May 2024 20:19:45 +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] tools/testing/selftests/livepatch: define max test-syscall processes Date: Wed, 29 May 2024 16:19:41 -0400 Message-ID: <20240529201941.13968-1-rysulliv@redhat.com> 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.8 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