From patchwork Fri Jun 23 01:31:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 111882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp5491014vqr; Thu, 22 Jun 2023 20:05:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62J+aB6S1FZcNX1wzAyC2JBabyCVxecnjUWRluF86PEP53eVleRE/iNHuMpuKc4w/WGgJb X-Received: by 2002:a05:6870:9202:b0:1a2:a6e8:9832 with SMTP id e2-20020a056870920200b001a2a6e89832mr15985821oaf.42.1687489531626; Thu, 22 Jun 2023 20:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687489531; cv=none; d=google.com; s=arc-20160816; b=EVZ3MoIADlFOR0XoIjkjnr6+zlO0vxw07ibIMHURhpCotILJaNJBY+9hW3PiFvhCuP ZDWgZ5Lqoqgra9KhwEJg6KvyVJUV/5bc84nJE9DbUA5xBnp1YS8hTOeaqDFQ/c93smWz rkri2Ja2BHuBgC2rgghioL9GsBxMzo6/SLZhAPbBjEKfXkE5avmFw3GKHE02FM/pjYLO +IgH55jMZPx+1BuBJnbwzxiPPM19f3w0VHTADmiZOkok1lBRP6F2WstlFhn1E8ZFFg6a X+iura9PIWjUU5tEkezIpDfKcen9XVrFfumiEjQ3ZTWR7bsMcsgCLbC/2qZ0na7dVPd/ G5ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=S1RVKpIRv6+F6o6oAQJghJvVPvFFLVwL2aNkoNWPa6g=; b=o16AnwqBVgjAJBemhDeAP0uga4U4vsKzg5dbFjlKfAaecdmvy9wQzKkRFQlSRXcoLa RzhvZAHiVFZCP5RrrWO2N4pvMA67klYlJJDPSvsqlscZ5gsspzcOQuwsyyAebopnbxK6 wJObGLXBsko79yHpOaLGAmLxJpWib9dZWzPaugPscl24tfTcHl6DdByJVLTMx8Sd/elf 94lzsz5GwUNqaOBJ8hqch22EcWnAHZVrf7UgUcHgQNFmdERFBxB0I9ffiNRCh1ILXha6 Ej9u6XjS0+ME9XbxgiM6SVVkGgCKJ3cZKdG/tqqdYsiqFg4gmFSvjLX47aXGqc6IBWLx NwjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a63db44000000b0053f3e6ec82bsi4928194pgi.774.2023.06.22.20.05.19; Thu, 22 Jun 2023 20:05:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbjFWBdo (ORCPT + 99 others); Thu, 22 Jun 2023 21:33:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230038AbjFWBdj (ORCPT ); Thu, 22 Jun 2023 21:33:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A88492107 for ; Thu, 22 Jun 2023 18:33:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (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 dfw.source.kernel.org (Postfix) with ESMTPS id 2A9276194A for ; Fri, 23 Jun 2023 01:33:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90C05C433CC; Fri, 23 Jun 2023 01:33:37 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.96) (envelope-from ) id 1qCVg8-002M7j-1C; Thu, 22 Jun 2023 21:33:36 -0400 Message-ID: <20230623013336.182046869@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 22 Jun 2023 21:31:54 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton , sunliming , Beau Belgrave Subject: [for-linus][PATCH 2/3] selftests/user_events: Enable the event before write_fault test in ftrace self-test References: <20230623013152.037225511@goodmis.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769461022901996378?= X-GMAIL-MSGID: =?utf-8?q?1769461022901996378?= From: sunliming The user_event has not been enabled in write_fault test in ftrace self-test, Just enable it. Link: https://lkml.kernel.org/r/20230621063438.154271-1-sunliming@kylinos.cn Signed-off-by: sunliming Acked-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) --- tools/testing/selftests/user_events/ftrace_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/user_events/ftrace_test.c b/tools/testing/selftests/user_events/ftrace_test.c index eb6904d89f14..88898749e5b7 100644 --- a/tools/testing/selftests/user_events/ftrace_test.c +++ b/tools/testing/selftests/user_events/ftrace_test.c @@ -400,6 +400,10 @@ TEST_F(user, write_fault) { ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, ®)); ASSERT_EQ(0, reg.write_index); + /* Enable event */ + self->enable_fd = open(enable_file, O_RDWR); + ASSERT_NE(-1, write(self->enable_fd, "1", sizeof("1"))) + /* Write should work normally */ ASSERT_NE(-1, writev(self->data_fd, (const struct iovec *)io, 2));