From patchwork Fri Jan 21 13:06:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Khomenko X-Patchwork-Id: 12719676 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 083EEC433F5 for ; Fri, 21 Jan 2022 13:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380560AbiAUNHT (ORCPT ); Fri, 21 Jan 2022 08:07:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245103AbiAUNHK (ORCPT ); Fri, 21 Jan 2022 08:07:10 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 945B6C061574 for ; Fri, 21 Jan 2022 05:07:09 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id o12so33672665lfu.12 for ; Fri, 21 Jan 2022 05:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vastdata.com; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=fcVqyLeu75Npteb3N6VXa9h56htMTlLWPuAP8m+cNog=; b=G9VL5XNmNTe4jW6mEUcZza91PLEz7r2q/QYMIidZrpJSV88+N+cmigOQqretiL2IYJ u0BPRuDPHzIQvj1g2ZeFyYy11gz2pgD//SQmrn4y+x/Om7tD4Y1xdoLXWa4lI6krjAzo R8GQYRGDM6t9valOGuII4kuq1DtPS5O02RYo5zG3DEe9VNsHDKUp1VL/ueddxuDSQ1aP G3GOMo0V7wjKV75ew8uLy5n6Iw1JDLJEj5YzP1lFcNX5QsC9Xf9jDIoTgI/iKZnSvgd+ ur8n0JphqX5bFnQsAg1wlIdRFCqDvizs9UBg0eTa0zyp8HurLTYeSm+IUm3BXQWzcclC 4m5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=fcVqyLeu75Npteb3N6VXa9h56htMTlLWPuAP8m+cNog=; b=ojdVXGMjSzU76ED42S9Fk7y5LIcqn87r1nkh8NgDcv7GCtb4zFKQnUwl/QLvY+9/Ap 92larSAOnr03IycHVcdXVml+xTWfTwjKgpvnqQQiuTlONeNJTNzWdqKVydtbVppYPh0t 2RV1e0XMdGsVyoJ9EjM8pKNJZdldfOrbV8o4//E0pjLRwnYEi1IE9WrxvxBJTdcM2wqo jfGDi0iRRtzBzh555JC442l2CfnyuSHaFqPBr3I2QvY+dJyz/YoPeMJ7FlYrZg4nM+Fl l9SAgKK7H6LU7B7a9YkNgpnX8enbX3rxmXNiEeCbBLouFOY4w7M07Q8+IhOo7pLMaPie Q8lQ== X-Gm-Message-State: AOAM533S/xsIpN4/X4oli6LLbciDNJm6La+SXSAM3OLxruFqdv3Q7v3N 5bG1IhvMUuzlcNdsT0SE1B8wnAZ0Z40VlnJRCcAWzugQpUo= X-Google-Smtp-Source: ABdhPJzTht9bZJnmZl0QsXAXpby9lkZ/BmamyHmnhKy1M78b1/o9XfXBWmIzjHWat3qa47pWAjtp7+2ET2UFpvyhB6Q= X-Received: by 2002:a05:6512:c1f:: with SMTP id z31mr3661332lfu.613.1642770427858; Fri, 21 Jan 2022 05:07:07 -0800 (PST) MIME-Version: 1.0 From: Volodymyr Khomenko Date: Fri, 21 Jan 2022 15:06:57 +0200 Message-ID: Subject: [PATCH] pynfs minor: fixed Environment._maketree to use proper stateid during file write To: linux-nfs@vger.kernel.org Cc: "J. Bruce Fields" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From 63c0711f9cd8f8c0aaff7d0116a42b5001bddcd2 Mon Sep 17 00:00:00 2001 From: Volodymyr Khomenko Date: Fri, 21 Jan 2022 14:52:28 +0200 Subject: [PATCH] Minor: fixed Environment._maketree (used by init) to use proper stateid during file write _maketree is a part of generic init sequence for server41tests so the code should be generic. Using zero stateid (when "other" and "seqid" are both zero, the stateid is treated as a special anonymous stateid) is a special use-case of anonymous access so it must not be used during generic initialization. Signed-off-by: Volodymyr Khomenko --- nfs4.1/server41tests/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py index 14b0902..0b7c976 100644 --- a/nfs4.1/server41tests/environment.py +++ b/nfs4.1/server41tests/environment.py @@ -198,7 +198,7 @@ class Environment(testmod.Environment): log.warning("could not create /%s" % b'/'.join(path)) # Make file-object in /tree fh, stateid = create_confirm(sess, b'maketree', tree + [b'file']) - res = write_file(sess, fh, self.filedata) + res = write_file(sess, fh, self.filedata, stateid=stateid) check(res, msg="Writing data to /%s/file" % b'/'.join(tree)) res = close_file(sess, fh, stateid) check(res) -- 2.25.1