]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
kselftest: Support old perl versions
authorSeongJae Park <sjpark@amazon.de>
Mon, 2 Dec 2019 11:42:21 +0000 (12:42 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:22:50 +0000 (16:22 +0100)
BugLink: https://bugs.launchpad.net/bugs/1860130
[ Upstream commit 4eac734486fd431e0756cc5e929f140911a36a53 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
tools/testing/selftests/kselftest/prefix.pl

index ec7e48118183504758bcca0b19d71f34c6b5717f..31f7c2a0a8bd462da9329d6e90b7fae60ca66bc5 100755 (executable)
@@ -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;