Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3916150imw; Mon, 11 Jul 2022 19:45:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1spisvKuJCqv1XEXteFEK11v17zFoCLemvP8QaFoQqUkwo9lhH+XBp4dM4ouhSfaspHDNew X-Received: by 2002:a17:907:8689:b0:726:c8d3:8d97 with SMTP id qa9-20020a170907868900b00726c8d38d97mr20704357ejc.578.1657593919396; Mon, 11 Jul 2022 19:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657593919; cv=none; d=google.com; s=arc-20160816; b=fW66GB14nET7eE4OFZ/m4/sA9W9V0mifnJG65jOQqtuJ5r08OzN6e9ruPlO9W/o3Aa ZWEE9biafqNZ3U/umsShh976r1eoMybYBCO6/d6PTyQNq7dshKFoIqYDIMNa/Qbz4Jo8 FnZeiH1XZsgpj8v9FxaOl+2T+UTvQkvXgCMix0UGShap6xbVFahllNe4W2VZJIwRB7mW ysfUxskISO+260RISAfu8h+m+t4rFot5c8pfPRr94iMDkHFeouinKeReWejke9rCN4ge UgIbJQv+q8XFph0LN/oCU5+qEcYHzCsHiKodCv/ShwmIrLT6L/kqZkwKAPOA8tsFVtCA MMmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=WHOZ45h/X2eyJFtiF5ItPZDJpL8pd2wyUEZKUfBUxnI=; b=zKroRtd0wMPAqymIwOH6+Cure8/+Uq8/SFJ9dgOJ8A9jriTbzwzfA1J8r/VaHjcN7p Zw8CcX7QExAthyL10UjlDuZ7/3xYMy3Cz8b4itLn+S7Ls5WVMQAt/KyM/RWoZHzXUL5Y 7oQ5S8vclCFlJRg2rnKlzaqnXmrrIpoSeWmVJR42Rltsne8y/EdZ++8DjYMpAOiyzHTc qr06A6Snp8UVHPuARLoOJ0dmW9jCLH89OCgDZ9Rx5JM3lgqDRp3C7sb+mK+JobHB4SfL WvYqiUt3C8YK/5qvaRjByUKUn61R6PyHS9oPAo0rdJhJ2garA9N4S1bY7h+ZCAgsQOKp arTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b="Wp/ssd0I"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170906145100b00711efd98320si11743699ejc.241.2022.07.11.19.44.53; Mon, 11 Jul 2022 19:45:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@fieldses.org header.s=default header.b="Wp/ssd0I"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231145AbiGLCon (ORCPT + 99 others); Mon, 11 Jul 2022 22:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229735AbiGLCol (ORCPT ); Mon, 11 Jul 2022 22:44:41 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 738E32AC66 for ; Mon, 11 Jul 2022 19:44:40 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id C489661D1; Mon, 11 Jul 2022 22:44:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org C489661D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1657593879; bh=WHOZ45h/X2eyJFtiF5ItPZDJpL8pd2wyUEZKUfBUxnI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wp/ssd0IUuUndmb9tdXy1Ih8VPcaYUjqOpRC2JNZvOw48ke4qWClsO7F7MVBhQlcv Bujf/WeKKfMQ5IRDLU96JrMX//DWJ++MnkZ5DGAqweJurGKXMKw1Sat9V8/aqtVzbr mXmPckAvc/ZDHKeIMVHMV4wIiuqgiN5BF6RHWlQA= Date: Mon, 11 Jul 2022 22:44:39 -0400 From: "J. Bruce Fields" To: Chuck Lever Cc: linux-nfs@vger.kernel.org Subject: Re: [PATCH v1] Add basic tests for DESTROY_SESSION Message-ID: <20220712024439.GE14184@fieldses.org> References: <165756921593.2281287.10609723157095539123.stgit@morisot.1015granger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <165756921593.2281287.10609723157095539123.stgit@morisot.1015granger.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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-nfs@vger.kernel.org Applying, thanks.--b. On Mon, Jul 11, 2022 at 03:55:32PM -0400, Chuck Lever wrote: > The existing DSESS tests seem specific to Ganesha; they fail when > run against Linux NFSD. Here's a basic one that all server > implementations should PASS. > > Signed-off-by: Chuck Lever > --- > nfs4.1/server41tests/st_destroy_session.py | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/nfs4.1/server41tests/st_destroy_session.py b/nfs4.1/server41tests/st_destroy_session.py > index b8be62582366..bd5e12d7ebf1 100644 > --- a/nfs4.1/server41tests/st_destroy_session.py > +++ b/nfs4.1/server41tests/st_destroy_session.py > @@ -1,12 +1,33 @@ > from .st_create_session import create_session > from xdrdef.nfs4_const import * > -from .environment import check, fail, create_file, open_file > +from .environment import check, fail, create_file, open_file, close_file > from xdrdef.nfs4_type import open_owner4, openflag4, createhow4, open_claim4 > import nfs_ops > op = nfs_ops.NFS4ops() > import threading > import rpc.rpc as rpc > > +def testDestroyBasic(t, env): > + """Operations after DESTROY_SESSION should fail with BADSESSION > + > + FLAGS: destroy_session all > + CODE: DSESS1 > + """ > + c = env.c1.new_client(env.testname(t)) > + sess1 = c.create_session() > + sess1.compound([op.reclaim_complete(FALSE)]) > + res = c.c.compound([op.destroy_session(sess1.sessionid)]) > + res = create_file(sess1, env.testname(t), > + access=OPEN4_SHARE_ACCESS_READ) > + check(res, NFS4ERR_BADSESSION) > + sess2 = c.create_session() > + res = create_file(sess2, env.testname(t), > + access=OPEN4_SHARE_ACCESS_READ) > + check(res) > + fh = res.resarray[-1].object > + open_stateid = res.resarray[-2].stateid > + close_file(sess2, fh, stateid=open_stateid) > + > def testDestroy(t, env): > """ > - create a session >