diff options
author | Kevin Buettner <kevinb@redhat.com> | 2020-07-30 20:09:05 -0700 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2020-07-31 09:33:32 -0700 |
commit | 9ef1ec5dca12fce2d9e9d3711c8a4091611c804d (patch) | |
tree | d1be5fb97d35d35ab74fe1eef34c4e3cdda35785 | |
parent | e6a6c7676a7df49cfbbffda26eadd2032dbc2bbe (diff) | |
download | gdb-9ef1ec5dca12fce2d9e9d3711c8a4091611c804d.zip gdb-9ef1ec5dca12fce2d9e9d3711c8a4091611c804d.tar.gz gdb-9ef1ec5dca12fce2d9e9d3711c8a4091611c804d.tar.bz2 |
Fix gdb.base/corefile2.exp test case for ppc64le
It turns out that the recently added gdb.base/corefile2.exp test won't
run on ppc64le linux. The test case fails the internal checks which
ensure that a mmap'd region can be placed within the statically
allocated regions buf_rw[] and buf_ro[].
ppc64le linux apparently has 64k pages, which is much larger than
the 24k regions originally allocated for buf_rw[] and buf_ro[].
This patch increases the size of each region to 256 KiB.
Tested on either rawhide or Fedora 32 for these architectures: x86_64,
x86_64/-m32, ppc64le, aarch64, and s390x.
gdb/testsuite/ChangeLog:
* gdb.base/coremaker2.c (buf_rw): Increase size to 256 KiB.
(C5_24k): Delete.
(C5_8k, C5_64k, C5_256k): New macros.
(buf_ro): Allocate 256 KiB of initialized data.
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/coremaker2.c | 27 |
2 files changed, 22 insertions, 12 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2a194d1..4e7bcbe 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-07-31 Kevin Buettner <kevinb@redhat.com> + + * gdb.base/coremaker2.c (buf_rw): Increase size to 256 KiB. + (C5_24k): Delete. + (C5_8k, C5_64k, C5_256k): New macros. + (buf_ro): Allocate 256 KiB of initialized data. + 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.base/condbreak-bad.exp: Extend the test with scenarios diff --git a/gdb/testsuite/gdb.base/coremaker2.c b/gdb/testsuite/gdb.base/coremaker2.c index ecba247..3c89bd7 100644 --- a/gdb/testsuite/gdb.base/coremaker2.c +++ b/gdb/testsuite/gdb.base/coremaker2.c @@ -47,12 +47,8 @@ unsigned long long addr; char *mbuf_ro; char *mbuf_rw; -/* 24 KiB buffer. */ -char buf_rw[24 * 1024]; - -/* 24 KiB worth of data. For this test case, we can't allocate a - buffer and then fill it; we want GDB to have to read this data - from the executable; it should NOT find it in the core file. */ +/* 256 KiB buffer. */ +char buf_rw[256 * 1024]; #define C5_16 \ 0xc5, 0xc5, 0xc5, 0xc5, \ @@ -69,15 +65,22 @@ char buf_rw[24 * 1024]; #define C5_1k \ C5_256, C5_256, C5_256, C5_256 -#define C5_24k \ - C5_1k, C5_1k, C5_1k, C5_1k, \ - C5_1k, C5_1k, C5_1k, C5_1k, \ - C5_1k, C5_1k, C5_1k, C5_1k, \ - C5_1k, C5_1k, C5_1k, C5_1k, \ +#define C5_8k \ C5_1k, C5_1k, C5_1k, C5_1k, \ C5_1k, C5_1k, C5_1k, C5_1k -const char buf_ro[] = { C5_24k }; +#define C5_64k \ + C5_8k, C5_8k, C5_8k, C5_8k, \ + C5_8k, C5_8k, C5_8k, C5_8k + +#define C5_256k \ + C5_64k, C5_64k, C5_64k, C5_64k + +/* 256 KiB worth of data. For this test case, we can't allocate a + buffer and then fill it; we want GDB to have to read this data + from the executable; it should NOT find it in the core file. */ + +const char buf_ro[] = { C5_256k }; int main (int argc, char **argv) |