From: Dmitry V. Levin Date: Mon, 5 Aug 2019 19:01:36 +0000 (+0000) Subject: tests: update hppa workaround in remap_file_pages test X-Git-Tag: v5.3~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e33133360ed257f7b255107f34d315499c4f6bce;p=strace tests: update hppa workaround in remap_file_pages test ... to cater for the change of MAP_TYPE on hppa introduced by Linux kernel commit v4.17-rc1~146^2~9. * tests/remap_file_pages.c (main) [__hppa__ && MAP_TYPE != 0x03] (MAP_TYPE_str): Define to "0x2b /* MAP_??? */". --- diff --git a/tests/remap_file_pages.c b/tests/remap_file_pages.c index 19e53a3b..afa0e1c7 100644 --- a/tests/remap_file_pages.c +++ b/tests/remap_file_pages.c @@ -76,11 +76,17 @@ main(void) k_remap_file_pages(addr, size, prot, pgoff, flags); /* - * HP PA-RISC is the only architecture that has MAP_TYPE defined to 0x3, which - * is also used for MAP_SHARED_VALIDATE since Linux commit v4.15-rc1~71^2^2~23. + * HP PA-RISC is the only architecture that has MAP_TYPE defined to something + * different. For example, before commit v4.17-rc1~146^2~9 it was defined to + * 0x3 which is also used for MAP_SHARED_VALIDATE since Linux commit + * v4.15-rc1~71^2^2~23. */ # ifdef __hppa__ -# define MAP_TYPE_str "MAP_SHARED_VALIDATE" +# if MAP_TYPE == 0x03 +# define MAP_TYPE_str "MAP_SHARED_VALIDATE" +# else +# define MAP_TYPE_str "0x2b /* MAP_??? */" +# endif # else # define MAP_TYPE_str "0xf /* MAP_??? */" # endif