[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 38/38] tests/tcg: Add a test for info proc mappings
From: |
Richard Henderson |
Subject: |
Re: [PATCH v4 38/38] tests/tcg: Add a test for info proc mappings |
Date: |
Tue, 8 Aug 2023 15:45:32 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 6/30/23 11:04, Alex Bennée wrote:
From: Ilya Leoshkevich <iii@linux.ibm.com>
Add a small test to prevent regressions.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230621203627.1808446-9-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
...
+def run_test():
+ """Run through the tests one by one"""
+ try:
+ mappings = gdb.execute("info proc mappings", False, True)
+ except gdb.error as exc:
+ exc_str = str(exc)
+ if "Not supported on this target." in exc_str:
+ # Detect failures due to an outstanding issue with how GDB handles
+ # the x86_64 QEMU's target.xml, which does not contain the
+ # definition of orig_rax. Skip the test in this case.
+ print("SKIP: {}".format(exc_str))
+ return
+ raise
+ report(isinstance(mappings, str), "Fetched the mappings from the inferior")
+ report("/sha1" in mappings, "Found the test binary name in the mappings")
This test fails on ppc64 host, or indeed any host with page size != 4k.
When host page size != target page size, and the executable image is small, such as sha1,
then target_mmap cannot directly map the executable file, but must implement the mmap via
MAP_ANON + pread. Which leaves us with no binary name in the host /proc/self/maps for us
to copy to the artificial guest /proc/self/maps.
One of the very many issues with page size mismatch...
I'm tempted to remove the test, but I suppose we could check host page size in
python.
r~
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v4 38/38] tests/tcg: Add a test for info proc mappings,
Richard Henderson <=