lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240912171251.937743-2-sdf@fomichev.me>
Date: Thu, 12 Sep 2024 10:12:39 -0700
From: Stanislav Fomichev <sdf@...ichev.me>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	Mina Almasry <almasrymina@...gle.com>
Subject: [PATCH net-next 01/13] selftests: ncdevmem: Add a flag for the selftest

And rename it to 'probing'. This is gonna be used in the selftests
to probe devmem functionality.

Cc: Mina Almasry <almasrymina@...gle.com>
Signed-off-by: Stanislav Fomichev <sdf@...ichev.me>
---
 tools/testing/selftests/net/ncdevmem.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/ncdevmem.c b/tools/testing/selftests/net/ncdevmem.c
index 64d6805381c5..352dba211fb0 100644
--- a/tools/testing/selftests/net/ncdevmem.c
+++ b/tools/testing/selftests/net/ncdevmem.c
@@ -523,8 +523,9 @@ void run_devmem_tests(void)
 int main(int argc, char *argv[])
 {
 	int is_server = 0, opt;
+	int probe = 0;
 
-	while ((opt = getopt(argc, argv, "ls:c:p:v:q:t:f:")) != -1) {
+	while ((opt = getopt(argc, argv, "ls:c:p:v:q:t:f:P")) != -1) {
 		switch (opt) {
 		case 'l':
 			is_server = 1;
@@ -550,6 +551,9 @@ int main(int argc, char *argv[])
 		case 'f':
 			ifname = optarg;
 			break;
+		case 'P':
+			probe = 1;
+			break;
 		case '?':
 			printf("unknown option: %c\n", optopt);
 			break;
@@ -561,7 +565,10 @@ int main(int argc, char *argv[])
 	for (; optind < argc; optind++)
 		printf("extra arguments: %s\n", argv[optind]);
 
-	run_devmem_tests();
+	if (probe) {
+		run_devmem_tests();
+		return 0;
+	}
 
 	if (is_server)
 		return do_server();
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ