From patchwork Tue Sep 14 17:08:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Lezhepekov X-Patchwork-Id: 1528082 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=rRHxPVCF; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H88vh0Zj9z9sRK for ; Wed, 15 Sep 2021 03:09:02 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5AE043C9264 for ; Tue, 14 Sep 2021 19:09:00 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 444D13C2308 for ; Tue, 14 Sep 2021 19:08:58 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 in-5.smtp.seeweb.it (Postfix) with ESMTPS id 7765F600548 for ; Tue, 14 Sep 2021 19:08:57 +0200 (CEST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 9CDB51FE0A; Tue, 14 Sep 2021 17:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631639336; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=97kF3d5JzGHyevbvlvTN/uA78c92o8UsUBLc3rI/Dpw=; b=rRHxPVCF6Ubm5pYZ9awRthdQaKHZunfSCaUsWzcXfTuoeN7Zy2np8n+UmD13Ic7zHWgPaf pQniTPH0al3V7EMK41bxU7IfscAo0RnA3aIE1Wyh/fO7skuBd4Is/VA7T5lj3CllwbOgjz Frw0AQpaZe/na0jLjQjfYrk5FonXkrU= Received: from localhost.suse.de (blezhepekov.udp.ovpn2.nue.suse.de [10.163.45.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 69198A3B99; Tue, 14 Sep 2021 17:08:56 +0000 (UTC) To: ltp@lists.linux.it Date: Tue, 14 Sep 2021 20:08:46 +0300 Message-Id: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v1 1/6] realtime:async_handler_jk: return actual exit code X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bogdan Lezhepekov via ltp From: Bogdan Lezhepekov Reply-To: Bogdan Lezhepekov Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The original version always returned 0. Signed-off-by: Bogdan Lezhepekov --- testcases/realtime/func/async_handler/async_handler_jk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testcases/realtime/func/async_handler/async_handler_jk.c b/testcases/realtime/func/async_handler/async_handler_jk.c index 4d8721822..8b40a474a 100644 --- a/testcases/realtime/func/async_handler/async_handler_jk.c +++ b/testcases/realtime/func/async_handler/async_handler_jk.c @@ -137,6 +137,7 @@ int main(int argc, char *argv[]) { int aes_id; // asynchronous event server id int user_id; // User thread - that fires the event + int result; long delta; struct thread *server; setup(); @@ -155,10 +156,11 @@ int main(int argc, char *argv[]) join_thread(user_id); join_threads(); delta = (end - start) / NS_PER_US; + result = delta > pass_criteria ? 1 : 0; printf("delta = %ld us\n", delta); printf("\nCriteria: latencies < %d\n", (int)pass_criteria); - printf("Result: %s\n", delta > pass_criteria ? "FAIL" : "PASS"); + printf("Result: %s\n", result ? "FAIL" : "PASS"); - return 0; + return result; } From patchwork Tue Sep 14 17:08:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Lezhepekov X-Patchwork-Id: 1528083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=D1vS5i4A; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H88vs6Tgxz9sRK for ; Wed, 15 Sep 2021 03:09:13 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 80D453C2308 for ; Tue, 14 Sep 2021 19:09:10 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id B0EAD3CA4D3 for ; Tue, 14 Sep 2021 19:09:01 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 in-7.smtp.seeweb.it (Postfix) with ESMTPS id AA2D420090C for ; Tue, 14 Sep 2021 19:09:00 +0200 (CEST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id D18741FD29; Tue, 14 Sep 2021 17:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631639339; h=from:from:reply-to: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=7yLEALOHM06a3MjZpWW9miIG8BaBc2UHxP8J265juOM=; b=D1vS5i4ApOLcvXrJUDlchqPfMrXWwkWyN1IheK+BPKwHhDvNjt1CJAw1tDuG21fbUkaTnD CvYCHQbB2mmgBaiwX9o8ul3v7b2cf/Ce65Up71jm92xk26E5I0EGJKp+Na+1i39tODKXe3 w2ERjkiEbZg4aYv+lQ/vd+tovvxnj/k= Received: from localhost.suse.de (blezhepekov.udp.ovpn2.nue.suse.de [10.163.45.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 9D697A3B91; Tue, 14 Sep 2021 17:08:59 +0000 (UTC) To: ltp@lists.linux.it Date: Tue, 14 Sep 2021 20:08:47 +0300 Message-Id: <20210914170851.22931-2-bogdan.lezhepekov@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> References: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH v1 2/6] rt:pi-tests::sbrk_mutex: return actual exit code X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bogdan Lezhepekov via ltp From: Bogdan Lezhepekov Reply-To: Bogdan Lezhepekov Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The original version always returned 0. Signed-off-by: Bogdan Lezhepekov --- testcases/realtime/func/pi-tests/sbrk_mutex.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c index 7ed7969d9..34e4e9666 100644 --- a/testcases/realtime/func/pi-tests/sbrk_mutex.c +++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c @@ -97,7 +97,8 @@ void *worker_thread(void *arg) int main(int argc, char *argv[]) { - int m, ret, robust; + int m, robust; + int ret = 0; intptr_t t; pthread_mutexattr_t mutexattr; setup(); @@ -123,7 +124,8 @@ int main(int argc, char *argv[]) if (!(mutexes[m] = malloc(sizeof(pthread_mutex_t)))) { perror("malloc failed\n"); } - if ((ret = pthread_mutex_init(mutexes[m], &mutexattr))) { + if (pthread_mutex_init(mutexes[m], &mutexattr)) { + ret = 1; perror("pthread_mutex_init() failed\n"); } } @@ -140,11 +142,13 @@ int main(int argc, char *argv[]) /* destroy all the mutexes */ for (m = 0; m < NUM_MUTEXES; m++) { if (mutexes[m]) { - if ((ret = pthread_mutex_destroy(mutexes[m]))) + if (pthread_mutex_destroy(mutexes[m])) { + ret = 1; perror("pthread_mutex_destroy() failed\n"); + } free(mutexes[m]); } } - return 0; + return ret; } From patchwork Tue Sep 14 17:08:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Lezhepekov X-Patchwork-Id: 1528084 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=IFJgg5RC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H88w23vsnz9sRK for ; Wed, 15 Sep 2021 03:09:22 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id CAA0C3CA4A1 for ; Tue, 14 Sep 2021 19:09:19 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id E9F9B3C9268 for ; Tue, 14 Sep 2021 19:09:01 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 in-7.smtp.seeweb.it (Postfix) with ESMTPS id 66687200935 for ; Tue, 14 Sep 2021 19:09:01 +0200 (CEST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id F0A7E1FE0F; Tue, 14 Sep 2021 17:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631639340; h=from:from:reply-to: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=N/wmXs/qsrs1yy5yGMgGCtVsLIrPg3vnPFIrKFS6pAU=; b=IFJgg5RC/xJg831c0xgwkNrYis04c6q/f5jo1HJYMI4FqW7xLU3jdHwS7uAvHXefZBnBAe /XuNAiUs4E7/QeAvgIxNHiiE8N0uStRF9A4OTmhzyzyBgRx71H27CrWd89WgqlKCOuJcDq 76XKGPQnK0Wpc/EI7dMgtdrkl3/30rA= Received: from localhost.suse.de (blezhepekov.udp.ovpn2.nue.suse.de [10.163.45.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id BC83AA3B91; Tue, 14 Sep 2021 17:09:00 +0000 (UTC) To: ltp@lists.linux.it Date: Tue, 14 Sep 2021 20:08:48 +0300 Message-Id: <20210914170851.22931-3-bogdan.lezhepekov@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> References: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH v1 3/6] rt:pi-tests:testpi-0: return actual exit code X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bogdan Lezhepekov via ltp From: Bogdan Lezhepekov Reply-To: Bogdan Lezhepekov Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The original version always returned 0. Signed-off-by: Bogdan Lezhepekov --- testcases/realtime/func/pi-tests/testpi-0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testcases/realtime/func/pi-tests/testpi-0.c b/testcases/realtime/func/pi-tests/testpi-0.c index fd8ad0717..64797c899 100644 --- a/testcases/realtime/func/pi-tests/testpi-0.c +++ b/testcases/realtime/func/pi-tests/testpi-0.c @@ -94,8 +94,10 @@ int main(int argc, char *argv[]) printf("LIBPTHREAD_VERSION: %s\n", pathbuf); free(pathbuf); - if (sysconf(_SC_THREAD_PRIO_INHERIT) == -1) + if (sysconf(_SC_THREAD_PRIO_INHERIT) == -1) { printf("No Prio inheritance support\n"); + exit(1); + } printf("Prio inheritance support present\n"); From patchwork Tue Sep 14 17:08:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Lezhepekov X-Patchwork-Id: 1528085 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=rjs6Zx67; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H88wH5ZFBz9sRK for ; Wed, 15 Sep 2021 03:09:35 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B746C3C9267 for ; Tue, 14 Sep 2021 19:09:30 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 3B1A33CA4EA for ; Tue, 14 Sep 2021 19:09:03 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 in-5.smtp.seeweb.it (Postfix) with ESMTPS id A81AA600F62 for ; Tue, 14 Sep 2021 19:09:02 +0200 (CEST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 374C61FD29; Tue, 14 Sep 2021 17:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631639342; h=from:from:reply-to: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=ggqEMSu3iNM8+t6DkkhnTjLd8HZ2+xXCaqhzj3c6wKA=; b=rjs6Zx67LEAah+lSj0XVfUs7H1HitUtk/XEELIrzOtVGyF0V7zB4hNhSMvcb7FC8+xIKGs J6LO3YlSiG5ikV6l8JTbS1Fl/EPS95BFYduz+XEPtEgaJIMjjTIzTLzxDVfln6mLQ9JCcP 2aKVuxNN621wA30dboNva87KCa28qNU= Received: from localhost.suse.de (blezhepekov.udp.ovpn2.nue.suse.de [10.163.45.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id ED3EBA3B91; Tue, 14 Sep 2021 17:09:01 +0000 (UTC) To: ltp@lists.linux.it Date: Tue, 14 Sep 2021 20:08:49 +0300 Message-Id: <20210914170851.22931-4-bogdan.lezhepekov@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> References: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v1 4/6] rt:pi-tests:test-skeleton: fix wrong return value X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bogdan Lezhepekov via ltp From: Bogdan Lezhepekov Reply-To: Bogdan Lezhepekov Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Bogdan Lezhepekov --- testcases/realtime/func/pi-tests/test-skeleton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/realtime/func/pi-tests/test-skeleton.c b/testcases/realtime/func/pi-tests/test-skeleton.c index 7816cf877..4a923cd2d 100644 --- a/testcases/realtime/func/pi-tests/test-skeleton.c +++ b/testcases/realtime/func/pi-tests/test-skeleton.c @@ -88,7 +88,7 @@ static void timeout_handler(int sig) exit(1); } printf("\nResult:PASS\n"); - exit(1); + exit(0); } int main(int argc, char **argv) From patchwork Tue Sep 14 17:08:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Lezhepekov X-Patchwork-Id: 1528086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=deqo1WAI; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H88wS3sjrz9sRK for ; Wed, 15 Sep 2021 03:09:44 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 634D03C9267 for ; Tue, 14 Sep 2021 19:09:42 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 7C6193C9256 for ; Tue, 14 Sep 2021 19:09:04 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 in-7.smtp.seeweb.it (Postfix) with ESMTPS id D6363200751 for ; Tue, 14 Sep 2021 19:09:03 +0200 (CEST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 4BA9822135; Tue, 14 Sep 2021 17:09:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631639343; h=from:from:reply-to: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=km9GwAC0/7wQxJ5Knt6D/VmMhAFMLJzglfb/kQRhXt8=; b=deqo1WAIDHNvzDY4fp6JhHqFPh1diWPryWmwYN34lPiq9VAXHUKspdudbwTMrl7bfW53wU d2lO7L4YAxzmrkAbWb/R47rvGofatfZ9fhYB4yqT2PoWT2z/ZcoT5OVjfrjlKrUdEj24xI 0qhtMnApAbAegze8QD5Ftmq3MAyj/4g= Received: from localhost.suse.de (blezhepekov.udp.ovpn2.nue.suse.de [10.163.45.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 1885FA3B9C; Tue, 14 Sep 2021 17:09:03 +0000 (UTC) To: ltp@lists.linux.it Date: Tue, 14 Sep 2021 20:08:50 +0300 Message-Id: <20210914170851.22931-5-bogdan.lezhepekov@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> References: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH v1 5/6] rt:pi-tests:testpi-5: return exit code X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bogdan Lezhepekov via ltp From: Bogdan Lezhepekov Reply-To: Bogdan Lezhepekov Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Bogdan Lezhepekov Reviewed-by: Petr Vorel --- testcases/realtime/func/pi-tests/testpi-5.c | 24 ++++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/testcases/realtime/func/pi-tests/testpi-5.c b/testcases/realtime/func/pi-tests/testpi-5.c index a52486417..538be1e44 100644 --- a/testcases/realtime/func/pi-tests/testpi-5.c +++ b/testcases/realtime/func/pi-tests/testpi-5.c @@ -68,29 +68,37 @@ int do_test(int argc, char **argv) { pthread_mutexattr_t mutexattr; int retc, protocol; + unsigned int err = 0; #if HAS_PRIORITY_INHERIT - if (pthread_mutexattr_init(&mutexattr) != 0) + if (pthread_mutexattr_init(&mutexattr) != 0) { printf("Failed to init mutexattr\n"); + err++; + } if (pthread_mutexattr_setprotocol(&mutexattr, - PTHREAD_PRIO_INHERIT) != 0) + PTHREAD_PRIO_INHERIT) != 0) { printf("Can't set protocol prio inherit\n"); - - if (pthread_mutexattr_getprotocol(&mutexattr, &protocol) != 0) + err++; + } + + if (pthread_mutexattr_getprotocol(&mutexattr, &protocol) != 0) { printf("Can't get mutexattr protocol\n"); - else + err++; + } else printf("protocol in mutexattr is %d\n", protocol); - + retc = pthread_mutex_init(&child_mutex, &mutexattr); - if (retc != 0) + if (retc != 0) { printf("Failed to init mutex: %d\n", retc); + err++; + } create_other_thread(child_thread, NULL); join_threads(); - return 0; + return err > 0 ? 1: 0; #else return 1; #endif From patchwork Tue Sep 14 17:08:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Lezhepekov X-Patchwork-Id: 1528087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=oO8iVTJ6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H88wd3z1mz9sRK for ; Wed, 15 Sep 2021 03:09:53 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 7CBA83C2308 for ; Tue, 14 Sep 2021 19:09:51 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 181DA3CA4D3 for ; Tue, 14 Sep 2021 19:09:05 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 in-7.smtp.seeweb.it (Postfix) with ESMTPS id 9BAB1200751 for ; Tue, 14 Sep 2021 19:09:04 +0200 (CEST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 4890F22137; Tue, 14 Sep 2021 17:09:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631639344; h=from:from:reply-to: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=bypL7Q+CYNEzUVkj+The4FxAjTD2JfsxzJlWxS0sscA=; b=oO8iVTJ6LlWI8dN8tFvs3UwYrYlF/wPoXzHRe5lIPIiPLZiEV2pCWjFQP3E6RRnV73LXMO rErHBqaYk+3VicG+6T7OYmMHM+VpYUsm2udolmEh9jbZnubNco0lbbwK99MVaS8yY1pI8S idhNcxJAwhg5T9VqL4BgWHDPY4Y7Q7w= Received: from localhost.suse.de (blezhepekov.udp.ovpn2.nue.suse.de [10.163.45.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 153D0A3B9C; Tue, 14 Sep 2021 17:09:04 +0000 (UTC) To: ltp@lists.linux.it Date: Tue, 14 Sep 2021 20:08:51 +0300 Message-Id: <20210914170851.22931-6-bogdan.lezhepekov@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> References: <20210914170851.22931-1-bogdan.lezhepekov@suse.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH v1 6/6] rt:pi-tests:testpi-6: return exit code X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bogdan Lezhepekov via ltp From: Bogdan Lezhepekov Reply-To: Bogdan Lezhepekov Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Bogdan Lezhepekov --- testcases/realtime/func/pi-tests/testpi-6.c | 22 ++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c index 637d38355..bc271f242 100644 --- a/testcases/realtime/func/pi-tests/testpi-6.c +++ b/testcases/realtime/func/pi-tests/testpi-6.c @@ -69,27 +69,35 @@ int do_test(int argc, char **argv) { pthread_mutexattr_t mutexattr; int retc, robust; + unsigned int err; - if (pthread_mutexattr_init(&mutexattr) != 0) + if (pthread_mutexattr_init(&mutexattr) != 0) { printf("Failed to init mutexattr\n"); + err++; + } if (pthread_mutexattr_setrobust(&mutexattr, - PTHREAD_MUTEX_ROBUST) != 0) + PTHREAD_MUTEX_ROBUST) != 0) { printf("Can't set robust mutex\n"); - - if (pthread_mutexattr_getrobust(&mutexattr, &robust) != 0) + err++; + } + + if (pthread_mutexattr_getrobust(&mutexattr, &robust) != 0) { printf("Can't get mutexattr protocol\n"); - else + err++; + } else printf("robust in mutexattr is %d\n", robust); retc = pthread_mutex_init(&child_mutex, &mutexattr); - if (retc != 0) + if (retc != 0) { printf("Failed to init mutex: %d\n", retc); + err++; + } create_other_thread(child_thread, NULL); join_threads(); - return 0; + return err > 0 ? 1 : 0; } #include "test-skeleton.c"