Commit 16782e8
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)1 parent 3f6fe70 commit 16782e8
2 files changed
+66
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 48 | + | |
53 | 49 | | |
54 | 50 | | |
55 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6672 | 6672 | | |
6673 | 6673 | | |
6674 | 6674 | | |
| 6675 | + | |
| 6676 | + | |
| 6677 | + | |
| 6678 | + | |
| 6679 | + | |
| 6680 | + | |
| 6681 | + | |
| 6682 | + | |
| 6683 | + | |
| 6684 | + | |
| 6685 | + | |
| 6686 | + | |
| 6687 | + | |
| 6688 | + | |
| 6689 | + | |
| 6690 | + | |
| 6691 | + | |
| 6692 | + | |
| 6693 | + | |
| 6694 | + | |
| 6695 | + | |
| 6696 | + | |
| 6697 | + | |
| 6698 | + | |
| 6699 | + | |
| 6700 | + | |
| 6701 | + | |
| 6702 | + | |
| 6703 | + | |
| 6704 | + | |
| 6705 | + | |
| 6706 | + | |
| 6707 | + | |
| 6708 | + | |
| 6709 | + | |
| 6710 | + | |
| 6711 | + | |
| 6712 | + | |
| 6713 | + | |
| 6714 | + | |
| 6715 | + | |
| 6716 | + | |
| 6717 | + | |
| 6718 | + | |
| 6719 | + | |
| 6720 | + | |
| 6721 | + | |
| 6722 | + | |
| 6723 | + | |
| 6724 | + | |
| 6725 | + | |
| 6726 | + | |
| 6727 | + | |
| 6728 | + | |
| 6729 | + | |
| 6730 | + | |
| 6731 | + | |
| 6732 | + | |
| 6733 | + | |
| 6734 | + | |
| 6735 | + | |
| 6736 | + | |
| 6737 | + | |
| 6738 | + | |
| 6739 | + | |
6675 | 6740 | | |
6676 | 6741 | | |
6677 | 6742 | | |
| |||
0 commit comments