From 7280bf40d9b43118cca87a7321c088e118a5ebc1 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 13 Dec 2019 15:38:45 +1100 Subject: [PATCH] tests/extmod/vfs_lfs_error: Use small ints in seek error test. So accessing the seek offset (at the C level) doesn't cause an OverflowError on 32-bit targets. --- tests/extmod/vfs_lfs_error.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/extmod/vfs_lfs_error.py b/tests/extmod/vfs_lfs_error.py index b97fe6ec15..793fae59e2 100644 --- a/tests/extmod/vfs_lfs_error.py +++ b/tests/extmod/vfs_lfs_error.py @@ -106,8 +106,9 @@ def test(bdev, vfs_class): # error during seek with vfs.open('testfile', 'r') as f: + f.seek(1 << 30) # SEEK_SET try: - f.seek(1 << 31) + f.seek(1 << 30, 1) # SEEK_CUR except OSError: print('seek OSError')