Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2634014rdb; Mon, 12 Feb 2024 10:59:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX3iexDcyNId2aQDSxhUKlqjy9arCu+K6MgZkbZGCQ8STtzaTK2hkx98+0Y17Ep9DhuJshIu4A8st12McAblg28EF4gMqkFZMV2+BCQyA== X-Google-Smtp-Source: AGHT+IEK0YgxWmJPMsjcw30vb5AVAVcyqRKxGp4deeZwjBwFvp3CKRtA2bR1Bv8n96NfhvSj9jNp X-Received: by 2002:a17:906:f205:b0:a3c:1603:7bc6 with SMTP id gt5-20020a170906f20500b00a3c16037bc6mr269397ejb.36.1707764355925; Mon, 12 Feb 2024 10:59:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707764355; cv=pass; d=google.com; s=arc-20160816; b=CedZChEoiHIcntFJIvHoJ3yArR3T5TdcBTN7TWOZxu3XAl9MY8+N/1cnPaFJQx8UhD IsNOuFN5TbwFC7PR5oDDJbbmkH1nLhio+xa8zS+kAW/AB2gjh5xKAwAeeQqxQX//nqiw yw32RDLma+hXOzE8GrxB14pC3zqEa0ZNrCy4ibI5R00hpx7wKRZ3qufiaX8fgXN0FPXl sdGhWT9VEcBBGLrqPxy0L1FI3smK3InHau3UpoZFhbXduJsTH/sfkRWCIuWx0L6OkBd3 ITWMNtXT+3WqSxlZwlBhdCFDdo4HGN8YB9Z0rtshFsunruF1kk66pBWXyiOFOEZ5vVj/ RBmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=/PJeKzS6BQLSmrUIcfcoDlL9jp1b7n/jV99AnuH7tUg=; fh=4eQ9Qet7Zfb46GrHc/UPoP3KbChDALFXDcV/HWifUhg=; b=xCJdQVW3Xc9ZFsBtW+ep98Rc7ZPIQRnhz21pXWbIiq2YRu9H8ZwX98dTthk4Hn9aiD ryxT97P88pOV4T7yXFQV/8tRqxkX3UPIee7LbSxxuAJHGo1ZJQbISp5wscq27hZbXGuu OV4t71o8Mkcw1yCVOiIs3T4ERbbS6RGMXatwG8jOmFDWuf8xIBoyePv0sOqxXAIbYNNz hkSaBa5Ga27jLyqiOahdMBrIYDnH+1hddmq1v+uhMn/W2yFCl7XUtBchMhw1OYf6/t6h Mls8od7WpWeyUFv3PM/7aUOIq/GYadd+eWqd4NzIgq3jF4IZpmY7Siz0/mJ47ZCcxXnk +y+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="YHdh4dJ/"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-62239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCWymuCqOVi0N53DVguBpe7pEQKN1iK1FjMMHNNgZPKha2LjGiQRNIE8M608ff0mfABCk54R/7Swq8WnKOm0EGpj5vjPHIJXZSJ+NiJ5hg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d12-20020a170906370c00b00a3be95248b9si406237ejc.174.2024.02.12.10.59.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:59:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="YHdh4dJ/"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-62239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9E40C1F24975 for ; Mon, 12 Feb 2024 18:59:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E60664174F; Mon, 12 Feb 2024 18:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YHdh4dJ/" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53BE145970 for ; Mon, 12 Feb 2024 18:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764351; cv=none; b=BY2iYOO8revn3GEBKRjOvIX3NQE8zEt/F3Re00tiAVwAo1lD09I59BWzMlLKcZzBLuXAPfvS7FxVfpVDIjjDbkXVv8PCJa/0u/U2uCUPJESKuZirTwREEiBtgrd9PbLswdD2UJa3MyGo5Ns0NXrI2PP0Gf2k10oMBmNc02b9XpY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764351; c=relaxed/simple; bh=kq2gDZXW4atNH6jHCSAioIQIj7W9ZIfsPic+NuVBLPE=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=AydlVKzQdFpBs2eRb84yV7qYV5paBj+4srUIbwUzzZGT0wX2IjVo7VCcWKmxFkHmD1C2/Pp5CXXkHq+SEHxLgtTJHBQ8PHhwreTv+y33gz4dtubSUlf5N64IiIcY9sKkzN4pIgthAX18594DkV97K+NA0/ES8wcN5ys7S/ZdjbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YHdh4dJ/; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-60753c3fab9so14583667b3.0 for ; Mon, 12 Feb 2024 10:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707764347; x=1708369147; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=/PJeKzS6BQLSmrUIcfcoDlL9jp1b7n/jV99AnuH7tUg=; b=YHdh4dJ/s9bsXLSl7WrBR9rC37y5VDpK4U/OTWW+cWUHSTHVXExGFEiuAgdOJ3kcUm TwfG5did7h015HR5xtu1TcNFBWxYu+ct5O6cf9AmB1+Hw0LQ2aoOEKPSx5qcUpf9h89f zVmRJvzEgOWKcD969EH6A2vQw4wffYbqDpE7J8dA1UTWc0RRsoIzgYikziADZ7aAfJZp EDkgmlL8DNDyhyIfams96UQ+Z5UMdZkAMTB7uusefD7SUVy/hFSZiMnLtO+/gMXcDFrJ Eh6Fx4QznsqBQip/HqXl09DYcVDZ5bHvA2v5dDpsx8xhYfIL6J2A4gH+EXnG2+C0tmFg jukQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707764347; x=1708369147; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/PJeKzS6BQLSmrUIcfcoDlL9jp1b7n/jV99AnuH7tUg=; b=ezqPk+6hqVBKalW037auT/bvOKnT7jVUsZF9NwWk59q41q20a74t/BnILCJH7EA6Oj SvpPSI7YkOoM3PKHhdM5fHOROUUMxKYfaMoUI/DYTn9Hjl+n1Tc7Ttym0NCoqe6lywwD ihqTcKVMLxTFHe6A879xWSOVpsB4Mh2sQZ/rTQcNltAmczXTgmCujz1y+4RrEuN1RzLG jCamMwjHLhRvXFGBggWQCFkFvlKHZhwPvgVn+7F0NqStg461VJgHW9MI+st6+yebR6WO XgmTbgQqYYyKYxSpXSUmow/6AfoCfgxQIA6o2FZrd0u3wVfnGbn1AxTHTdzAkYYAIYWT Tr0w== X-Forwarded-Encrypted: i=1; AJvYcCWYS1XpHZ8XKSaFFEn7zvCRLGycQLBQRrHVl4LaaBiQ5JgKMbeuDbKJ7Z14WQ50tlT26b5sgWXw5kHjjqH07ETQ/K1TX4V0i+beT3jr X-Gm-Message-State: AOJu0YwU91VjsnSS2nSiaWun6UG8M8m0sUQrWu8rwz5jJn1tOA0VuyEa SKg6cOBQ2DPRsC2J9W4kus+Kg+u0KvLC/X37LdWny3O87jOcZOorSec7IlXgVbUC/ndOLvUPly0 Io9dOuQ== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:125c:bcda:4fe2:b6e6]) (user=irogers job=sendgmr) by 2002:a81:920c:0:b0:5ff:6ec3:b8da with SMTP id j12-20020a81920c000000b005ff6ec3b8damr72459ywg.1.1707764347288; Mon, 12 Feb 2024 10:59:07 -0800 (PST) Date: Mon, 12 Feb 2024 10:58:50 -0800 Message-Id: <20240212185858.68189-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Subject: [PATCH v3 0/8] Run tests in parallel From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , James Clark , Athira Jajeev , Kan Liang , Yang Jihong , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" If command line option '-p' is provided, start/fork all tests in the main thread and then gather them in order at the end. On a laptop test time was reduced from 5 minutes 21 seconds to 1 minute 50 seconds. The option isn't default as the test shows up perf and test flakes. The '-v' option is modified so that 'perf test -v' will give verbose output only from failing tests. v3 - fix a crash if shell test directory isn't found, remove merged patch. v2 - fix parallel test output/verbose issue v1 - initial PoC Ian Rogers (8): perf thread_map: Skip exited threads when scanning /proc perf list: Add scandirat compatibility function perf tests: Avoid fork in perf_has_symbol test tools subcmd: Add a no exec function call option perf test: Rename builtin-test-list and add missed header guard perf tests: Use scandirat for shell script finding perf tests: Run time generate shell test suites perf tests: Add option to run tests in parallel tools/lib/subcmd/run-command.c | 2 + tools/lib/subcmd/run-command.h | 2 + tools/perf/tests/Build | 2 +- tools/perf/tests/builtin-test-list.c | 207 ---------- tools/perf/tests/builtin-test-list.h | 12 - tools/perf/tests/builtin-test.c | 369 ++++++++++-------- tools/perf/tests/shell/lib/perf_has_symbol.sh | 2 +- tools/perf/tests/tests-scripts.c | 257 ++++++++++++ tools/perf/tests/tests-scripts.h | 9 + tools/perf/util/print-events.c | 12 +- tools/perf/util/thread_map.c | 9 +- tools/perf/util/util.c | 19 + tools/perf/util/util.h | 8 + 13 files changed, 507 insertions(+), 403 deletions(-) delete mode 100644 tools/perf/tests/builtin-test-list.c delete mode 100644 tools/perf/tests/builtin-test-list.h create mode 100644 tools/perf/tests/tests-scripts.c create mode 100644 tools/perf/tests/tests-scripts.h -- 2.43.0.687.g38aa6559b0-goog