-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gdb.rocm/runtime-core: Fix sparseness check
When running the gdb.rocm/runtime-core test on an NFS mounted directory, gdb.rocm/runtime-core.exp is incorrectly identifying the core dump as not sparse, even if coremerge did everything properly and the core dump is indeed sparse. The problem is that the code that tries to detect sparseness is incorrect. It assumes that stat.st_blocks is counted in stat.st_blksize units. This is incorrect. There is no correlation between st_blocks and st_blksize. st_blksize is instead the "preferred" block size for efficient filesystem I/O. Unfortunately, there is no portable way to get at the st_blocks unit byte size in TCL. Thus this commit switches from TCL `file stat` to invoking `du` (disk usage tool). You can find more details in new comments in the code. Co-Authored-By: Shahab Vahedi <[email protected]> Bug: SWDEV-485267 Change-Id: I63355b87bfbc31f9283f9f3a2461171371f7641a (cherry picked from commit c886465)
- Loading branch information
Showing
2 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters