Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp1805031rdb; Thu, 17 Aug 2023 02:33:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSabKfjLyAM9QO8nIQKhDjxrzijU8F1LemYL6aG5MmAcovNdgbZSJcYrU3Nxcmlxr3uq3j X-Received: by 2002:a17:906:8465:b0:99d:dc87:5f29 with SMTP id hx5-20020a170906846500b0099ddc875f29mr3320427ejc.12.1692264781900; Thu, 17 Aug 2023 02:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692264781; cv=none; d=google.com; s=arc-20160816; b=cTuzXkoTytNQn9jZ3TgHVzpYMYQPn78d1MRqg0LCBTsxX+nkOoZn6PdylxtW0Yg3dN n0fTlJHhJdmbX2emLR6CPajdzUm7jnodJ6vcsNTufg6Rw9tQxBa+Xh560xAIHW2fy4+o +B2MOHR6aj8wUqRU4y98oy6UJrcOL59FVUlyBbSGbi46Xf4kApv+SZo+XPN64qyRG4++ UYY7g5meG96w3EKXgfqpoMTZhEHDhN3i2MLk73wlaLkSoRGWYnyQA8LqOi6tdHHERc3z FD/NpngywQG+d5v0MHDz4KjNeDJmaJ/xl3VU95wCeziGy4idPgF8UGp05LS6zRC4vZtG nHVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=HQGrDlew+lj5JhC6IjUuDnI8WhPzsQYKGb67zzRBdpo=; fh=cCBbjGS4CyPgtwkMkL8vbJJUvANBdokG0Vt8Q3DW7ew=; b=QjuE/fssITvB8h6nawg7ZIpjaGQoKNDycqd+tyMMiaq1B2pTBk/1Mx3a+j3RcS75Ja OArJAkzdKN6Rg/wh2rNPiMQD3aNG7uPG/QFJ5yEUrcVeMw+f+SNg2tQ9Alk0M1Bo3Wk1 WhMbascS+uQq+KL3CyB2bR6Yv2VjGZOqNBq9B1MW633B8hq4kh/A5OsjG6gJiwwSMZdh bTNBPMhtlyv8TXV8nxMc2mU5lsgg+u/i9BDYjqBYMZx9IsJBF1BoOlRJEIMvYkj+zc5I w4OFkJMl0448j2HOXa/KiffdkKVPaZeStzJBtr5eVx33RJ4rqTKM/LkwQYP6BxyIM3zy GLPA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jt26-20020a170906dfda00b0099c97c1e8a5si12238770ejc.92.2023.08.17.02.32.37; Thu, 17 Aug 2023 02:33:01 -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 S1348379AbjHQHWp (ORCPT + 99 others); Thu, 17 Aug 2023 03:22:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348416AbjHQHWk (ORCPT ); Thu, 17 Aug 2023 03:22:40 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49658272D; Thu, 17 Aug 2023 00:22:35 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8AxV_G4yt1kBmsZAA--.52655S3; Thu, 17 Aug 2023 15:22:32 +0800 (CST) Received: from [10.130.0.149] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Ax98y3yt1kA5JcAA--.10201S3; Thu, 17 Aug 2023 15:22:32 +0800 (CST) Subject: Re: [PATCH v6] selftests/clone3: Fix broken test under !CONFIG_TIME_NS To: Shuah Khan , Shuah Khan , Christian Brauner , Thomas Gleixner References: <1689066814-13295-1-git-send-email-yangtiezhu@loongson.cn> Cc: linux-kselftest@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn From: Tiezhu Yang Message-ID: <0560a851-5e8c-d82a-8445-a16a92b967c9@loongson.cn> Date: Thu, 17 Aug 2023 15:22:31 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1689066814-13295-1-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8Ax98y3yt1kA5JcAA--.10201S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7tF1DKw4rtw43Aw1xZFW8AFc_yoW8WryUpF W8ZFsrKFZ5W347tFZrZw1qgFW5JF4kJFWjqryUW34DGrySgwn3Xr47Ka48Aa4jg34Fv34F yayxGF43ur1UX3gCm3ZEXasCq-sJn29KB7ZKAUJUUUUx529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUPab4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUAVWUtwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU tVWrXwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI4 8JMxk0xIA0c2IEe2xFo4CEbIxvr21lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vI r41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67 AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIY rxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14 v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWx JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4Xo7DU UUU X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS 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 Hi Shuah, On 07/11/2023 05:13 PM, Tiezhu Yang wrote: > When execute the following command to test clone3 under !CONFIG_TIME_NS: > > # make headers && cd tools/testing/selftests/clone3 && make && ./clone3 > > we can see the following error info: > > # [7538] Trying clone3() with flags 0x80 (size 0) > # Invalid argument - Failed to create new process > # [7538] clone3() with flags says: -22 expected 0 > not ok 18 [7538] Result (-22) is different than expected (0) > ... > # Totals: pass:18 fail:1 xfail:0 xpass:0 skip:0 error:0 > > This is because if CONFIG_TIME_NS is not set, but the flag > CLONE_NEWTIME (0x80) is used to clone a time namespace, it > will return -EINVAL in copy_time_ns(). > > If kernel does not support CONFIG_TIME_NS, /proc/self/ns/time > will be not exist, and then we should skip clone3() test with > CLONE_NEWTIME. > > With this patch under !CONFIG_TIME_NS: > > # make headers && cd tools/testing/selftests/clone3 && make && ./clone3 > ... > # Time namespaces are not supported > ok 18 # SKIP Skipping clone3() with CLONE_NEWTIME > ... > # Totals: pass:18 fail:0 xfail:0 xpass:0 skip:1 error:0 > > Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > Suggested-by: Thomas Gleixner > Signed-off-by: Tiezhu Yang > --- > > v6: Rebase on 6.5-rc1 and update the commit message > > tools/testing/selftests/clone3/clone3.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > Hi Shuah, Any comments? I guess this should go through the linux-kselftest tree. Thanks, Tiezhu