aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2017-10-25 15:11:31 +0200
committerJohn Högberg <[email protected]>2017-11-30 15:44:37 +0100
commitc6f47dd9919c8b1555980a990cbc7af0fd1ca529 (patch)
treef1ecc0954b4e2f64350a9fc0286032a2b1097be8 /lib
parent7c76526c4cae5f5dcc4ccd858f0a33d81c46d5f6 (diff)
downloadotp-c6f47dd9919c8b1555980a990cbc7af0fd1ca529.tar.gz
otp-c6f47dd9919c8b1555980a990cbc7af0fd1ca529.tar.bz2
otp-c6f47dd9919c8b1555980a990cbc7af0fd1ca529.zip
Stop testing the artificial size limit on writes
The old driver didn't fall back to using write(2) if writev(2) failed due to the combined length of the iov overflowing a ssize_t, but the new one doesn't have any problems with it so we failed this test with a case_clause error on 32-bit machines.
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/prim_file_SUITE.erl13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl
index 8a1e99b332..db753679ea 100644
--- a/lib/kernel/test/prim_file_SUITE.erl
+++ b/lib/kernel/test/prim_file_SUITE.erl
@@ -1113,15 +1113,10 @@ do_large_write(Name) ->
Chunk = <<0:ChunkSize/unit:8>>,
Data = zip_data(lists:duplicate(Chunks, Chunk), Interleave),
Size = Chunks * ChunkSize + Chunks, % 4 G + 32
- Wordsize = erlang:system_info(wordsize),
- case ?PRIM_FILE:write_file(Name, Data) of
- ok when Wordsize =:= 8 ->
- {ok,#file_info{size=Size}} = file:read_file_info(Name),
- {ok,Fd} = ?PRIM_FILE:open(Name, [read]),
- check_large_write(Fd, ChunkSize, 0, Interleave);
- {error,einval} when Wordsize =:= 4 ->
- ok
- end.
+ ok = ?PRIM_FILE:write_file(Name, Data),
+ {ok,#file_info{size=Size}} = file:read_file_info(Name),
+ {ok,Fd} = ?PRIM_FILE:open(Name, [read]),
+ check_large_write(Fd, ChunkSize, 0, Interleave).
check_large_write(Fd, ChunkSize, Pos, [X|Interleave]) ->
Pos1 = Pos + ChunkSize,