|
2 | 2 | """Node local test (NLT). |
3 | 3 |
|
4 | 4 | (C) Copyright 2020-2025 Intel Corporation. |
| 5 | +(C) Copyright 2025 Google LLC |
5 | 6 |
|
6 | 7 | SPDX-License-Identifier: BSD-2-Clause-Patent |
7 | 8 |
|
@@ -2354,24 +2355,16 @@ def test_pre_read(self): |
2354 | 2355 | # Open a file and read in one go. |
2355 | 2356 | with open(join(dfuse.dir, 'file0'), 'r') as fd: |
2356 | 2357 | data0 = fd.read() |
2357 | | - res = dfuse.check_usage() |
2358 | | - assert res['statistics']['pre_read'] == 1, res |
2359 | 2358 |
|
2360 | 2359 | # Open a file and read in one go. |
2361 | 2360 | with open(join(dfuse.dir, 'file1'), 'r') as fd: |
2362 | 2361 | data1 = fd.read(16) |
2363 | | - res = dfuse.check_usage(old=res) |
2364 | | - assert res['statistics']['pre_read'] == 1, res |
2365 | 2362 |
|
2366 | 2363 | # Open a file and read two bytes at a time. Despite disabling buffering python will try and |
2367 | 2364 | # read a whole page the first time. |
2368 | 2365 | fd = os.open(join(dfuse.dir, 'file2'), os.O_RDONLY) |
2369 | 2366 | data2 = os.read(fd, 2) |
2370 | | - res = dfuse.check_usage(old=res) |
2371 | | - assert res['statistics']['pre_read'] == 1, res |
2372 | 2367 | _ = os.read(fd, 2) |
2373 | | - res = dfuse.check_usage(old=res) |
2374 | | - assert res['statistics']['pre_read'] == 0, res |
2375 | 2368 | os.close(fd) |
2376 | 2369 |
|
2377 | 2370 | # Open a MB file. This reads 8 128k chunks and 1 EOF. |
|
0 commit comments