From patchwork Thu May 4 08:59:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Klauser X-Patchwork-Id: 90018 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp173284vqo; Thu, 4 May 2023 02:31:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xdk3vEevn+IDPYUQsJmigMg7H5vLtAGh2cQ0Mhw/Iq9wvtF1LjDaWo/wwM/QH6q77rWf3 X-Received: by 2002:a17:902:ceca:b0:1a9:b977:81c7 with SMTP id d10-20020a170902ceca00b001a9b97781c7mr3068777plg.62.1683192703254; Thu, 04 May 2023 02:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683192703; cv=none; d=google.com; s=arc-20160816; b=OBlSwmtz4g7+S5zUgdxSedx/Awmb3oQgTaGpIQ7/NEBZNRuhDdxFfRcLiTWz9Qs99P Pym2aMm9vzQjid0I7u4866C0JrS04+Exch5R8jl1Qb5oi7UvzoGkSuukIIVUU3zWZ+4N 4prbf2QSHZb4f/4M0/zXzJxYYQg6jyDxn4eaBe3JnAaO3qBOVmvLDjqp7j1NhNB8Ac4Q Vr/rM1mjzRXU7aXru5kq9oNjbFSCsPXedjlaMDMzw4ySob4wX+ob8DGXkWnj3M6xOmOe oyf3Na5q3OGdbWvGFujdCiNMXThkVl00i4tBlTWUa8Jlu4yvdWi3koaPWMFZ9ReWUPDk kNfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Nsnw8CNMT9/j3qDv67bTJ+DSozNI7s8zwwXNFrcwjZc=; b=sk4zFH7f4krgKcx6c3vgOmZ89QLH9L+r78cxEEInzzqEbuods+dMxeqV9goU4/kO5g +Te1XIYR7SckKW5UEqMB8wVXw5e9QGvtS/htscdhEBqqIi/ufP1IXbv+9b/WFAwBg7Qv MPspmexEEiBi6bY4cXo2YVioJfikd5sDbrUYmOqXV4rL4cL6m7EEmQUdiE/UE4V9z0R5 QYrf13OdXUuB2EjybFYGpHWGIJuBQe6sAlMvGbCOMAaPsWSzKfZbaY18FHGDvUklDABz JqMjCe9/RrYcI3E3Rl/l59iL3nB0DfVPBiUdCBi7alQc8cZBNajZNFwgDhDUrD82UnZG 5KJg== 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 v10-20020a63f20a000000b00527b90936b8si27428993pgh.38.2023.05.04.02.31.30; Thu, 04 May 2023 02:31:43 -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 S229598AbjEDI7i (ORCPT + 99 others); Thu, 4 May 2023 04:59:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229545AbjEDI7h (ORCPT ); Thu, 4 May 2023 04:59:37 -0400 Received: from sym2.noone.org (sym.noone.org [IPv6:2a01:4f8:120:4161::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F5CB358A; Thu, 4 May 2023 01:59:34 -0700 (PDT) Received: by sym2.noone.org (Postfix, from userid 1002) id 4QBnnH2Xbczvjfm; Thu, 4 May 2023 10:59:30 +0200 (CEST) From: Tobias Klauser To: Christian Brauner , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH] selftests/clone3: test clone3 with exit signal in flags Date: Thu, 4 May 2023 10:59:30 +0200 Message-Id: <20230504085930.23842-1-tklauser@distanz.ch> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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?1764955471849871895?= X-GMAIL-MSGID: =?utf-8?q?1764955471849871895?= Verify that calling clone3 with an exit signal (SIGCHLD) in flags will fail. Signed-off-by: Tobias Klauser Reviewed-by: Christian Brauner --- tools/testing/selftests/clone3/clone3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c index e495f895a2cd..e60cf4da8fb0 100644 --- a/tools/testing/selftests/clone3/clone3.c +++ b/tools/testing/selftests/clone3/clone3.c @@ -129,7 +129,7 @@ int main(int argc, char *argv[]) uid_t uid = getuid(); ksft_print_header(); - ksft_set_plan(18); + ksft_set_plan(19); test_clone3_supported(); /* Just a simple clone3() should return 0.*/ @@ -198,5 +198,8 @@ int main(int argc, char *argv[]) /* Do a clone3() in a new time namespace */ test_clone3(CLONE_NEWTIME, 0, 0, CLONE3_ARGS_NO_TEST); + /* Do a clone3() with exit signal (SIGCHLD) in flags */ + test_clone3(SIGCHLD, 0, -EINVAL, CLONE3_ARGS_NO_TEST); + ksft_finished(); }