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-next>] [day] [month] [year] [list]
Message-ID: <tencent_3E0DB88452B3022E6754AC5F8546B310BD09@qq.com>
Date: Wed, 28 Aug 2024 11:40:16 +0800
From: Rong Tao <rtoax@...mail.com>
To: shuah@...nel.org
Cc: rongtao@...tc.cn,
	Rong Tao <rtoax@...mail.com>,
	linux-kernel@...r.kernel.org (open list),
	linux-kselftest@...r.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
Subject: [PATCH] selftests: splice: Add splice_read.sh and hint

From: Rong Tao <rongtao@...tc.cn>

Add test scripts and prompts.

Signed-off-by: Rong Tao <rongtao@...tc.cn>
---
 tools/testing/selftests/splice/splice_read.c  | 1 +
 tools/testing/selftests/splice/splice_read.sh | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100755 tools/testing/selftests/splice/splice_read.sh

diff --git a/tools/testing/selftests/splice/splice_read.c b/tools/testing/selftests/splice/splice_read.c
index 46dae6a25cfb..194b075f6bc0 100644
--- a/tools/testing/selftests/splice/splice_read.c
+++ b/tools/testing/selftests/splice/splice_read.c
@@ -49,6 +49,7 @@ int main(int argc, char *argv[])
 		      size, SPLICE_F_MOVE);
 	if (spliced < 0) {
 		perror("splice");
+		fprintf(stderr, "May try: %s /etc/os-release | cat\n", argv[0]);
 		return EXIT_FAILURE;
 	}
 
diff --git a/tools/testing/selftests/splice/splice_read.sh b/tools/testing/selftests/splice/splice_read.sh
new file mode 100755
index 000000000000..10fd5d738a2d
--- /dev/null
+++ b/tools/testing/selftests/splice/splice_read.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+set -e
+nl=$(./splice_read /etc/os-release | wc -l)
+
+test "$nl" != 0 && exit 0
+
+echo "splice_read broken"
+exit 1
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ