Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp590976rwd; Wed, 31 May 2023 02:38:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7flhQhU3oTjg/wLXAkzWC8hr0G8dZnvl+6WYXqfcjsXXxTnwt29kPKOA06i/355LOARhv6 X-Received: by 2002:a05:6a20:258c:b0:111:26ee:8ed with SMTP id k12-20020a056a20258c00b0011126ee08edmr8696175pzd.24.1685525912170; Wed, 31 May 2023 02:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685525912; cv=none; d=google.com; s=arc-20160816; b=dSoXWiIafxl1Gf3aFQG7nCbe7F0t3sgsPQTIaiZSxIquxiHZnt4THkHAYnUIJ+4Erl ag7QI423ZIe43AQL9dd13MPSQZEWKQ3ASYudpfiOYSskA4YjC1e3UrZ5niVQiWxEnIDm eDotCN++H0zowJ4/ZiWlQ2kI/U3yZwvzf+TMBGQLxd95r9t9Wq2TfBSANO/nhXIQPgwK bwb9DFnXHxsAhIGzN9e56BLEaoX5GWeXO7wzN1Mm1JO/Cq0Fk0xubN3aesF0XoGvw0Og fzRsUsav4FwYtmTRfh3saEHzatEs7ZS1uORXyZEE2if3alt1n1/uq6SwzfA6zdCH0cPP TjQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=zEwS13PweNb4v6/q/yHlwEjWehGeBMGdh97AiFB1MBk=; b=h3gUZ0G5mbDz2hgnLHYvj9MkG9EQrse03yY1V41Kzhv8979fdvMj3cqHXTxThaJdcW ujFYVxONrLhXaAVsFAdYyxzcOMuLUhYqWjbpFLeTn4fgjjm7qHGmZ+4EquY+GwZi3iHq o/rxyB9gEuYUpG3CwpM0rrU7eIaveZKDv4Le0ck5g7Tk5g+ajkuiGVZSA7RQk+lcP6/9 d6pGHhsj22Zqa/GwVX/tcuW3CKXf+4Sv4rwJZrEqS+M4LJ1SD3goCVVLJGsLR3iQp0XF dUx7D8UxVutPT/hgQmVDexpWStbH/G+N7vxjpswkQovWmxXLBcnKnpun0WHaWmOgjOex CmZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HcicfrKI; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b21-20020a639315000000b005341d2aa9dfsi677879pge.622.2023.05.31.02.38.18; Wed, 31 May 2023 02:38:32 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HcicfrKI; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232213AbjEaJVl (ORCPT + 99 others); Wed, 31 May 2023 05:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235391AbjEaJVj (ORCPT ); Wed, 31 May 2023 05:21:39 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7200113 for ; Wed, 31 May 2023 02:21:36 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685524894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zEwS13PweNb4v6/q/yHlwEjWehGeBMGdh97AiFB1MBk=; b=HcicfrKIFFQnGH3RCfvJPoHcRCGwwGXryIMvN71dgCKi2BhyIRiFUABc93u9yqOo1sB9ej NlGV/jm2Mesg8yptFTp1yG9DbSuXDKFEHWcb/sRRjkgtvPSfPEKjUG4WysLijCJAoenf0U wsEv5PsmHZGQOojgb1Twx5Bl4zGmEWKh9yExXgVDrClVgyMNWybcHrQdJTSWD5/PIC98fr BOYO9Iv2jVEYZCXKKl9ySSrDeF0l1hqfRXmMpZbSy1hHBl9X3RkY5R5X9fO5E3rvHuUyit AqHi8+PuakteXaePX+WwDDUC3LpNbG8DOxQDkkWrxhZb+7SKHqNv+V37UReNUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685524894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zEwS13PweNb4v6/q/yHlwEjWehGeBMGdh97AiFB1MBk=; b=9+o7sNoVuKLWRnNsTH2s5Pg/UFqC41oelnZZyTL9DNKpqy6u4FdTYndLn6MnIXsZB9Y9c7 okMBQMmoK2OpsRBQ== To: Tiezhu Yang , Huacai Chen , WANG Xuerui , Christian Brauner , Andy Lutomirski , Vincenzo Frascino Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: Re: [PATCH v3] LoongArch: Add support to clone a time namespace In-Reply-To: <1685519761-20425-1-git-send-email-yangtiezhu@loongson.cn> References: <1685519761-20425-1-git-send-email-yangtiezhu@loongson.cn> Date: Wed, 31 May 2023 11:21:33 +0200 Message-ID: <87bki0hn4y.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Wed, May 31 2023 at 15:56, Tiezhu Yang wrote: > When execute the following command to test clone3 on LoongArch: > > # cd tools/testing/selftests/clone3 && make && ./clone3 > > we can see the following error info: > > # [5719] Trying clone3() with flags 0x80 (size 0) > # Invalid argument - Failed to create new process > # [5719] clone3() with flags says: -22 expected 0 > not ok 18 [5719] Result (-22) is different than expected (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(). Which means that test case is broken. > With this patch, the following failed test can be fixed too: You cannot fix a broken test case by enabling functionality which is not guaranteed to be available on all platforms. Adding time name spaces on loongarch is a completely separate issue and has absolutely nothing to do with broken test cases. They are still broken when CONFIG_TIME_NS is disabled in Kconfig, no? So this wants to be two separate things: 1) Fix the broken test cases so they handle CONFIG_TIME_NS=n situations correctly 2) Add support for TIME_NS to loongarch Thanks, tglx