2 # SPDX-License-Identifier: GPL-2.0
13 out
=$
(.
/splice_read
"$filename" "$bytes" |
cat)
14 if [ "$out" = "$expected" ] ; then
15 echo "ok: $filename $bytes"
17 echo "FAIL: $filename $bytes"
26 full
=$
(cat "$filename")
27 two
=$
(echo "$full" |
grep -m1 . | cut
-c-2)
29 # Make sure full splice has the same contents as a standard read.
30 do_splice
"$filename" 4096 "$full"
32 # Make sure a partial splice see the first two characters.
33 do_splice
"$filename" 2 "$two"
36 # proc_single_open(), seq_read()
37 test_splice
/proc
/$$
/limits
38 # special open, seq_read()
39 test_splice
/proc
/$$
/comm
41 # proc_handler, proc_dointvec_minmax
42 test_splice
/proc
/sys
/fs
/nr_open
43 # proc_handler, proc_dostring
44 test_splice
/proc
/sys
/kernel
/modprobe
45 # proc_handler, special read
46 test_splice
/proc
/sys
/kernel
/version
48 if ! [ -d /sys
/module
/test_module
/sections
] ; then
52 test_splice
/sys
/module
/test_module
/coresize
54 test_splice
/sys
/module
/test_module
/sections
/.init.text