aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/file_SUITE.erl
diff options
context:
space:
mode:
authorMichael Santos <[email protected]>2011-04-07 08:41:00 -0400
committerHenrik Nord <[email protected]>2011-04-07 15:18:28 +0200
commitb9e8506d802d7548e5573af5d38513a44ea7f8bd (patch)
tree6674dc94e8bd5b1d9ddcf4eeb56cafe7689eb9fb /lib/kernel/test/file_SUITE.erl
parent67bea716bb708e9fe49d9934e656928f68b8f49f (diff)
downloadotp-b9e8506d802d7548e5573af5d38513a44ea7f8bd.tar.gz
otp-b9e8506d802d7548e5573af5d38513a44ea7f8bd.tar.bz2
otp-b9e8506d802d7548e5573af5d38513a44ea7f8bd.zip
file: fix hang reading compressed files
The gzio driver goes into an infinite loop when reading past the end of a compressed file. Reported-By: Alex Morarash
Diffstat (limited to 'lib/kernel/test/file_SUITE.erl')
-rw-r--r--lib/kernel/test/file_SUITE.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index 8078c7d021..2f73394c4e 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -2055,6 +2055,10 @@ try_read_file_list(Fd) ->
?line Title = "Real Programmers Don't Use PASCAL</TITLE>\n",
?line Title = io:get_line(Fd, ''),
+ %% Seek past the end of the file.
+
+ ?line {ok, _} = ?FILE_MODULE:position(Fd, 25000),
+
%% Done.
?line ?FILE_MODULE:close(Fd),