From mboxrd@z Thu Jan 1 00:00:00 1970 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 31E9AC83F12 for ; Tue, 29 Aug 2023 13:39:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230527AbjH2Nid (ORCPT ); Tue, 29 Aug 2023 09:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236842AbjH2Nh5 (ORCPT ); Tue, 29 Aug 2023 09:37:57 -0400 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BFC11724; Tue, 29 Aug 2023 06:36:53 -0700 (PDT) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-68c576d35feso1620438b3a.2; Tue, 29 Aug 2023 06:36:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693316154; x=1693920954; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=58tJu8HS3Uk+gerFXyZAfcbbsx2SaXKrB/OzNfMroZM=; b=VbLdHmRCfhdCyZtcnKq4nqIYarSiDFkPrni7iZrgGJpkMT9jFzhsJ4gP9Ik4tkyd5v CRvNLS43hZFn9BAm8B3x77xNudamE3dvyzmjZNAw6yC9f0yHlolE2M+2pNKQUlYNhN3i E6f84Rxf51D23V/+5WFb7ieyGH7xNguUfBoNPfn6O2W5YYB/rRCOFB7wQmQT9Dkhg4Mo q7ajMa1RJJr+/+mmjQ/5S4pLumbxh76XBLcboBI0vII17B98XsjZZVmdcRbFBtdpEC/H SZO2v9UYHHXNfYDTmISsrZpvRHSpM+tLagWDZqzODOzP71A5Hnj2bdExjF5uRoCxFebQ zthQ== X-Gm-Message-State: AOJu0YzaEFltc9CG3xB9OKUqjsxRGCzBuYQB1Fzk9RMXrpadPy+ovNCa K7tOXFxOKiOtZKmKxMpuxl0= X-Google-Smtp-Source: AGHT+IG9aL/VbyawH5cxLpKPv48bF/ifjtaCOBxvr16QlUWtHvl9BmANrS6abaZiiejyKlhA6FbCiw== X-Received: by 2002:a05:6a20:6a05:b0:13f:9cee:ff42 with SMTP id p5-20020a056a206a0500b0013f9ceeff42mr35105172pzk.41.1693316153610; Tue, 29 Aug 2023 06:35:53 -0700 (PDT) Received: from [172.20.4.71] ([208.98.210.70]) by smtp.gmail.com with ESMTPSA id 22-20020aa79156000000b00666b012baedsm8485174pfi.158.2023.08.29.06.35.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Aug 2023 06:35:52 -0700 (PDT) Message-ID: <3b5b246f-386d-4afe-a20d-4b08770bd4cb@acm.org> Date: Tue, 29 Aug 2023 06:35:52 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH blktests v3 3/3] nvme: introduce nvmet_target_{setup/cleanup} common code Content-Language: en-US To: Shinichiro Kawasaki Cc: Daniel Wagner , "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , Chaitanya Kulkarni , Hannes Reinecke , Sagi Grimberg , Jason Gunthorpe References: <8ffb6c2f-0836-4302-82b9-902e092e537c@acm.org> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/28/23 19:11, Shinichiro Kawasaki wrote: > This is the unclear point for me. Does bash really pass the arguments list of > the caller to the callee when functions are called without arguments? > > Looking back the commit 852996fea4f1, you explained that bash does, and I > agreed. But now in my environment bash doesn't. I tried the script below in my > environment, and see nothing printed. > > funcA() { echo "$1" ; } > funcB() { funcA; } > funcB foo > > Then the arguments of funcB is not passed to funcA. How does it run in your > environment? I see the same result that you see. It seems that I misinterpret the text produced by shellcheck if it reports warning SC2119. After having reread https://github.com/koalaman/shellcheck/wiki/SC2119, I'm OK with suppressing warning SC2119 because that warning doesn't seem useful to me. Thanks, Bart.