From patchwork Fri Aug 27 22:02:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kacur X-Patchwork-Id: 503576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2772C4320E for ; Fri, 27 Aug 2021 22:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B99B060FD8 for ; Fri, 27 Aug 2021 22:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232132AbhH0WDx (ORCPT ); Fri, 27 Aug 2021 18:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232131AbhH0WDw (ORCPT ); Fri, 27 Aug 2021 18:03:52 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D7EC0613D9 for ; Fri, 27 Aug 2021 15:03:03 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id s15so3155019qta.10 for ; Fri, 27 Aug 2021 15:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cP6N1VaiptIb9vw6Af18mwruH8OZKwMeAZ6m8vHjhms=; b=gBrS3jVykkX/2KvjfEcCRCLe75q5j6wi0PFdEoZhrOwWMIvdkXEvDsPURizsYibFzT Bf6RNMeH6lg0bpwFpvRrshANtw/n5KT4PnZmadO/pTf7ZhjsHSJQwpFRzIy9X+s/ZpG+ XBUb91nT91HfSnaHjUP8H55+zA0i5VpPBemu4jJP3qlQ/Ocjad9LVpXuRCiHOTr8hsIF iLwKfEz5nV1ASFQnU9R5DFt5ztX0TFxksknkRvQKcdEP/6j0ATbsx917uRtF1/66AmHT FlzlrxgtxR2tv4h+FOoL2wQ4vnmgH/m89la5UMPSQqjlgSDI3ruC2htX3fQzY+Kv9SB9 /5ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=cP6N1VaiptIb9vw6Af18mwruH8OZKwMeAZ6m8vHjhms=; b=Ad/Syi/xkckMAP8+73XWdyK89ZdN6dXX8DphnYSgKeWRtYim0by/iiNenGq17Unlij FGMUXIXVsidmNT7plZrZEHNtjIEIwbYF21UfwknPAnNeDo7xn7+gZN4oFz8leypduBBE GL5Kb8ehvmr9UG2wOqfgSQ6B3iORqm4z3nCpVlLTxjuAjxiFA5R+LEc7a06DDKvKXjvM KdF3Xx4YSJv2EUbBapJC6f7tubjMSwq02Of/06S6hf3GMDS6NKoWtPYKdKm4TLa7C9rS tCPIN8FqhjfDBo0O7mZh7m0Ipa3xCuO0qnoT12xYVFRjFDmrG80t+cH9weTWJY6+1Mj9 vbpw== X-Gm-Message-State: AOAM533zMF+ezCovfda9tAIXa/6bZU64WkaDyABy3dpQptwfdSZPjavB aL5KTqwrVntKOLWyqUnV/BA+URABmlY2Jw== X-Google-Smtp-Source: ABdhPJzSmECvYx75Z0xBS+PXiKylZgljhcw8fjkVQohyjqYuvPsQCNa+DRTT/+QlgW5EnOSyMRehLw== X-Received: by 2002:ac8:4b43:: with SMTP id e3mr10527532qts.312.1630101782209; Fri, 27 Aug 2021 15:03:02 -0700 (PDT) Received: from localhost.localdomain (bras-base-rdwyon0600w-grc-09-184-147-143-99.dsl.bell.ca. [184.147.143.99]) by smtp.gmail.com with ESMTPSA id t64sm5659209qkd.71.2021.08.27.15.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 15:03:02 -0700 (PDT) Sender: John Kacur From: John Kacur To: RT Cc: Clark Williams , John Kacur Subject: [PATCH 1/8] rt-tests: deadline_test: Move va_start forward Date: Fri, 27 Aug 2021 18:02:37 -0400 Message-Id: <20210827220244.24210-2-jkacur@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210827220244.24210-1-jkacur@redhat.com> References: <20210827220244.24210-1-jkacur@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org If open_cpuset fails then we return without calling va_end Fixing this by moving the call to va_start after that. Signed-off-by: John Kacur --- src/sched_deadline/deadline_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c index a48c231c1281..e89654d976f2 100644 --- a/src/sched_deadline/deadline_test.c +++ b/src/sched_deadline/deadline_test.c @@ -728,12 +728,12 @@ static const char *make_cpuset(const char *name, const char *cpus, int *pids; int i; - va_start(ap, flags); - fd = open_cpuset(path, "tasks"); if (fd < 0) return "open tasks"; + va_start(ap, flags); + ret = 0; pids = va_arg(ap, int *); From patchwork Fri Aug 27 22:02:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kacur X-Patchwork-Id: 503575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 290F4C432BE for ; Fri, 27 Aug 2021 22:03:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13F8860F91 for ; Fri, 27 Aug 2021 22:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232144AbhH0WDy (ORCPT ); Fri, 27 Aug 2021 18:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232135AbhH0WDx (ORCPT ); Fri, 27 Aug 2021 18:03:53 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42052C06179A for ; Fri, 27 Aug 2021 15:03:04 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id 14so8804948qkc.4 for ; Fri, 27 Aug 2021 15:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jWD/iLRg8IOsuY/XgnJcGRTA86lMIig+tN/mK0ghb3c=; b=P6J4SsMUHcn6CcfuvBj51Zgkz4yPHc3aPTpzIAnUL3ElmcDniz+81jN0LOcEDi0pp5 ZWjXBifFeVVujLuUF/tlqu3xRcWw4/1ArqKK1mw2mg2UzH60DC1erZ3xNYgHsFCOxu3G 7Vnhc9LwltDwULga+Ez+vHHQeu9Lky2G1Wkex09YIxx4p16giOgMQW4OBKy858NB51c0 3diT9F9nOzXaGJdxzj9ZR7YwOXTyp7eg26JDxG8iSzF5Vk236NdRgL0891rMQm2c1+sG 7oWFzYjJQiTZ+T/2g2bp8ddmqFTk/lq2rlUsfqg6DOKk8iVHdNtQdyRxnAWxqAAb8k2r iIqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jWD/iLRg8IOsuY/XgnJcGRTA86lMIig+tN/mK0ghb3c=; b=VkIvRUMnq3jnBaRlSQDk2c1gBJPt58YVbvmStBT1pYOFmdJJjKn7N6hq6mLc52roq7 1adFydFKYdysLrR0xSszsciWxQ/RWFbYLaWt6aCisyWkjq5qxa9twTKGHLOx99krbNlZ W51HAUfxrkpbCGTUDaaBKnltnDkSYA+VMPVVVnYeKMhXva9PVQJV4gcoD/LmkUfeSTnC NjwUQVIUrFQvEilybkPEeoRN8YH/1rAeK3q9BYAPZ2y4iG5L+9zWfFzqERquwDdGbU6d MUlwROaHljSORJRAKJwPqVnxQcdso/BDllbdPj44pmQW9sl1WP+xee/SC4uaJNRnKk2B PeYQ== X-Gm-Message-State: AOAM533nTjppctSG6yGGNbrVwOqwVVOAvBdfcsrqHkf9fuumV98v0Cux sstDnvEUDCjmS9VKfVOmRUjk7uYidEfmKw== X-Google-Smtp-Source: ABdhPJy6BYGQFNpq3oJW34Tshnz2gWJIwSb4dnKJfnB5G8dN+08jhyMgfH3io0s7g19gfiOpFNNoag== X-Received: by 2002:a05:620a:941:: with SMTP id w1mr10919106qkw.434.1630101783337; Fri, 27 Aug 2021 15:03:03 -0700 (PDT) Received: from localhost.localdomain (bras-base-rdwyon0600w-grc-09-184-147-143-99.dsl.bell.ca. [184.147.143.99]) by smtp.gmail.com with ESMTPSA id t64sm5659209qkd.71.2021.08.27.15.03.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 15:03:03 -0700 (PDT) Sender: John Kacur From: John Kacur To: RT Cc: Clark Williams , John Kacur Subject: [PATCH 3/8] rt-tests: ptsematest: Remove deadcode Date: Fri, 27 Aug 2021 18:02:39 -0400 Message-Id: <20210827220244.24210-4-jkacur@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210827220244.24210-1-jkacur@redhat.com> References: <20210827220244.24210-1-jkacur@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org Remove deadcode from ptsematest.c Signed-off-by: John Kacur --- src/ptsematest/ptsematest.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c index 821e58428e6d..e000c3017081 100644 --- a/src/ptsematest/ptsematest.c +++ b/src/ptsematest/ptsematest.c @@ -58,7 +58,6 @@ struct params { void *semathread(void *param) { int mustgetcpu = 0; - int first = 1; struct params *par = param; cpu_set_t mask; int policy = SCHED_FIFO; @@ -92,11 +91,6 @@ void *semathread(void *param) if (mustgetcpu) par->cpu = get_cpu(); } else { - /* Receiver */ - if (!first) { - pthread_mutex_lock(&syncmutex[par->num]); - first = 1; - } pthread_mutex_lock(&testmutex[par->num]); /* ... Got the lock: End of latency measurement */ From patchwork Fri Aug 27 22:02:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kacur X-Patchwork-Id: 503574 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94F6EC43214 for ; Fri, 27 Aug 2021 22:03:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B37760EFE for ; Fri, 27 Aug 2021 22:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232158AbhH0WD4 (ORCPT ); Fri, 27 Aug 2021 18:03:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232153AbhH0WDy (ORCPT ); Fri, 27 Aug 2021 18:03:54 -0400 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63E9AC0617A8 for ; Fri, 27 Aug 2021 15:03:05 -0700 (PDT) Received: by mail-qv1-xf2d.google.com with SMTP id p17so495067qvo.8 for ; Fri, 27 Aug 2021 15:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hp4ZZsw1Noa8/9+Tc8sctppvmPKGnVsDrkiRA1Bywsk=; b=BA7nXAxD6V9T0I/5B9wovVxH1CG78VbczlAcwCVAZMGfnxYtXA3w6nyRwuo8HxpSFz UCUm2LUlU5WrKY+AkRDcmOgFT1G5dNIOw6okmNZGaB4uAqNRumgmwCRX+Av5i4TTg4pS +NJJQ+Ro4jbPYBkI1BIncuYoAxiCIZi4Vi9CzN4cBZcVN8FM3uq3+Q0EMj8YLZPx5iHO SLiUzeqgXS1SVijzrtEp+qTe2865ZD92jGlUlK7lzVKUnUnH2dvTgx0sol4nxd3vmH8O aAPGh1bcS/EJusMtsiy7cMILQ3vsnwIm6e44nrkalnXe5bWXJ/wqYh56GSprxnYnj86s zjOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Hp4ZZsw1Noa8/9+Tc8sctppvmPKGnVsDrkiRA1Bywsk=; b=Of8kNZHmlEeayeSgeZyiG8EpXOiTXSrH+VTniozfjukvsQT3AtQ1XJtESQ82EgheYE Fo2IDZY24y7xDTgvU98l2pKO3iwvRpDYWYGm3PHN2TqUotjeCGYWaaKpYcGwuQDmZsFr QlkgTMj+rC+izfTvx88KXUIyYgMUID0auHfmOolstq285ewzlX7mVKIqgZDJQgNB3Opq hQZM0cyU+rktqzHe2UY37wit2aSpeAHVDamFS92fsq2hcoyZdmkTm1P6YJXzsBhA33Ox GuepWnpoH7ODP7Eqz3IjxCXF/z2L/SFDMpLZJGBoLlgHdn0yJj/2GE2D08cQAgtF6uZ6 F8lA== X-Gm-Message-State: AOAM5322h5DqWcKJit23R+ANAcwIDdptL+kE+KW5K1BxsjvL5+jLLZ87 u40vleq2vLf8QyPL6HVvwVPZx3UNIyG8xA== X-Google-Smtp-Source: ABdhPJzvVQu5ZAoT7KLHUsFW3QCoUjCnWhupJh6Fyk9hQSXWvT39VbGv8pdjmFOTdedndDuI/sItAQ== X-Received: by 2002:a0c:fe6a:: with SMTP id b10mr11925750qvv.6.1630101784555; Fri, 27 Aug 2021 15:03:04 -0700 (PDT) Received: from localhost.localdomain (bras-base-rdwyon0600w-grc-09-184-147-143-99.dsl.bell.ca. [184.147.143.99]) by smtp.gmail.com with ESMTPSA id t64sm5659209qkd.71.2021.08.27.15.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 15:03:04 -0700 (PDT) Sender: John Kacur From: John Kacur To: RT Cc: Clark Williams , John Kacur Subject: [PATCH 5/8] rt-tests: pip_stress: Add missing paramater in error message Date: Fri, 27 Aug 2021 18:02:41 -0400 Message-Id: <20210827220244.24210-6-jkacur@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210827220244.24210-1-jkacur@redhat.com> References: <20210827220244.24210-1-jkacur@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org Add missing string __func__ in error message Signed-off-by: John Kacur --- src/pi_tests/pip_stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pi_tests/pip_stress.c b/src/pi_tests/pip_stress.c index 8b91578f9ab8..c6d2bae05035 100644 --- a/src/pi_tests/pip_stress.c +++ b/src/pi_tests/pip_stress.c @@ -254,7 +254,7 @@ long process_shared_mutex_available(void) res = sysconf(_SC_THREAD_PROCESS_SHARED); if (res == -1) { int err = errno; /* save the error number */ - err_msg("%s: sysconf(_SC_THREAD_PROCESS_SHARED): "); + err_msg("%s: sysconf(_SC_THREAD_PROCESS_SHARED): ", __func__); err_exit(err, NULL); } #else From patchwork Fri Aug 27 22:02:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kacur X-Patchwork-Id: 503573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BACEBC432BE for ; Fri, 27 Aug 2021 22:03:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FAF060F91 for ; Fri, 27 Aug 2021 22:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232173AbhH0WD5 (ORCPT ); Fri, 27 Aug 2021 18:03:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232167AbhH0WD4 (ORCPT ); Fri, 27 Aug 2021 18:03:56 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0774C0613D9 for ; Fri, 27 Aug 2021 15:03:06 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id a5so4897806qvq.0 for ; Fri, 27 Aug 2021 15:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MUca3HO8QgKoQBjsRo9MxV9y3SE6HnfPoqAnvwRduTU=; b=uLTdFybgSJ+2vVflRfN3KQbYdkt56SLnxJsGqhbikdSE1Ox1gEVHeg0TILi/lHu60I 0SQFC1d0xibuETge48lkDM1PbA5UkqGD+OvJ/zI8N89HCyJrgrMeS43xOUsHzjHuxZv9 0+tk1Go6A3W8J6KCXFt7uuTLiMcI0mhEN3RahMD9D5hSl+NHgt/xep+Ika8qBrRRj84p NM4rZjMv3f8ZtKAIBDUlt7OuD4J3RMkLiyyhtef90MuDA2IyayVw/b0/PcQZPnb/ngEI hsQPtLDokZYODLspx6aZvkKEfnGyjg+3r4HtZk2omdH7FZzflx7AWjYS3SyxTKqSG8zR McAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MUca3HO8QgKoQBjsRo9MxV9y3SE6HnfPoqAnvwRduTU=; b=ORbe41jkyKpQikvDFA72roR1ndfujrcRqmxlHDTSlOsd5c8J6a2vvMFF32U7+Qi/z9 C1zoV+TvPHwIT2+1iN0kjxbPo33X5v72IHaG3+ZlIMzPNiXdrgeNuH1DNyLmu2j88WZg YjlrdiLKHqxTy+x6rC2Hm2IFFa/qDy9f9aCjcfR4fKglco5hhkiBygprxIwzElTGn1rp wk/XL6LKm41m4dhHHO9hqzRV4XNA3rbhXZDuHxEz5J3YBCB0XdMT0FtFbLMKLFpfDg4M DAn9j1V/6X5QMOS77Ta47Vjm0PU0DWXRXU2wzNEb6dWLngGIKYCwzqdVh1NPzayqZYHv 7ImQ== X-Gm-Message-State: AOAM532PUCQtz5A0LgJXU3GsSOx1u4rPhH8FePhThNpN51vQWMyXJjN9 /MhU53cMOiL7F+MspBQttwFDrRnAFxX3Ug== X-Google-Smtp-Source: ABdhPJwdFQycDcgDP5uMb1NtabI/+UeBLxdHrqWQp2TtO2BuvZfccjNJXY+3J+fOQJ27nmDvM72rFw== X-Received: by 2002:a05:6214:5185:: with SMTP id kl5mr12081573qvb.47.1630101785853; Fri, 27 Aug 2021 15:03:05 -0700 (PDT) Received: from localhost.localdomain (bras-base-rdwyon0600w-grc-09-184-147-143-99.dsl.bell.ca. [184.147.143.99]) by smtp.gmail.com with ESMTPSA id t64sm5659209qkd.71.2021.08.27.15.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 15:03:05 -0700 (PDT) Sender: John Kacur From: John Kacur To: RT Cc: Clark Williams , John Kacur Subject: [PATCH 7/8] rt-tests: deadline_test: Exit with message if threads less than 1 Date: Fri, 27 Aug 2021 18:02:43 -0400 Message-Id: <20210827220244.24210-8-jkacur@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210827220244.24210-1-jkacur@redhat.com> References: <20210827220244.24210-1-jkacur@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org If the user tries to run deadline_test with threads less than 1 (zero for example), then exit with an error message. Signed-off-by: John Kacur --- src/sched_deadline/deadline_test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c index 1763c71486a9..53abd4d2ca6b 100644 --- a/src/sched_deadline/deadline_test.c +++ b/src/sched_deadline/deadline_test.c @@ -1817,6 +1817,11 @@ int main(int argc, char **argv) exit(-1); } + if (nr_threads < 1) { + fprintf(stderr, "The number of threads must be at least 1\n"); + exit(-1); + } + if (setcpu) { nr_cpus = calc_nr_cpus(setcpu, &setcpu_buf); if (nr_cpus < 0) {