mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Li Zhijian <lizhijian@fujitsu.com>
To: linux-kselftest@vger.kernel.org
Cc: shuah@kernel.org, linux-kernel@vger.kernel.org,
	Li Zhijian <lizhijian@fujitsu.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
Subject: [PATCH for-next 7/7] selftests/net: Fix ./ns-XXXXXX not cleanup
Date: Fri, 25 Oct 2024 09:40:10 +0800	[thread overview]
Message-ID: <20241025014010.6533-7-lizhijian@fujitsu.com> (raw)
In-Reply-To: <20241025014010.6533-1-lizhijian@fujitsu.com>

```
readonly STATS="$(mktemp -p /tmp ns-XXXXXX)"
readonly BASE=`basename $STATS`
```
It could be a mistake to write to $BASE rather than $STATS, where $STATS
is used to save the NSTAT_HISTORY and it will be cleaned up before exit.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
Cc: netdev@vger.kernel.org

---
Hello,
Cover letter is here.

This patch set aims to make 'git status' clear after 'make' and 'make
run_tests' for kselftests.
---
V2: nothing change
---
 tools/testing/selftests/net/veth.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
index 4f1edbafb946..457312ef135a 100755
--- a/tools/testing/selftests/net/veth.sh
+++ b/tools/testing/selftests/net/veth.sh
@@ -46,8 +46,8 @@ create_ns() {
 		ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24
 		ip -n $BASE$ns addr add dev veth$ns $BM_NET_V6$ns/64 nodad
 	done
-	echo "#kernel" > $BASE
-	chmod go-rw $BASE
+	echo "#kernel" > $STATS
+	chmod go-rw $STATS
 }
 
 __chk_flag() {
-- 
2.44.0


  parent reply	other threads:[~2024-10-25  1:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25  1:40 [PATCH for-next 1/7] selftests/alsa: Add a few missing gitignore files Li Zhijian
2024-10-25  1:40 ` [PATCH for-next 2/7] selftests/filesystems: Add missing gitignore file Li Zhijian
2024-10-25  1:40 ` [PATCH for-next 3/7] selftests/mm: Add a few missing gitignore files Li Zhijian
2024-10-25 19:10   ` John Hubbard
2024-10-25  1:40 ` [PATCH for-next 4/7] selftests/net: Add missing gitignore file Li Zhijian
2024-10-29 23:33   ` Jakub Kicinski
2024-10-25  1:40 ` [PATCH for-next 5/7] selftests/cpufreq: gitignore output files and clean them in make clean Li Zhijian
2024-10-25  1:40 ` [PATCH for-next 6/7] selftests/zram: gitignore output file Li Zhijian
2024-10-25  1:40 ` Li Zhijian [this message]
2024-10-29 23:43   ` [PATCH for-next 7/7] selftests/net: Fix ./ns-XXXXXX not cleanup Jakub Kicinski
2024-10-29 23:43     ` Jakub Kicinski
2024-10-30  0:54     ` Zhijian Li (Fujitsu)
2024-10-25 10:05 ` [PATCH for-next 1/7] selftests/alsa: Add a few missing gitignore files Mark Brown
2024-10-28  1:51   ` Zhijian Li (Fujitsu)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241025014010.6533-7-lizhijian@fujitsu.com \
    --to=lizhijian@fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®