]> granicus.if.org Git - strace/commitdiff
tests: update hppa workaround in remap_file_pages test
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Aug 2019 19:01:36 +0000 (19:01 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Aug 2019 19:01:36 +0000 (19:01 +0000)
... 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_??? */".

tests/remap_file_pages.c

index 19e53a3b3eea8d341a37d38b34c0dc29aad274d9..afa0e1c733b9ecdc2739b426d998608ce918b700 100644 (file)
@@ -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