From patchwork Wed Sep 29 15:19:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 514858 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:4087:0:0:0:0 with SMTP id m7csp131084jam; Wed, 29 Sep 2021 08:21:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq5BpKIjpKimog+/MFZiRUUT5bfGwoRG9I9FzyglfUYUFW/wTm5WDVZMcfQ0byUVhI+lpR X-Received: by 2002:a17:906:7848:: with SMTP id p8mr330344ejm.212.1632928864453; Wed, 29 Sep 2021 08:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632928864; cv=none; d=google.com; s=arc-20160816; b=p5be/7Uf4WO/psu818IyDX2UDM92UxPaQUKZrqS9rfK6znxHBT+BDyT6hD6x4VdFxj PKKiBjputntKLN9w+rLCm9l1jSd4YTt2BKAaFHjCvQ2D7wla5m9fER6dsSeQ5oEh4iGB PnxUQUGQgx20GvxmAHjNabjOl4ttk5WaJ6F4qJqZHXyeoDp7S3GJDgVU1w7T1LXajXMj Nk0ld9kDmO+auOKPbpHhriWL+Den/6biep1/sno7NgbNxBQlVckfoPI8/F8XjmcvdYZV P+lv9izjhStRAghO3aVBeif67u1YWH6BXTIIMN6GiBjoPDjqslvO87qb9pljRogty9Qr cdzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MXlblGr52vSt7tNK7BbgMysM590xJ/tIUcoOPfjVBvc=; b=abWYWkenXsOSQTSWO5RVv7LWWTC6eZjfL2RUAKW+DAraSiPBWzSH7eoVxXgGs1Uu7z 1XU8zgjexx/Z+BImZWRLG9+U2P2rKI0emizQnjAOpB6YWnwvBocvc7pzTBmvN/BsTmKm 5J9PbF13cURgWZWENiAfZdXqVwZrweFkflHKonH+oBEt+e/JOHtBuW0xRJuiKptc95Hb I4UHtmElCAtpcB6qPdlz7yTNNCDF1bZcFq5kypbM8oMdIeta0Or+BUdqctb+GEAGvLSM uDqETFZhdkCd6cezZfiPwquI0wofw/I6iCmuD54YUqMWcIF80Wv4Xhf28W2qkBqXxuJx eIAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pX2FN6hl; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si263244ede.307.2021.09.29.08.21.04; Wed, 29 Sep 2021 08:21:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pX2FN6hl; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345050AbhI2PWo (ORCPT + 5 others); Wed, 29 Sep 2021 11:22:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:33260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345017AbhI2PWo (ORCPT ); Wed, 29 Sep 2021 11:22:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E8D2161407; Wed, 29 Sep 2021 15:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632928863; bh=7ylfGXXJ8kffqS5H5ss3UKZCeSeFg8BoMiJBHNfE90c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pX2FN6hlo0FXjR1P5xPeQp9tllh2qXpjMg4FfDBZqBS8eR2Nk3pwLNrfiAhsAnvsp YDSopJP27TTV5hSuyorx3dBjvA9XUhN5sWi6xbSnlz3t46InPy8+85mpatAh0Er6jG SaWRrn+qOvr9a4mfRap0SsBdGaL6m6FEbk6AHqS2MrgI/yBY360a3LQzP+odRJWIrv 0xgO532FG+IERH/xPTSScdEaEKmbXXuPTrn9Z8EteUXLRdZX7wfo0fEj7p6y387Zxg 9bqRLbAhgP77Pk6UFUYw7HUPNWDa4D171duV5/f90OMtQapHNbzzkgqWgwjXMdd6QL 3vh6VEnKhYdag== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, misono.tomohiro@fujitsu.com, Mark Brown Subject: [PATCH v3 1/4] selftests: arm64: Fix printf() format mismatch in vec-syscfg Date: Wed, 29 Sep 2021 16:19:22 +0100 Message-Id: <20210929151925.9601-2-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210929151925.9601-1-broonie@kernel.org> References: <20210929151925.9601-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=901; h=from:subject; bh=7ylfGXXJ8kffqS5H5ss3UKZCeSeFg8BoMiJBHNfE90c=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhVIP5FfNKGnLFWLyli3f4LmQge9pq7YMt+YL9ck0m EvunI0qJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYVSD+QAKCRAk1otyXVSH0I+CB/ 9v9CznO+cozkDitqH9JHdUihoaSNdXCqNOKckXQ9/vXTKYBX7UORAs2KRWQNc5wEZ7JjwyNMbclWni LnF3LiejvuMBLRm71fcmxTmmNNyLix9EOj3TwcPtdFGQB4vpYU0iji/MaiyOvaX+9kAwqI+wFCXvli EDxGHnDCJm9qOIMkZoHBvRi02WZLKKDVPKHi+WQOXWB0Wuta7JNjzxG/MgHqmbKIcBlHxb04qLYNXC w0hFoH8X/+gcIYlwSkRnAXbnsPYLbLu0jJvtxabXiSIKlbzGQA/w7Na9j1B3vOVAfXOro2yM58myMB XI+m3/8vt0Lr2wPIPs3i/yaMeswoUz X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The format for this error message calls for the plain text version of the error but we weren't supply it. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/vec-syscfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/tools/testing/selftests/arm64/fp/vec-syscfg.c b/tools/testing/selftests/arm64/fp/vec-syscfg.c index c02071dcb563..b2de002ee325 100644 --- a/tools/testing/selftests/arm64/fp/vec-syscfg.c +++ b/tools/testing/selftests/arm64/fp/vec-syscfg.c @@ -109,7 +109,7 @@ static int get_child_rdvl(struct vec_data *data) /* exec() a new binary which puts the VL on stdout */ ret = execl(data->rdvl_binary, data->rdvl_binary, NULL); - fprintf(stderr, "execl(%s) failed: %d\n", + fprintf(stderr, "execl(%s) failed: %d (%s)\n", data->rdvl_binary, errno, strerror(errno)); exit(EXIT_FAILURE); From patchwork Wed Sep 29 15:19:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 514859 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:4087:0:0:0:0 with SMTP id m7csp131125jam; Wed, 29 Sep 2021 08:21:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG76Y5x9uDpIDswt65MEtCdltUJlxQ31AOniREXfosHcOU0CnoL/deLL3f1EkOVagEn3Rh X-Received: by 2002:a17:906:d1d6:: with SMTP id bs22mr304939ejb.554.1632928867214; Wed, 29 Sep 2021 08:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632928867; cv=none; d=google.com; s=arc-20160816; b=TY/ZG8bVfSRFakySLa8A3uyT5sJ2bl3MkQXnMZiD/kjCW3SGoP0360d5HMmMcMC8Ji tdxkmwdKPt6KRJgO6HNbYH2GEzEOhugBD8BPJNuS3L1jLuc7NWNz42dShLcl36pBBqTQ jJxe90NzF6x5yhaQmwndVgXoMmBIB2MJVnI+PNP6G6d84ugaynARneHLzs9NT4tbwNNA CynNImSzXUDutp8swAk3nGRJ987pjI4J4892Lu9i9lR0Ryw3pGdyWZgT0ZOypTg0KwHq mM6rvDVWBDIPPn2WKmk0WT8JCbSqHk53+Msa9/B2g2ec1bHG7MzpA2gANwxI7uyBFsK0 kdiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=c/av3IUSLY5qczNYM4PKKp5GWHvx2bURqa7EhiLay4w=; b=zyluUh4DbAAVVKPjCJYQ1hrcFQfWeXCPV0itcmL+vvOPbZ2jaXxErOJougmF7zvbA+ kLG7CNc0Eczq7A1onFVXFLg7v08Mv/OxWcpMwzipgdmItnBMSlwyypOz3DfUn1GKi9tr y3DGlOZkGX0fE3Tvk6nZ1wOcU6mvZlSOccBxbfeKhbcohW+99qsUAZOW8tQu6V7mh+bA CyJA0Gt0G/cmclAy4olvvE9TfURRe+oo5AblfJiKoubd9S0gGqfT/pVRhfzPUE5BdG0E wOCKLnPCduzaFh1hvRxWksOrBWv0KCiJyQSOrvPgP8MYPhac9h7GaXKYqyWMUtsYGL8U xE/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WeosoLhj; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si263244ede.307.2021.09.29.08.21.06; Wed, 29 Sep 2021 08:21:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WeosoLhj; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345017AbhI2PWr (ORCPT + 5 others); Wed, 29 Sep 2021 11:22:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:33326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344945AbhI2PWr (ORCPT ); Wed, 29 Sep 2021 11:22:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8354F60E90; Wed, 29 Sep 2021 15:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632928866; bh=yJ4ueh+BO+Eim5GlQAHvD/jC8/yyMw/A2pszTTlipf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeosoLhjSZ2ADw8VKBMi1lZE0t2uDGiTjJUw0ycueB3gr1dBqo99pL1I9WHG6HKV7 qXi1FN/IAwGkVX0dzVMJK4nMPf0vZUbHDkLYk1jqw+Yn7fJMd1OqD14zzB5Q/X+fO5 UDEtNxcU8fO0KcNERM4AKqMdJkm/l/acQ1UmRcXRw3h6Oz36iclxctw6USk5l5rNng MIbBr7v1U04/aFj4lXNrApHbdZZnBgYlO6X9nqlln4s4msU3Yyjk+4mO00CVlzVt52 LI5RMXXMgRovqp/0q1GU7FX+zmcAzyYMoBUa2ixzRySnJoofG0pzUryhPQ2ofqrQhR z06k+GlVhuK5w== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, misono.tomohiro@fujitsu.com, Mark Brown Subject: [PATCH v3 2/4] selftests: arm64: Remove bogus error check on writing to files Date: Wed, 29 Sep 2021 16:19:23 +0100 Message-Id: <20210929151925.9601-3-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210929151925.9601-1-broonie@kernel.org> References: <20210929151925.9601-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1028; h=from:subject; bh=yJ4ueh+BO+Eim5GlQAHvD/jC8/yyMw/A2pszTTlipf8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhVIP6GHlxtnIY4Eu/5/J5cdKSDM5mRmL00dmRJpB8 pcoNJEyJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYVSD+gAKCRAk1otyXVSH0E18B/ 9Hs4jDmaOPQGNF84tDPugrITikWZnf2rOqvbePNTeuXKU+pjBgEI7bKkAak6UbYEioytcV++EUxOSx RjT2IXqKrIvCq1WrkBV2/3V8fF94Uu6lIS5jIAnzTEbTMWcNLIoDRaPpTf3EtmTgvltykTH9UhhDWm amvOLpAxUhsIx2aoICp/a3mtNPm6clUfSK/f/tNtZwk5hm3vQeSgJGi2P63LjyOIRiezNnNS5fv6sp hOusJLjutWPtE30sep9teggPkJS5vZN1Ma0ni2uQe7y9Qx4w9fOYhDyAWIUr1IuMcp+HguYeiSX95v pHIW1nZUtJneeKWQ+T0FXECKQbXC2+ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Due to some refactoring with the error handling we ended up mangling things so we never actually set ret and therefore shouldn't be checking it. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/vec-syscfg.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.20.1 diff --git a/tools/testing/selftests/arm64/fp/vec-syscfg.c b/tools/testing/selftests/arm64/fp/vec-syscfg.c index b2de002ee325..d48d3ee1bc36 100644 --- a/tools/testing/selftests/arm64/fp/vec-syscfg.c +++ b/tools/testing/selftests/arm64/fp/vec-syscfg.c @@ -180,7 +180,6 @@ static int file_read_integer(const char *name, int *val) static int file_write_integer(const char *name, int val) { FILE *f; - int ret; f = fopen(name, "w"); if (!f) { @@ -192,11 +191,6 @@ static int file_write_integer(const char *name, int val) fprintf(f, "%d", val); fclose(f); - if (ret < 0) { - ksft_test_result_fail("Error writing %d to %s\n", - val, name); - return -1; - } return 0; } From patchwork Wed Sep 29 15:19:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 514860 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:4087:0:0:0:0 with SMTP id m7csp131154jam; Wed, 29 Sep 2021 08:21:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLSA2q1QxYDD1aH26+eObxsmp59mnoqFXiYM2d/nQ02aczIjaFaaqcEolumuVhAVZPm8kq X-Received: by 2002:a50:9d44:: with SMTP id j4mr516837edk.173.1632928869735; Wed, 29 Sep 2021 08:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632928869; cv=none; d=google.com; s=arc-20160816; b=HhaEPaZl3OCAG+OUIMROM0NqiC7MKR1waEN4lmLmH798rKeeB+t5NOdwtP2EnHafLa m0GmFrI4BrNpMOuFCxb9rlJ1ppIFa/gj1kFskbHdWxSl3JWmu940DAHR3i0l4l3Dsdmv NRLdX3y6E9BI9zJOd/AuI6IGCabWFCx2M+dlbXSKkfBUyZURQn0NK9wgZoyeDzr2ghCT nknLgRCDrSv9c9g6PZH9GKokdJg2BozQSD/yQy1iXl/8DisgAhK0t9OYNncwbbCj5IAr pQxt7ATPNTEwpMi2G4zIa+UptIr5kpCoIPC/1j3+lyuWINsfKN/zD7x9ZqQJt/z+e3Pw 7zzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4d5pjRDrvsZjEfCZ2OEzgdGusEapdDka6w2K5wJkRrI=; b=OINaBJ8NPhCt5SnKbVeBuYcx5AuVqHVXAY7ITVhFIynEb90Qw9ke5huD2iTsItPseG DNVvdhhYa5tlYXpl+3uOIRRnDQLPgvVd1lSJnBqN1Cijux6q2GfMlOP2Lf8YF4I1lr5J NpvCUsxRxip120c9SZVs6o4laLSUVz6aBKHYHpm7X3tQMNUNJqSK+Err8z3wNP+xpXxf BsrnN/fbjNlfnyq0qkQ/N04CvGpl8DYdYkcuWUR8xoGKPB2jNWWz0xp5mRR5FbobG3UK ZQPgKjh7ywRBBrZJAWl97dPkMLi84rOP7isRWloUBL4MWlEfd1DEbivrwuK7aLZHD34/ 9MWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MhDxAvqG; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si263244ede.307.2021.09.29.08.21.09; Wed, 29 Sep 2021 08:21:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MhDxAvqG; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345084AbhI2PWu (ORCPT + 5 others); Wed, 29 Sep 2021 11:22:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:33386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344945AbhI2PWt (ORCPT ); Wed, 29 Sep 2021 11:22:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2F5C061406; Wed, 29 Sep 2021 15:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632928868; bh=034J/1+mWeQStGpdMFtVOiBVU1WdpiXGK6aJYR8cNz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MhDxAvqGuk4gjSaw/u7suqBShWZitKs4l0MORhCDIah7Ba6B05VkNIcZvu4qfjFFq VQWeVtPfZr8M9EwpRVDYMo0cI/no8XOCISRHr51A4ulK20QzwhVe70GEDlKYxPDjui DdVxX4podzquXk4jMj3kUCVta2jFP/i2VQYIkadWeVOU0FVhs/6LDGcbkIMRZcXXKu BUS+10E2q49Mo111Jq7pImGpS22TKoWHZF1j0tBJOgWTrRHeqANs3Yxg4SoNqV4Ir6 nKMAIA4Msf52KVf78Y2erazXtyegv+63unnJfA3Tjg+fmi7NpZ7jEpOQj/IMNv7VE7 AnlacoFbln9Vw== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, misono.tomohiro@fujitsu.com, Mark Brown Subject: [PATCH v3 3/4] selftests: arm64: Fix and enable test for setting current VL in vec-syscfg Date: Wed, 29 Sep 2021 16:19:24 +0100 Message-Id: <20210929151925.9601-4-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210929151925.9601-1-broonie@kernel.org> References: <20210929151925.9601-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1350; h=from:subject; bh=034J/1+mWeQStGpdMFtVOiBVU1WdpiXGK6aJYR8cNz8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhVIP7FuBDgWBwg6p1HNOQXNGec+AhKNKFSyB3BGEV FVIWvTmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYVSD+wAKCRAk1otyXVSH0PTjB/ 4p/nWoBhi3G1+VcFCzwv8M3vueltacjBVsZQXc0B+t4AdlMdidasVXrmR1QcPgZOTI4XXFBy0+62EO iNF6LN858wKUSACqGvDoga7zksHO9eC58IeKPE9pOLsRSmH9V78pVAKRHeTvlyMNT6B8PtVGECYzq/ tyQqo0G/OJ/BS+ss1+fRHij0ht85QImS3bkYzFayIkPPZRqB58h33uEdXYEgs7xomIcWMZ0tg6N7eZ HPzScgqgAmcIqTJ/Sxs8vc/D31PiySTLrExJ7ztoJRGcjvnDhmaPfNjzqOgy1bftFD2UwD1P/1vr3k HcyOkXmCidUYkbvLeB8o+s5nt0NEqc X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org We had some test code for verifying that we can write the current VL via the prctl() interface but the condition for the test was inverted which wasn't noticed as it was never actually hooked up to the array of tests we execute. Fix this. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/vec-syscfg.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/tools/testing/selftests/arm64/fp/vec-syscfg.c b/tools/testing/selftests/arm64/fp/vec-syscfg.c index d48d3ee1bc36..9d6ac843e651 100644 --- a/tools/testing/selftests/arm64/fp/vec-syscfg.c +++ b/tools/testing/selftests/arm64/fp/vec-syscfg.c @@ -329,12 +329,9 @@ static void prctl_set_same(struct vec_data *data) return; } - if (cur_vl != data->rdvl()) - ksft_test_result_pass("%s current VL is %d\n", - data->name, ret); - else - ksft_test_result_fail("%s prctl() VL %d but RDVL is %d\n", - data->name, ret, data->rdvl()); + ksft_test_result(cur_vl == data->rdvl(), + "%s set VL %d and have VL %d\n", + data->name, cur_vl, data->rdvl()); } /* Can we set a new VL for this process? */ @@ -555,6 +552,7 @@ static const test_type tests[] = { proc_write_max, prctl_get, + prctl_set_same, prctl_set, prctl_set_no_child, prctl_set_for_child, From patchwork Wed Sep 29 15:19:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 514861 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:4087:0:0:0:0 with SMTP id m7csp131199jam; Wed, 29 Sep 2021 08:21:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybdZU+lab55nIUxss5y6GuqRABzG1bdGQw6xCHOmupIfxA3wqJrC69EspvrRclupCNGngY X-Received: by 2002:a05:6402:1b8d:: with SMTP id cc13mr500886edb.235.1632928872364; Wed, 29 Sep 2021 08:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632928872; cv=none; d=google.com; s=arc-20160816; b=c3N1sA3TD47Wc3pTcCJqCaBox1u8r6ucbO5rymDX5yWSEbvJ0AjjNF+E35lQV/M4fD te4OfQn2NKQ4NlvRQ8kwUA/+ikmZJ5vqLbloYc2J4s/nTNQN/6hqrhFhMVgsKnCjo8Gh 3OHIhzXU7Q7wGRndnVQ+z79HR5IG95Eas/xIL3yxmWQbmCLwlNaXnwY3dN/9wyie2d2W 6kIEc+LcSbtxakN9ub1Ni4lmoqghJg8oGymxQz2VRZF3n7vwSFOqxOt7YmFTtBX8GJQF L83w0pAw9z4D3cl/tt47Gzhv5o4xwZOV3VLXT52wFF2TIZxzHnNN1NIDUAvR75FYtrtW /sew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YknNVZ4fmQJrF0qQdxKjiSAflnH0NQIlutJzlDp0DaY=; b=QEJcQQxyQzWoEh+DNPo18CmE8GEnyh+Vxr8sZJC1qS9C6j8CftfOdgjkoodVG5+hdP myfRp08LmLd4cM2oORL1pbeTIoTuNCG4r0P84XdmHpOf+g94ObydHtpUZ8mog199Kt2a D4uZdgKq/H8BusKgIkv0KLU5ZBR/Zx0CyoUtuFfXXTef1tg5Qtf+ocIDFjCJbCDya22k 1skoGMfF8jTBw2Rf32y2W9XHs3+l/ewWAkGqjAVQYJdZG+cGkNe4O4mS15K3I97WDjvP 6ushlkBF+A9QoJoDgQl0FiTsPAtJrRD9KPy60X//rNi0rMGIagAWOXBWO29t08FINrZ5 xhVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rAnsW+/T"; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si263244ede.307.2021.09.29.08.21.12; Wed, 29 Sep 2021 08:21:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rAnsW+/T"; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345088AbhI2PWw (ORCPT + 5 others); Wed, 29 Sep 2021 11:22:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:33438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344945AbhI2PWw (ORCPT ); Wed, 29 Sep 2021 11:22:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B755260E90; Wed, 29 Sep 2021 15:21:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632928871; bh=hobP6jAeZx6QQ7Ydf7I7XKHrEPYgz0Kcb2X81UWdEzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rAnsW+/TIn7yqICiV7iDnrNvt0wQKf3YWAra0TmD9IjN86NntajbbmC0hw/CURvnM PvD2E9aDInAgphyreNzQHnAoA36uf2KdRHI2ut+zt/1BOCiAfHB2pB7fFTzzJb8DHc 6fTCOFOzXhxkkXz2f9l/eL/Wvlt3qHdaOjoycVdt7ZIotMgj2Ybd/WiM/ugoPyRYXO DB6XAL5O6Usnxa3AqjF1nmvBIFNdOu3ZkV8XzCbV3lQv7PNpdFLnkiwwZneErEa84g 8iWK4y4BuqHp48oRwJMDWgc8oB0UZcj+sT1N9x1D5jKCeZYRtewqEYvjhphw+lNdPc 4aTj6hGxhPNyg== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, misono.tomohiro@fujitsu.com, Mark Brown , Tomohiro Misono Subject: [PATCH v3 4/4] selftests: arm64: Verify that all possible vector lengths are handled Date: Wed, 29 Sep 2021 16:19:25 +0100 Message-Id: <20210929151925.9601-5-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210929151925.9601-1-broonie@kernel.org> References: <20210929151925.9601-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3241; h=from:subject; bh=hobP6jAeZx6QQ7Ydf7I7XKHrEPYgz0Kcb2X81UWdEzg=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhVIP7Fn17ZOJa3L5PcYWuX+0Qn0CBOhU1UrioNDG0 AFh7nqSJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYVSD+wAKCRAk1otyXVSH0FXnB/ 0Z31Lf97w/PUE84vk/vYjxF665UQQCW+tr0sSFdairDNjmq0xQRAAbmfYddgzlmY3hvI6HQ8J4PXiF CqsS5a738kvXrlCa20N+pYeYm3cyP9mT31+9+yfTj//Tx3kqXHgHJmVSPDN+BA/uJTXBZ3Oo5zvBdz uoYh+5TfKbijuaWagurdXFWBM2VaUIKb3UaSmUUou0IKRpRlgngOgN3Dnn9jZtWi29VykK+qYufuQv p+rlJLCu9ykSNr3d/T6FcF0kGt/TTkS8eAGr29DvZ0UNA9FyOh6Q5b9sJUj+QWAlSu/e6EsikrinWb C/GWfDmJGSij4DNEJXgKIlo+SWORiz X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org As part of the enumeration interface for setting vector lengths it is valid to set vector lengths not supported in the system, these will be rounded to a supported vector length and returned from the prctl(). Add a test which exercises this for every valid vector length and makes sure that the return value is as expected and that this is reflected in the actual system state. Signed-off-by: Mark Brown Reviewed-by: Tomohiro Misono --- tools/testing/selftests/arm64/fp/vec-syscfg.c | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) -- 2.20.1 diff --git a/tools/testing/selftests/arm64/fp/vec-syscfg.c b/tools/testing/selftests/arm64/fp/vec-syscfg.c index 9d6ac843e651..272b888e018e 100644 --- a/tools/testing/selftests/arm64/fp/vec-syscfg.c +++ b/tools/testing/selftests/arm64/fp/vec-syscfg.c @@ -540,6 +540,82 @@ static void prctl_set_onexec(struct vec_data *data) file_write_integer(data->default_vl_file, data->default_vl); } +/* For each VQ verify that setting via prctl() does the right thing */ +static void prctl_set_all_vqs(struct vec_data *data) +{ + int ret, vq, vl, new_vl; + int errors = 0; + + if (!data->min_vl || !data->max_vl) { + ksft_test_result_skip("%s Failed to enumerate VLs, not testing VL setting\n", + data->name); + return; + } + + for (vq = SVE_VQ_MIN; vq <= SVE_VQ_MAX; vq++) { + vl = sve_vl_from_vq(vq); + + /* Attempt to set the VL */ + ret = prctl(data->prctl_set, vl); + if (ret < 0) { + errors++; + ksft_print_msg("%s prctl set failed for %d: %d (%s)\n", + data->name, vl, + errno, strerror(errno)); + continue; + } + + new_vl = ret & PR_SVE_VL_LEN_MASK; + + /* Check that we actually have the reported new VL */ + if (data->rdvl() != new_vl) { + ksft_print_msg("Set %s VL %d but RDVL reports %d\n", + data->name, new_vl, data->rdvl()); + errors++; + } + + /* Was that the VL we asked for? */ + if (new_vl == vl) + continue; + + /* Should round up to the minimum VL if below it */ + if (vl < data->min_vl) { + if (new_vl != data->min_vl) { + ksft_print_msg("%s VL %d returned %d not minimum %d\n", + data->name, vl, new_vl, + data->min_vl); + errors++; + } + + continue; + } + + /* Should round down to maximum VL if above it */ + if (vl > data->max_vl) { + if (new_vl != data->max_vl) { + ksft_print_msg("%s VL %d returned %d not maximum %d\n", + data->name, vl, new_vl, + data->max_vl); + errors++; + } + + continue; + } + + /* Otherwise we should've rounded down */ + if (!(new_vl < vl)) { + ksft_print_msg("%s VL %d returned %d, did not round down\n", + data->name, vl, new_vl); + errors++; + + continue; + } + } + + ksft_test_result(errors == 0, "%s prctl() set all VLs, %d errors\n", + data->name, errors); +} + typedef void (*test_type)(struct vec_data *); static const test_type tests[] = { @@ -557,6 +633,7 @@ static const test_type tests[] = { prctl_set_no_child, prctl_set_for_child, prctl_set_onexec, + prctl_set_all_vqs, }; int main(void)