summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorSeongJae Park <sjpark@amazon.de>2019-12-02 12:42:21 +0100
committerShuah Khan <skhan@linuxfoundation.org>2019-12-11 10:31:16 -0700
commit4eac734486fd431e0756cc5e929f140911a36a53 (patch)
treec5df20c8c946dc21a4c9e163201fbd55515e0c48 /tools
parentd187801d1a46519d2a322f879f7c8f85c685372e (diff)
downloadlinux-4eac734486fd431e0756cc5e929f140911a36a53.tar.gz
kselftest: Support old perl versions
On an old perl such as v5.10.1, `kselftest/prefix.pl` gives below error
message:

    Can't locate object method "autoflush" via package "IO::Handle" at kselftest/prefix.pl line 10.

This commit fixes the error by explicitly specifying the use of the
`IO::Handle` package.

Signed-off-by: SeongJae Park <sjpark@amazon.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/kselftest/prefix.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kselftest/prefix.pl b/tools/testing/selftests/kselftest/prefix.pl
index ec7e48118183..31f7c2a0a8bd 100755
--- a/tools/testing/selftests/kselftest/prefix.pl
+++ b/tools/testing/selftests/kselftest/prefix.pl
@@ -3,6 +3,7 @@
 # Prefix all lines with "# ", unbuffered. Command being piped in may need
 # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd".
 use strict;
+use IO::Handle;
 
 binmode STDIN;
 binmode STDOUT;