From patchwork Mon Sep 13 12:37:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 509724 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp516745jao; Mon, 13 Sep 2021 05:43:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9cxLwJ1dZ+i20b/2+C8VVq5Q1DSuAZkOUdsXUuTWz2R5zG8voArC2YTeC78srKshExBTs X-Received: by 2002:a17:906:2ed1:: with SMTP id s17mr13064103eji.261.1631537002675; Mon, 13 Sep 2021 05:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631537002; cv=none; d=google.com; s=arc-20160816; b=GHbmcqmO3nqxnO14YNy9jGjO8JhNnF+mbzn5+bEU4P+86RqHKqaef6sdntVlPzKhdK RKEHr+tc2nasZ6wN6O0Hk70iKsgB+m4N+BihtXaRvvaofhHLKtoTZ02vb+rTFMUtW22g CzY8hSWHCeXg4GjZwTeVORzN3sigELdYbh3tEKngo30Pe4ufhGsqVG8eNyWiWPtsQK4W w8l0JMJK1F2x1txDn9iNKHydpz9FU4A17jRr0FrAoNXNgb6dMwXqCu1pD6oJgdPPuzU+ xtUE3PIVSAUVoI7Q/CBk0Fk172NtWoQqlCC8S8pPEdKpW5uDWXuIMgkwsyHHmjQyRyE8 ChVw== 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=f9Adwr6m4GQyHYTZ/fg67H4fDAa7i0nRJTeowZ2JlpN+r9q4KfmkK5CV0ojGdcH3RI Q2Lx7mvJqLBb6HcZKY0nWIG3TvkEE0pur9eqLcrt6pXHPPLtRgxXkxe0PvfOEWJvYOyv yg33MBrw1Rt0LfNtsmQVRbeHciSWy7lkQdBEAlbS0H2wLxJKFwQTnmBgx8SsvJY7pc0H tdga02TSXhIh04nrC7QalGVEpd6ejUxwg06/MU3hXSRIuhi2fVZKCIiuAZNvqgkYPpRE 1u//ch6LFC7svc4vx891heEFtv7zcDcnM2l40uJb5LQEhbgdZ7Myn69Lyi9YE2i7RxQl BnCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EnnBgC2f; 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 h14si9230418eje.454.2021.09.13.05.43.22; Mon, 13 Sep 2021 05:43:22 -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=EnnBgC2f; 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 S239312AbhIMMoh (ORCPT + 5 others); Mon, 13 Sep 2021 08:44:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:34210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238241AbhIMMoh (ORCPT ); Mon, 13 Sep 2021 08:44:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C86C60FC0; Mon, 13 Sep 2021 12:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631537001; bh=7ylfGXXJ8kffqS5H5ss3UKZCeSeFg8BoMiJBHNfE90c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EnnBgC2fW/3J0LuQWXX69BJiLMOb3CNaaqbcHeUNhKEqMDxK2DAp6jJs/4hZ24PkV yFdlbFXofgJJ1HzfYcwAGdhu5OMFy453KLkmIEqu6peeGsSTt4jdygtDV7rCZhGu9R /kobpvH4R+OJO03fw8KHF6PIE8pDB7+us5GhYPqcXdzHD5FB/HIjZz475WwRcmEegu 8xhC/bnESTbSdExEirsPBXW9BzzW9PFjC+BqhYWa+Og+cOM68HB7vJYiyTLl1DpnoS SCbSi2/lnUcfzJvwM9kf1Ay8oLngk3zltWSXmdom/xNLFKnyyxZMVFVJ7uDSZ1pWm5 kilp60RhWm4XQ== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 1/4] selftests: arm64: Fix printf() format mismatch in vec-syscfg Date: Mon, 13 Sep 2021 13:37:08 +0100 Message-Id: <20210913123711.51274-2-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210913123711.51274-1-broonie@kernel.org> References: <20210913123711.51274-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=901; h=from:subject; bh=7ylfGXXJ8kffqS5H5ss3UKZCeSeFg8BoMiJBHNfE90c=; b=owEBbAGT/pANAwAKASTWi3JdVIfQAcsmYgBhP0XzFfNKGnLFWLyli3f4LmQge9pq7YMt+YL9ck0m EvunI0qJATIEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYT9F8wAKCRAk1otyXVSH0D1oB/ d8QBXxLHdu12m4axhxQNTZp0jwE1nMwX8YNO/O4qYkhJGweMoZZpbs20jBPisH+ZCXr0hBd9sXpQbA MORNM/SM1rsZ42ys9voNK3UoHJZEjjArYz0trppwgwqAWcjhyII3iu2npRDxmY87ObjJ3FC1ahDv8T Ps89IbUvetuzIsJKPB3Ml7KjFD1cvWGBC2VMBtekiWhWp/BDPxSPesL3lI3FjbWzgq0G4J6Msmonqc fUtReEtHXZfVPUBtjvkN2JcxcMxNiOi7M/DEM3UV/9lJ2RpmVQUqBDFLhL9/zmdIV8kyC+saDJhOMC SoxKjVJs++PifnImPKl9TrXjHeerw= 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 Mon Sep 13 12:37:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 509725 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp516782jao; Mon, 13 Sep 2021 05:43:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznT8I9pxaK2rdjpeSON76hcqlianN7S/xQJhb0PPcRjBvxHI/LuwbhTzO6G9fKfFKYHu09 X-Received: by 2002:a17:906:2887:: with SMTP id o7mr12396031ejd.425.1631537005608; Mon, 13 Sep 2021 05:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631537005; cv=none; d=google.com; s=arc-20160816; b=e+GU4xZyHZp0JUZ/ivB8F9Tvnr4FF0348n2DQCQgGzUdkIXHxXw4tZJBbrVY/PWOFO MlLbu/Wrnez4C3+CXAsMc5IVuYxrFKRO/SdnurkGR5Gk2NdeGHRn8grQD1Mzp5v1Vsjl WIfTHj4tHbRMytj3EBsSFM+2fk887lcVAEmq6s1C+lQKGdxv7cfh0/6Ua8E+e7S2As0h KCLN8XE+jd6OO+r2LY8/ztkfyf30mCBXg5x19kn3EydTQrvvMHj4pwZMMKCPV0HFtN22 CVZvM2FsY9eweLaHGVYeW5M00/A+HTe9TCI4msf1cHBvIayN9lmnajD280wL69pqsfAU QcrA== 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=XiYDUzKYKqn/K1Bz06RooPrL8eJLHdgOx9gNgRvm0oaCV0Bwf6tXr/6MX5m9NDgpPd sa1ZNkTH8LVD2P/tzFGxNd+7HVjCnCZU3gDr/HNInSdWwxSMRjwAztKANKAQXXA4juNL GEuPItg7y6cIIKyA0Kfv4OEiLif9l5KXgpqbGeMfGKO0yS5VH5alrS09Pvhpmrs8bGbz WPDPoY5RKaNqbouveWxjM+ezEpgGcmwJUAlMqlLxqZJPqUukTrk6ojygxEN5kaBsW7TB kndNSmvLxmWYGajvcbAWY7HOWX2tLxX3Zq+3xs6FSpVJS/rdAkVlqh7XJvn7eHCVboUN 7XCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Uh7vPwgY; 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 h14si9230418eje.454.2021.09.13.05.43.25; Mon, 13 Sep 2021 05:43:25 -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=Uh7vPwgY; 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 S236260AbhIMMok (ORCPT + 5 others); Mon, 13 Sep 2021 08:44:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:34270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238241AbhIMMoj (ORCPT ); Mon, 13 Sep 2021 08:44:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BAD9660FBF; Mon, 13 Sep 2021 12:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631537004; bh=yJ4ueh+BO+Eim5GlQAHvD/jC8/yyMw/A2pszTTlipf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uh7vPwgYDUjDa0Ka1KtcHPOvbYjYireDALG+UCMqB5zH1I+QzXU7kssiZ9Sv7aDJ0 C+JVpDhRluKGMBK4A5APeW1ozq1gmAAUgwBOmL+4Au20gaKoOf9HFptPuXHLgJP7LH yfzI3ko9NOtNH9Bx8BzcGVg4gU7iHPS8DcwJNc3OD85FKCoQG/oIWb+TXgNOToIsfe LnxtQvRLS+QD5LPr0Mqdr1AKxiK3KDNYoPIp9bPAIn63bIqqndplIsrTX2E5KNj7L2 mgDX/Ok1m7fCgDz1wF8gu1VQOEId/3pIwmBm6hjnDxFyBCZk/gsseQK//cJdW/98eG CBeTkiUYalMpg== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 2/4] selftests: arm64: Remove bogus error check on writing to files Date: Mon, 13 Sep 2021 13:37:09 +0100 Message-Id: <20210913123711.51274-3-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210913123711.51274-1-broonie@kernel.org> References: <20210913123711.51274-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/pANAwAKASTWi3JdVIfQAcsmYgBhP0X0GHlxtnIY4Eu/5/J5cdKSDM5mRmL00dmRJpB8 pcoNJEyJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYT9F9AAKCRAk1otyXVSH0AbNB/ 97T/ElaD18tKfvi6H8tjzaKDZp3Lis7lsloiDMe2ZznGjX7kDm2EY6c9liJYAsynngFKLCoPotrMVS mjQxUnFfo3ktFrSol91MMls0M1jVPd1CTc/QWDYArFbOSFck9YzaTG3blB8Kl4nqsD4hdhY+RlUKB7 sSmoh1AvQgkueZzplBnuM/sGOFZHkqZT4mizvP4ySzrpjjhj6q+CvCPDwmYZhU3CTCeNMFKkJt9/bQ v+n1ratWmfPG0Y/1IfJmxnE9BhhR7qVsgDHMrj20z4HAzDVUhu7rSVzEv4nSC5I7ivqsxQ0S8oNVKg srTsxhFB9yLGuEwdluUPm10Hs//dol 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 Mon Sep 13 12:37:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 509726 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp516809jao; Mon, 13 Sep 2021 05:43:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0aZhw2J4/jGL46eJ/tn2UhWwAJLNQCL92Hr/o3oZifUvVAwjpary2t0aZKhBSXnp+XnVr X-Received: by 2002:a17:906:8608:: with SMTP id o8mr12569574ejx.470.1631537007994; Mon, 13 Sep 2021 05:43:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631537007; cv=none; d=google.com; s=arc-20160816; b=TZ50onzbG8BznTmx+g0IxRvG7eSBJg1f1agq9eKDt7b03jMV7FX7+2Pw4+us2XMpje ISvM8X1HO/w/rGJAZ9UF0TQVprFCbqes4jzhyxEDhLKfLt9XWELToJqhAFBIBB0dXrhk OBw6F8pvkX0nK4m+YTwJPqFHEUuia93uQC36T7/XF4rtaa2uFQ/E7ZJjoCDW8A3omWgs Cm257QiEnozXtdhKZXGP/71/SFwrOAGvVDAKQlWLpJGzcFJrDmQtUcokeAdU154bXQVc vd0KOxtkFXBUmrOGe8tAJNY0X6rmLli1JZG4F666fZxE6PjxgtVlg+vBN03h5FtscKo/ b5QA== 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=g7WXZzkoLo5f8F1Os2dg1Jm8OXicSegvz8fQCgq2Rhg53vnlMzh6hV4b3In0uE9Gxp 0iU9/tM+N5ZyIRyiCuv5dzp3HsF1kJ3O2MOttpgnjq/hkELkO/pafBtfO2SXuroNRu+c Ptn1NHtJbH5tZ/xdEwIchmflRriq1nrK2DdIDlYzb1Y6PNiv7QBhqjMzwySbZjiN4iut zk7JswHqWQ1QvMshZzOfbJn9/nqOyNKUx3dpFLRWH4PTbly814hbSXdZQi5TUeuBbsbD irtHsoMKh0Rp2gCT1KqbR7MoOvCKo5rTyDM9558a+JSVBwBbVwoLiD/uMDvFx6QiEPHV blKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hsVlkaUr; 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 h14si9230418eje.454.2021.09.13.05.43.27; Mon, 13 Sep 2021 05:43:27 -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=hsVlkaUr; 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 S236197AbhIMMom (ORCPT + 5 others); Mon, 13 Sep 2021 08:44:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:34332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236172AbhIMMom (ORCPT ); Mon, 13 Sep 2021 08:44:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6778160C51; Mon, 13 Sep 2021 12:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631537006; bh=034J/1+mWeQStGpdMFtVOiBVU1WdpiXGK6aJYR8cNz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hsVlkaUrS+3ekkQW+0XLo0Cy4RXS0q0rlm3/jiNgVzKgxf8U47jTWa+ctvI5U/8O3 hJDcXgKcvAGj0PTWj1p5oBqcgHUoJwJ2RAb//xEUT8kQawZl34bgoUZJJG/x77NCNp oty8QD2pe8JGKOivjpWAPc84TpM0Uv3aMSsxlME9A9VjoE9vgl4O+MiqyjfhxsZ1mA JdptSp6kNr3mZq2gGBWUFLcezvUUjeFu3K5XEPKUBdcoy1xsjEOkejxZ/FwTMBtuSw 4brEbteyUznBM20PzpYtjS/6BiMNCvVjyJzc4cbd0c9BgEQoo0gQ2HxfK9Rpb+YFgw W9dnXfxTN4dzA== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 3/4] selftests: arm64: Fix and enable test for setting current VL in vec-syscfg Date: Mon, 13 Sep 2021 13:37:10 +0100 Message-Id: <20210913123711.51274-4-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210913123711.51274-1-broonie@kernel.org> References: <20210913123711.51274-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/pANAwAKASTWi3JdVIfQAcsmYgBhP0X1FuBDgWBwg6p1HNOQXNGec+AhKNKFSyB3BGEV FVIWvTmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYT9F9QAKCRAk1otyXVSH0K3LB/ 9KtfrwHWNbfN2vcRqvKPgp1aiw6Ai2pS1ug/5gOHZ86dac0ofWR27zcyN+2AphQM8icX+DqL+jrv/b jBee9Ef8e5vtGXZky1rfPVMsqcvk7MyP5yDCSCxtGeljYR28Gr7bM/msbHsndwhrv5LItp0U0pdZcM XO9OfQV5wp4QMwTT/A0Zca3d8jECf6H2uhcu1mLWAwlopKzkmBLi4blt4gqOEcvLYT73ZNWvNzJp2C HkKUkPaaI/0ZhPL93YUU0TrO6ejsPatNgfVUFodCOM/qy8iamPnzaUU+b+gRhTDnmuq8TKCbpA2yEk /eFChSROYjhJ20x6N+lYNnwF8/yFMl 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 Mon Sep 13 12:37:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 509727 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp516858jao; Mon, 13 Sep 2021 05:43:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvB8n0iLDUXAtfIzpUxsjtnnHQJwTwz6bhFXKp3yjbDczqAcXRswSqGlufC4Zg77wwZIKU X-Received: by 2002:a05:6402:742:: with SMTP id p2mr10410264edy.347.1631537011046; Mon, 13 Sep 2021 05:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631537011; cv=none; d=google.com; s=arc-20160816; b=yje1iOZ0GLTFzcdvplNfmXydToYL2b98uirT9L5T82LHALHuAv6RDzEBfSeKfkiUN9 d7KEIgPBY04aTuTqXEkKUZefm5tL3ExmOoQQhoBi7Y8tSLBnAEiHnsfrUfqi8odgxjxz kOHx/Ceud3D90LqN6cNUre5WxAJca/pCwbPAYA7T3PQ9Z16AdCBrMtxnSDetDjz2J4D7 2o9wKcuQ3Qclwo44wtOzAFQx6PzIyegOC3jxoCg8XwzgJTRrrlhB7rXT3WEpxhODiz5p 8UfmK6VZ+Ho5vujm0qKk+oYIJ+1tdTFp5WktjMYZvqsjrXwQGHtmoZLLkIPP08cKY+2h IRBg== 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=2CLQ8oZAYugiE/MMkbohR0Mk6+4WW5/1pbat4cvz+8A=; b=vOo2zUw3Be2ipY8Kb1CbjA9X0zjtokUQTthaFj+R8m9lZlC8Nm3EFb7hOXz15tH/Zx 20tQafNAheQBxRaaJ6IgIFcn6ONV9SkLGg5HHJG+2ZLY3jNu/cRkF0QWuGm1YKcvNsxg xbt/y856yISevBhTp9colxdFXbRXcD+ysUvfah7RU0dYNPitfPUHcxaMtPURNIFHsTD7 v02ENaEImi2zv4tAuC7voZBJvMit5DO5/WdcrP6T40cF4QjzbsAvJeRAl3AGC2ou6Ojm 9DZCx6Z/crrs1QPZMRlatI63k9igC9iuV58iWUIqdkVqpD1z5pttfe8sOKlKp5RzeH9j WfXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k9gjwORF; 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 h14si9230418eje.454.2021.09.13.05.43.30; Mon, 13 Sep 2021 05:43:31 -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=k9gjwORF; 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 S236229AbhIMMop (ORCPT + 5 others); Mon, 13 Sep 2021 08:44:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:34396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236172AbhIMMop (ORCPT ); Mon, 13 Sep 2021 08:44:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED36760FBF; Mon, 13 Sep 2021 12:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631537009; bh=fTru8C82+qEoFuIVsOagDGbJOwRBZlo5okum4GyeuLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k9gjwORFGr+vn3sbOiP4bKF25LrRbq0ABDo/IFz97eOSMFZt2cirE6eYWIy8jxP9e h/MJQQ+h3ODtZv6iF+WMrZeWiQRXuiz+S4mwIj1Cjc1QyVne9a+gbQKnQxgK7iMYAD S32gR2Mehs1hclwtgQW6LmdPSxpcw7LeaAHPG6V/nkzrl63RrIp3U9DjsVcG2r4b/J S5vWAPX5AWVQAO/FvlTtvFZh9SFexuNltWPBPWoAgcCVmt3eVkMKtYsOPyqNPgPIQn QgD0ywwyCuToqRZCvE+RW1P+5QWR+MOFas2Zr+aRJcWe+PjKHxKAy8F7bzG0Ue0+m0 ieCwT3p2K1Neg== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 4/4] selftests: arm64: Verify that all possible vector lengths are handled Date: Mon, 13 Sep 2021 13:37:11 +0100 Message-Id: <20210913123711.51274-5-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210913123711.51274-1-broonie@kernel.org> References: <20210913123711.51274-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3181; h=from:subject; bh=fTru8C82+qEoFuIVsOagDGbJOwRBZlo5okum4GyeuLU=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhP0X1EJPUcKg2bw9frFI4J4texy0Ys97Sn2UTStdF BB8S2geJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYT9F9QAKCRAk1otyXVSH0HJ4B/ 0QksbnyUPgUTB3xEDuwrycz8LvUbA3Fjv/p3NvAtntuTytyTFGA3VyD851PKGaGIqDMtA2GPByYm2i zyosu0TlFg/eIq5vK8A5Isp6rfCF4Q8yCX9Q9HGfKFFcBxlgR/lE40FMtZNqc6FFWyZU1dORECRtjb BoLanFsM71ZI82/raBhfX5SraaGyeBZXPYANsFeVzreIK7hG/p3jdlQnAIR3EbGQ7KliJpdaQj5MJ3 4RI39UkbvHvWDWpqje/ahvaFEAXpROYHz1Ehv7e2p0aus6dqok63Wj/+DQoQI3iaKCoal/L9GwTxwE 9j5KUowa5VVRlZbpuEukjnY7BOnlxQ 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 --- tools/testing/selftests/arm64/fp/vec-syscfg.c | 76 +++++++++++++++++++ 1 file changed, 76 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..61e9704e03fe 100644 --- a/tools/testing/selftests/arm64/fp/vec-syscfg.c +++ b/tools/testing/selftests/arm64/fp/vec-syscfg.c @@ -540,6 +540,81 @@ 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; + + 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; + } + + /* We should've hit one of the other cases... */ + ksft_print_msg("%s VL %d returned %d test logic failure\n", + data->name, vl, new_vl); + errors++; + } + + 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 +632,7 @@ static const test_type tests[] = { prctl_set_no_child, prctl_set_for_child, prctl_set_onexec, + prctl_set_all_vqs, }; int main(void)