From: Guillem Jover Date: Wed, 6 Mar 2024 02:08:15 +0000 (+0100) Subject: [PATCH libaio] harness: Hardcode list of ports that cannot check PROT_WRITE is readable X-Git-Tag: archive/raspbian/0.3.113-10+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5be381099690fb5acbb35cf7fea8622c38d32ff5;p=libaio.git [PATCH libaio] harness: Hardcode list of ports that cannot check PROT_WRITE is readable On these ports, the write() check does not work, so we need to hardcode the list. Gbp-Pq: Name 0001-harness-Hardcode-list-of-ports-that-cannot-check-PRO.patch --- diff --git a/harness/cases/5.t b/harness/cases/5.t index b0a7c56..ae8b57a 100644 --- a/harness/cases/5.t +++ b/harness/cases/5.t @@ -41,10 +41,17 @@ int test_main(void) assert(buf != (char *)-1); /* Whether PROT_WRITE is readable is arch-dependent. So compare - * against write() result (to make the kernel read from buf). */ + * against write() result (to make the kernel read from buf), and + * use a hard-coded list for the systems where this does not work. */ +#if defined(__hppa__) || \ + defined(__loongarch__) || \ + defined(__sparc__) + res = SIZE; +#else res = write(rwfd, buf, SIZE); if (res < 0) res = -errno; +#endif status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE); status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res);