You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.6 KiB

  1. From 6502e57dbebcacd9b55fc7a80655c8f31d7dae8f Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <daniel@makrotopia.org>
  3. Date: Mon, 8 Feb 2021 01:26:31 +0000
  4. Subject: [PATCH] Fix build of hugetlb tests on 32-bit platforms
  5. https://github.com/opencontainers/runtime-tools/pull/712
  6. Use explicit 64-bit types to avoid fall-back on incompatible 32-bit
  7. types on 32-bit platforms.
  8. Fixes: #711
  9. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  10. ---
  11. validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go | 2 +-
  12. .../linux_cgroups_relative_hugetlb.go | 2 +-
  13. 2 files changed, 2 insertions(+), 2 deletions(-)
  14. --- a/validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go
  15. +++ b/validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go
  16. @@ -24,7 +24,7 @@ func testHugetlbCgroups() error {
  17. // When setting the limit just for checking if writing works, the amount of memory
  18. // requested does not matter, as all insigned integers will be accepted.
  19. // Use 2GiB as an example
  20. - const limit = 2 * (1 << 30)
  21. + var limit uint64 = 2 * (1 << 30)
  22. for _, pageSize := range pageSizes {
  23. g, err := util.GetDefaultGenerator()
  24. --- a/validation/linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.go
  25. +++ b/validation/linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.go
  26. @@ -21,7 +21,7 @@ func main() {
  27. // When setting the limit just for checking if writing works, the amount of memory
  28. // requested does not matter, as all insigned integers will be accepted.
  29. // Use 2GiB as an example
  30. - const limit = 2 * (1 << 30)
  31. + var limit uint64 = 2 * (1 << 30)
  32. for _, pageSize := range pageSizes {
  33. g, err := util.GetDefaultGenerator()