From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DCFE041D65 for ; Fri, 24 Feb 2023 19:04:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3E4140EF1; Fri, 24 Feb 2023 19:04:01 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id F1B2E40697; Fri, 24 Feb 2023 19:03:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677261839; x=1708797839; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fuBJ3BmwuYv1ntn4nhCXVHPVNBD1+/KG8cnAv+qN9f0=; b=LLRIrZ6KVb0jt/ZlJ2r7Wot6PbLvPFObIqMRwvfFgryalfDqs9uCToSs fN629Th/XEbrUqOudwO3zytTe1oHJ9IJDojRoeVn4/gE9h8NU+edJzuy5 LtiHF0OV4M/yV9B3LBIhHZQjqG0vTqkuYGAJmxWESzrg8H3KAvANyUzWX aLFft+tsAKTL55FSRB696Gu9gOqIRyApYt5I/BsdpPLE5ONFmJKo4rYKG KRSZDzG8hXCsTCTP2Y0OtPV6nsZNlwCzbXQxHnEuI6jCtnGWmaxP83Qx7 T5BKWRFnnr4FuioeR7zFBBeDfsXVgfoMHNKciSy5XGcqTBZd439p42PtI A==; X-IronPort-AV: E=McAfee;i="6500,9779,10631"; a="332227838" X-IronPort-AV: E=Sophos;i="5.97,325,1669104000"; d="scan'208";a="332227838" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2023 10:03:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10631"; a="703257874" X-IronPort-AV: E=Sophos;i="5.97,325,1669104000"; d="scan'208";a="703257874" Received: from silpixa00401454.ir.intel.com ([10.55.128.122]) by orsmga008.jf.intel.com with ESMTP; 24 Feb 2023 09:36:42 -0800 From: Harry van Haaren To: dev@dpdk.org Cc: david.marchand@redhat.com, dpdklab@iol.unh.edu, ci@dpdk.org, Honnappa.Nagarahalli@arm.com, mattias.ronnblom@ericsson.com, mb@smartsharesystems.com, roretzla@linux.microsoft.com, aconole@redhat.com, bruce.richardson@intel.com, Harry van Haaren Subject: [PATCH] service: split tests to perf and autotest to avoid spurious CI failures Date: Fri, 24 Feb 2023 17:36:37 +0000 Message-Id: <20230224173637.243266-1-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org On some CI runs, some service-cores tests spuriously fail as the service lcore thread is not actually scheduled by the OS in the given amount of time. Increasing timeouts has not resolved the issue in the CI, so the solution in this patch is to move them to a separate perf test suite. Signed-off-by: Harry van Haaren --- See DPDK ML discussion in this thread: http://mails.dpdk.org/archives/dev/2023-February/263523.html --- app/test/meson.build | 1 + app/test/test_service_cores.c | 32 +++++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index f34d19e3c3..2db5ccf4ff 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -287,6 +287,7 @@ perf_test_names = [ 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', + 'service_perf_autotest', 'stack_perf_autotest', 'stack_lf_perf_autotest', 'rand_perf_autotest', diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 637fcd7cf9..06653dfdef 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -1022,17 +1022,12 @@ static struct unit_test_suite service_tests = { TEST_CASE_ST(dummy_register, NULL, service_name), TEST_CASE_ST(dummy_register, NULL, service_get_by_name), TEST_CASE_ST(dummy_register, NULL, service_dump), - TEST_CASE_ST(dummy_register, NULL, service_attr_get), - TEST_CASE_ST(dummy_register, NULL, service_lcore_attr_get), TEST_CASE_ST(dummy_register, NULL, service_probe_capability), TEST_CASE_ST(dummy_register, NULL, service_start_stop), TEST_CASE_ST(dummy_register, NULL, service_lcore_add_del), - TEST_CASE_ST(dummy_register, NULL, service_lcore_start_stop), TEST_CASE_ST(dummy_register, NULL, service_lcore_en_dis_able), TEST_CASE_ST(dummy_register, NULL, service_mt_unsafe_poll), TEST_CASE_ST(dummy_register, NULL, service_mt_safe_poll), - TEST_CASE_ST(dummy_register, NULL, service_app_lcore_mt_safe), - TEST_CASE_ST(dummy_register, NULL, service_app_lcore_mt_unsafe), TEST_CASE_ST(dummy_register, NULL, service_may_be_active), TEST_CASE_ST(dummy_register, NULL, service_active_two_cores), TEST_CASES_END() /**< NULL terminate unit test array */ @@ -1046,3 +1041,30 @@ test_service_common(void) } REGISTER_TEST_COMMAND(service_autotest, test_service_common); + + +/* The tests below have been split from the auto-test suite, as the + * when they are run in a cloud CI environment they can give false-positive + * errors, due to the service-cores not being scheduled by the OS. + */ +static struct unit_test_suite service_perf_tests = { + .suite_name = "service core test suite", + .setup = testsuite_setup, + .teardown = testsuite_teardown, + .unit_test_cases = { + TEST_CASE_ST(dummy_register, NULL, service_attr_get), + TEST_CASE_ST(dummy_register, NULL, service_lcore_attr_get), + TEST_CASE_ST(dummy_register, NULL, service_lcore_start_stop), + TEST_CASE_ST(dummy_register, NULL, service_app_lcore_mt_safe), + TEST_CASE_ST(dummy_register, NULL, service_app_lcore_mt_unsafe), + TEST_CASES_END() /**< NULL terminate unit test array */ + } +}; + +static int +test_service_perf(void) +{ + return unit_test_suite_runner(&service_perf_tests); +} + +REGISTER_TEST_COMMAND(service_perf_autotest, test_service_perf); -- 2.34.1