From patchwork Fri Oct 20 17:20:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 13430975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E414CDB474 for ; Fri, 20 Oct 2023 17:20:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229905AbjJTRUF (ORCPT ); Fri, 20 Oct 2023 13:20:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbjJTRUE (ORCPT ); Fri, 20 Oct 2023 13:20:04 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DF3BA3 for ; Fri, 20 Oct 2023 10:20:02 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-351610727adso1459105ab.0 for ; Fri, 20 Oct 2023 10:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1697822402; x=1698427202; darn=vger.kernel.org; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=6Jk3ZSSeatr3lIVeOg2wA+LI5enZ+MOKk3ZrYh+aCyY=; b=BK0i2PChpnzpg/w07GQYKfHRpodtcFllZcIu4/UcDDx8w9tWzVAy9Ok+NKD6VrcysS qLlXhObKy0/TRKHqzpOJWdgUlA56G/4CX2wNO57iMaBvVkZdrYnCn1omv6tuTmrD+7Db goQn6Fb6mWuLNVs2dWAeGYJ8Ra8HqUbXXosAs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697822402; x=1698427202; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6Jk3ZSSeatr3lIVeOg2wA+LI5enZ+MOKk3ZrYh+aCyY=; b=aZDuzCgJJkTisfjCrgsxyzczDSlnUV1bJoebDEavwnDehEPULsFqYufSi4+wUmxsZs iFXzi71XpLIJ6DNDgHgLJmihkdfq48YaN68wQ75NPCMGjO20HWAcg5x0pJEDU5rWMak+ RtfV+wLn/RWhCjKmPI0gH4PZ5PmoyZwT2NGMa7yISDQxzr5f1g/V0fPezU5qv/BQCWXd +Hg7O9BDZ6L+aFSjzY4LDRBLdoJaacmBp9QMWrURDTx+CzWlUYpuiEwHKxMEGCxwRkK1 goUi9p5iBzotby0MbPVJq+caEDtsjhgPWda4pZnxWpUWPOH6gr2NxgImUqw7FeQX2Tbf FYYw== X-Gm-Message-State: AOJu0YzUebhFpcKrgoYCH1xLEJKKz7dNmQ09vkUb8X4RPExOahiRe9cB cNWdcU0qW1Xu0baDHSMnRqRnPQ== X-Google-Smtp-Source: AGHT+IG5s/Wh0GiXVTRHGycjRqrkjj2WP6fjXT7R4vfOijDNRJcy+ruHZRUjngHSuX9EL04wbvxIcQ== X-Received: by 2002:a05:6602:2c88:b0:7a6:7d87:1181 with SMTP id i8-20020a0566022c8800b007a67d871181mr3432486iow.2.1697822401899; Fri, 20 Oct 2023 10:20:01 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id gw8-20020a0566381ee800b00437a3c128dfsm655349jab.108.2023.10.20.10.20.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Oct 2023 10:20:01 -0700 (PDT) Message-ID: <817898d0-dbe1-4016-af10-abd1731748ea@linuxfoundation.org> Date: Fri, 20 Oct 2023 11:20:00 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Linus Torvalds Cc: shuah , skhan@linuxfoundation.org, Steven Rostedt , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org From: Shuah Khan Subject: [GIT PULL] Kselftest fixes update for Linux 6.6-rc7 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Hi Linus, Please pull the following Kselftest fixes update for Linux 6.6-rc7. This Kselftest update for Linux 6.6-rc7 consists of one single fix to assert check in user_events abi_test to properly check bit value on Big Endian architectures. The current code treats the bit values as Little Endian and the check fails on Big Endian. diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 6f874fa021dfc7bf37f4f37da3a5aaa41fe9c39c: selftests: Fix wrong TARGET in kselftest top level Makefile (2023-09-26 18:47:37 -0600) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest_active-fixes-6.6-rc7 for you to fetch changes up to cf5a103c98a6fb9ee3164334cb5502df6360749b: selftests/user_events: Fix abi_test for BE archs (2023-10-17 15:07:19 -0600) ---------------------------------------------------------------- linux_kselftest_active-fixes-6.6-rc7 This Kselftest update for Linux 6.6-rc7 consists of one single fix to assert check in user_events abi_test to properly check bit value on Big Endian architectures. The current code treats the bit values as Little Endian and the check fails on Big Endian. ---------------------------------------------------------------- Beau Belgrave (1): selftests/user_events: Fix abi_test for BE archs tools/testing/selftests/user_events/abi_test.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------- diff --git a/tools/testing/selftests/user_events/abi_test.c b/tools/testing/selftests/user_events/abi_test.c index 8202f1327c39..f5575ef2007c 100644 --- a/tools/testing/selftests/user_events/abi_test.c +++ b/tools/testing/selftests/user_events/abi_test.c @@ -47,7 +47,7 @@ static int change_event(bool enable) return ret; } -static int reg_enable(long *enable, int size, int bit) +static int reg_enable(void *enable, int size, int bit) { struct user_reg reg = {0}; int fd = open(data_file, O_RDWR); @@ -69,7 +69,7 @@ static int reg_enable(long *enable, int size, int bit) return ret; } -static int reg_disable(long *enable, int bit) +static int reg_disable(void *enable, int bit) { struct user_unreg reg = {0}; int fd = open(data_file, O_RDWR); @@ -90,7 +90,8 @@ static int reg_disable(long *enable, int bit) } FIXTURE(user) { - long check; + int check; + long check_long; bool umount; }; @@ -99,6 +100,7 @@ FIXTURE_SETUP(user) { change_event(false); self->check = 0; + self->check_long = 0; } FIXTURE_TEARDOWN(user) { @@ -136,9 +138,9 @@ TEST_F(user, bit_sizes) { #if BITS_PER_LONG == 8 /* Allow 0-64 bits for 64-bit */ - ASSERT_EQ(0, reg_enable(&self->check, sizeof(long), 63)); - ASSERT_NE(0, reg_enable(&self->check, sizeof(long), 64)); - ASSERT_EQ(0, reg_disable(&self->check, 63)); + ASSERT_EQ(0, reg_enable(&self->check_long, sizeof(long), 63)); + ASSERT_NE(0, reg_enable(&self->check_long, sizeof(long), 64)); + ASSERT_EQ(0, reg_disable(&self->check_long, 63)); #endif /* Disallowed sizes (everything beside 4 and 8) */ @@ -200,7 +202,7 @@ static int clone_check(void *check) for (i = 0; i < 10; ++i) { usleep(100000); - if (*(long *)check) + if (*(int *)check) return 0; }