Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/files/, sys-libs/libhugetlbfs/
Date: Wed, 19 Sep 2018 09:37:04
Message-Id: 1537349810.c2625f810fa8b7c7ec3b51792a19c0608f5ef9b6.polynomial-c@gentoo
1 commit: c2625f810fa8b7c7ec3b51792a19c0608f5ef9b6
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 19 09:36:50 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 19 09:36:50 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2625f81
7
8 sys-libs/libhugetlbfs: Removed old.
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 sys-libs/libhugetlbfs/Manifest | 2 -
13 .../files/libhugetlbfs-2.6-noexec-stack.patch | 44 ------
14 sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild | 146 ------------------
15 sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild | 164 ---------------------
16 sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild | 148 -------------------
17 5 files changed, 504 deletions(-)
18
19 diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
20 index 2d7527a8693..580068e6d38 100644
21 --- a/sys-libs/libhugetlbfs/Manifest
22 +++ b/sys-libs/libhugetlbfs/Manifest
23 @@ -1,4 +1,2 @@
24 -DIST libhugetlbfs-2.18.tar.gz 181275 BLAKE2B 1f0ca8d73d9bdf05eb08706be4854f110b8cbe5b0c7554fdddb437fc9644e69d0bc42d9d8bedf23bf2dda4901977f093d0f46ed039304f8b5184b2fcac157d47 SHA512 6dcdbf571d6a723a40c15e10b24533f16d65f67fe149aa2d25bee48a034d003419d4cf4b6e55fcd385e1214fc4f6b4dda72ba429b9eea9b38be9b1a393528746
25 -DIST libhugetlbfs-2.19.tar.gz 181504 BLAKE2B 27d5e5729e48b82311d6f4317f8c0bb5a04054242bca6fd9745265e2590f18ec49de6a9cdfa7ea28be47f794e91e70c5fcecdb418bf8e8cb0cb5b78d0948e563 SHA512 d21781fe68736eb3bbafeb8f36f4f34d30f290f2f6744b52c1a40161caf2e28b823cd8e9b9c74ec4e6d11f7d398d909f80eb736cc39a64ecc7bf571018bfec7c
26 DIST libhugetlbfs-2.20.tar.gz 186750 BLAKE2B 758482a41254d6d14795efdfb2959248af2ff00bc6cafbae9b2002b7eaa50921a72ef928910bc0d2061a414e9c73346848eead108af077c96429870c734495aa SHA512 817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902
27 DIST libhugetlbfs-2.21.tar.gz 173052 BLAKE2B a65fdeee3ed9ad8cb69f772847646befbf5deef0b82d6cb7338e5ff448d5c2461ceb1e381b9515e79f4243482589bb0203874cc52e5c8c6d98667df4eacffa8b SHA512 87fd95a826bedc2c53b1aa440f5db7ff3ece482d520545b597d4d1231cf84276103c312899b812166872444331bc7b6f1692f0d3b7cbff691efdcf9c2e99b1d0
28
29 diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
30 deleted file mode 100644
31 index bf964cda7a6..00000000000
32 --- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
33 +++ /dev/null
34 @@ -1,44 +0,0 @@
35 -diff -Nuar libhugetlbfs-2.6.orig/sys-elf32ppclinux.S libhugetlbfs-2.6/sys-elf32ppclinux.S
36 ---- libhugetlbfs-2.6.orig/sys-elf32ppclinux.S 2009-08-24 12:56:07.000000000 +0000
37 -+++ libhugetlbfs-2.6/sys-elf32ppclinux.S 2009-10-31 06:43:49.040319417 +0000
38 -@@ -32,3 +32,7 @@
39 - mr 8,9
40 - sc
41 - blr
42 -+
43 -+#if defined(__linux__) && defined(__ELF__)
44 -+ .section .note.GNU-stack,"",%progbits
45 -+#endif
46 -diff -Nuar libhugetlbfs-2.6.orig/sys-elf64ppc.S libhugetlbfs-2.6/sys-elf64ppc.S
47 ---- libhugetlbfs-2.6.orig/sys-elf64ppc.S 2009-08-24 12:56:07.000000000 +0000
48 -+++ libhugetlbfs-2.6/sys-elf64ppc.S 2009-10-31 06:43:54.303652251 +0000
49 -@@ -41,3 +41,7 @@
50 - mr 8,9
51 - sc
52 - blr
53 -+
54 -+#if defined(__linux__) && defined(__ELF__)
55 -+ .section .note.GNU-stack,"",%progbits
56 -+#endif
57 -diff -Nuar libhugetlbfs-2.6.orig/sys-elf_i386.S libhugetlbfs-2.6/sys-elf_i386.S
58 ---- libhugetlbfs-2.6.orig/sys-elf_i386.S 2009-08-24 12:56:07.000000000 +0000
59 -+++ libhugetlbfs-2.6/sys-elf_i386.S 2009-10-31 06:43:57.536975670 +0000
60 -@@ -40,3 +40,7 @@
61 - pop %edi
62 - pop %ebp
63 - ret
64 -+
65 -+#if defined(__linux__) && defined(__ELF__)
66 -+ .section .note.GNU-stack,"",%progbits
67 -+#endif
68 -diff -Nuar libhugetlbfs-2.6.orig/sys-elf_x86_64.S libhugetlbfs-2.6/sys-elf_x86_64.S
69 ---- libhugetlbfs-2.6.orig/sys-elf_x86_64.S 2009-08-24 12:56:07.000000000 +0000
70 -+++ libhugetlbfs-2.6/sys-elf_x86_64.S 2009-10-31 06:44:26.943648847 +0000
71 -@@ -32,3 +32,7 @@
72 - mov 0x8(%rsp),%r9
73 - syscall
74 - retq
75 -+
76 -+#if defined(__linux__) && defined(__ELF__)
77 -+ .section .note.GNU-stack,"",%progbits
78 -+#endif
79
80 diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
81 deleted file mode 100644
82 index 3725a9c4975..00000000000
83 --- a/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
84 +++ /dev/null
85 @@ -1,146 +0,0 @@
86 -# Copyright 1999-2014 Gentoo Foundation
87 -# Distributed under the terms of the GNU General Public License v2
88 -
89 -EAPI="4"
90 -
91 -inherit eutils multilib toolchain-funcs
92 -
93 -DESCRIPTION="easy hugepage access"
94 -HOMEPAGE="http://libhugetlbfs.sourceforge.net/"
95 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
96 -
97 -LICENSE="GPL-2"
98 -SLOT="0"
99 -KEYWORDS="~amd64 ~ppc64 ~x86"
100 -IUSE="static-libs"
101 -
102 -src_prepare() {
103 - epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
104 - epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
105 - epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
106 - sed -i \
107 - -e '/^PREFIX/s:/local::' \
108 - -e '1iBUILDTYPE = NATIVEONLY' \
109 - -e '1iV = 1' \
110 - -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
111 - -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
112 - Makefile
113 - if [ "$(get_libdir)" == "lib64" ]; then
114 - sed -i \
115 - -e "/^LIB\(32\)/s:=.*:= lib32:" \
116 - Makefile
117 - fi
118 -}
119 -
120 -src_compile() {
121 - tc-export AR
122 - emake CC="$(tc-getCC)" libs tools
123 -}
124 -
125 -src_install() {
126 - default
127 - use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.a
128 - rm "${D}"/usr/bin/oprofile* || die
129 -}
130 -
131 -src_test_alloc_one() {
132 - hugeadm="$1"
133 - sign="$2"
134 - pagesize="$3"
135 - pagecount="$4"
136 - ${hugeadm} \
137 - --pool-pages-max ${pagesize}:${sign}${pagecount} \
138 - && \
139 - ${hugeadm} \
140 - --pool-pages-min ${pagesize}:${sign}${pagecount}
141 - return $?
142 -}
143 -
144 -# die is NOT allowed in this src_test block after the marked point, so that we
145 -# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
146 -src_test() {
147 - [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
148 - einfo "Building testsuite"
149 - emake -j1 tests || die "Failed to build tests"
150 -
151 - hugeadm='obj/hugeadm'
152 - allocated=''
153 - rc=0
154 - # the testcases need 64MiB per pagesize.
155 - MIN_HUGEPAGE_RAM=$((64*1024*1024))
156 -
157 - einfo "Planning allocation"
158 - PAGESIZES="$(${hugeadm} --page-sizes-all)"
159 -
160 - # Need to do this before we can create the mountpoints.
161 - for pagesize in ${PAGESIZES} ; do
162 - # The kernel depends on the location :-(
163 - mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
164 - addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
165 - done
166 - addwrite /proc/sys/vm/
167 - addwrite /proc/sys/kernel/shmall
168 - addwrite /proc/sys/kernel/shmmax
169 - addwrite /proc/sys/kernel/shmmni
170 -
171 - einfo "Checking HugeTLB mountpoints"
172 - ${hugeadm} --create-mounts || die "Failed to set up hugetlb mountpoints."
173 -
174 - # -----------------------------------------------------
175 - # --------- die is unsafe after this point. -----------
176 - # -----------------------------------------------------
177 -
178 - einfo "Starting allocation"
179 - for pagesize in ${PAGESIZES} ; do
180 - pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
181 - einfo " ${pagecount} @ ${pagesize}"
182 - addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
183 - src_test_alloc_one "$hugeadm" "+" "${pagesize}" "${pagecount}"
184 - rc=$?
185 - if [[ $rc -eq 0 ]]; then
186 - allocated="${allocated} ${pagesize}:${pagecount}"
187 - else
188 - eerror "Failed to add ${pagecount} pages of size ${pagesize}"
189 - fi
190 - done
191 -
192 - einfo "Allocation status"
193 - ${hugeadm} --pool-list
194 -
195 - if [[ -n "${allocated}" ]]; then
196 - # All our allocations worked, so time to run.
197 - einfo "Starting tests"
198 - cd "${S}"/tests
199 - TESTOPTS="-t func"
200 - case $ARCH in
201 - amd64|ppc64)
202 - TESTOPTS="${TESTOPTS} -b 64"
203 - ;;
204 - x86)
205 - TESTOPTS="${TESTOPTS} -b 32"
206 - ;;
207 - esac
208 - # This needs a bit of work to give a nice exit code still.
209 - ./run_tests.py ${TESTOPTS}
210 - rc=$?
211 - else
212 - eerror "Failed to make HugeTLB allocations."
213 - rc=1
214 - fi
215 -
216 - einfo "Cleaning up memory"
217 - cd "${S}"
218 - # Cleanup memory allocation
219 - for alloc in ${allocated} ; do
220 - pagesize="${alloc/:*}"
221 - pagecount="${alloc/*:}"
222 - einfo " ${pagecount} @ ${pagesize}"
223 - src_test_alloc_one "$hugeadm" "-" "${pagesize}" "${pagecount}"
224 - done
225 -
226 - # ---------------------------------------------------------
227 - # --------- die is safe again after this point. -----------
228 - # ---------------------------------------------------------
229 -
230 - return $rc
231 -}
232
233 diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
234 deleted file mode 100644
235 index 030f4c4f989..00000000000
236 --- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
237 +++ /dev/null
238 @@ -1,164 +0,0 @@
239 -# Copyright 1999-2015 Gentoo Foundation
240 -# Distributed under the terms of the GNU General Public License v2
241 -
242 -EAPI="5"
243 -
244 -PYTHON_COMPAT=( python2_7 )
245 -
246 -inherit eutils multilib toolchain-funcs perl-functions python-any-r1
247 -
248 -DESCRIPTION="easy hugepage access"
249 -HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs"
250 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
251 -# Switch to github tarball w/next release.
252 -#SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
253 -
254 -LICENSE="GPL-2"
255 -SLOT="0"
256 -KEYWORDS="~amd64 ~ppc64 ~x86"
257 -IUSE="perl static-libs test"
258 -
259 -DEPEND="test? ( ${PYTHON_DEPS} )"
260 -RDEPEND="perl? ( dev-lang/perl:= )"
261 -
262 -src_prepare() {
263 - perl_set_version
264 -
265 - epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
266 - epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
267 - epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
268 - sed -i \
269 - -e '/^PREFIX/s:/local::' \
270 - -e '1iBUILDTYPE = NATIVEONLY' \
271 - -e '1iV = 1' \
272 - -e '/gzip.*MANDIR/d' \
273 - -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
274 - -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
275 - -e "/^PMDIR = .*\/perl5\/TLBC/s::PMDIR = ${VENDOR_LIB}\/TLBC:" \
276 - Makefile || die "sed failed"
277 - if [ "$(get_libdir)" == "lib64" ]; then
278 - sed -i \
279 - -e "/^LIB\(32\)/s:=.*:= lib32:" \
280 - Makefile
281 - fi
282 -}
283 -
284 -src_compile() {
285 - tc-export AR
286 - emake CC="$(tc-getCC)" libs tools
287 -}
288 -
289 -src_install() {
290 - default
291 - use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
292 - rm "${ED}"/usr/bin/oprofile* || die
293 - if ! use perl ; then
294 - rm -r \
295 - "${ED}"/usr/bin/cpupcstat \
296 - "${ED}"/usr/share/man/man8/cpupcstat.8 \
297 - "${ED}/${VENDOR_LIB}" \
298 - || die
299 - fi
300 -}
301 -
302 -src_test_alloc_one() {
303 - hugeadm="$1"
304 - sign="$2"
305 - pagesize="$3"
306 - pagecount="$4"
307 - ${hugeadm} \
308 - --pool-pages-max ${pagesize}:${sign}${pagecount} \
309 - && \
310 - ${hugeadm} \
311 - --pool-pages-min ${pagesize}:${sign}${pagecount}
312 - return $?
313 -}
314 -
315 -# die is NOT allowed in this src_test block after the marked point, so that we
316 -# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
317 -src_test() {
318 - [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
319 - einfo "Building testsuite"
320 - emake -j1 tests || die "Failed to build tests"
321 -
322 - hugeadm='obj/hugeadm'
323 - allocated=''
324 - rc=0
325 - # the testcases need 64MiB per pagesize.
326 - MIN_HUGEPAGE_RAM=$((64*1024*1024))
327 -
328 - einfo "Planning allocation"
329 - PAGESIZES="$(${hugeadm} --page-sizes-all)"
330 -
331 - # Need to do this before we can create the mountpoints.
332 - for pagesize in ${PAGESIZES} ; do
333 - # The kernel depends on the location :-(
334 - mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
335 - addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
336 - done
337 - addwrite /proc/sys/vm/
338 - addwrite /proc/sys/kernel/shmall
339 - addwrite /proc/sys/kernel/shmmax
340 - addwrite /proc/sys/kernel/shmmni
341 -
342 - einfo "Checking HugeTLB mountpoints"
343 - ${hugeadm} --create-mounts || die "Failed to set up hugetlb mountpoints."
344 -
345 - # -----------------------------------------------------
346 - # --------- die is unsafe after this point. -----------
347 - # -----------------------------------------------------
348 -
349 - einfo "Starting allocation"
350 - for pagesize in ${PAGESIZES} ; do
351 - pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
352 - einfo " ${pagecount} @ ${pagesize}"
353 - addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
354 - src_test_alloc_one "$hugeadm" "+" "${pagesize}" "${pagecount}"
355 - rc=$?
356 - if [[ $rc -eq 0 ]]; then
357 - allocated="${allocated} ${pagesize}:${pagecount}"
358 - else
359 - eerror "Failed to add ${pagecount} pages of size ${pagesize}"
360 - fi
361 - done
362 -
363 - einfo "Allocation status"
364 - ${hugeadm} --pool-list
365 -
366 - if [[ -n "${allocated}" ]]; then
367 - # All our allocations worked, so time to run.
368 - einfo "Starting tests"
369 - cd "${S}"/tests
370 - TESTOPTS="-t func"
371 - case $ARCH in
372 - amd64|ppc64)
373 - TESTOPTS="${TESTOPTS} -b 64"
374 - ;;
375 - x86)
376 - TESTOPTS="${TESTOPTS} -b 32"
377 - ;;
378 - esac
379 - # This needs a bit of work to give a nice exit code still.
380 - ./run_tests.py ${TESTOPTS}
381 - rc=$?
382 - else
383 - eerror "Failed to make HugeTLB allocations."
384 - rc=1
385 - fi
386 -
387 - einfo "Cleaning up memory"
388 - cd "${S}"
389 - # Cleanup memory allocation
390 - for alloc in ${allocated} ; do
391 - pagesize="${alloc/:*}"
392 - pagecount="${alloc/*:}"
393 - einfo " ${pagecount} @ ${pagesize}"
394 - src_test_alloc_one "$hugeadm" "-" "${pagesize}" "${pagecount}"
395 - done
396 -
397 - # ---------------------------------------------------------
398 - # --------- die is safe again after this point. -----------
399 - # ---------------------------------------------------------
400 -
401 - return $rc
402 -}
403
404 diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild
405 deleted file mode 100644
406 index 07b65a2775a..00000000000
407 --- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild
408 +++ /dev/null
409 @@ -1,148 +0,0 @@
410 -# Copyright 1999-2015 Gentoo Foundation
411 -# Distributed under the terms of the GNU General Public License v2
412 -
413 -EAPI="4"
414 -
415 -inherit eutils multilib toolchain-funcs
416 -
417 -DESCRIPTION="easy hugepage access"
418 -HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs"
419 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
420 -# Switch to github tarball w/next release.
421 -#SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
422 -
423 -LICENSE="GPL-2"
424 -SLOT="0"
425 -KEYWORDS="~amd64 ~ppc64 ~x86"
426 -IUSE="static-libs"
427 -
428 -src_prepare() {
429 - epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
430 - epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
431 - epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
432 - sed -i \
433 - -e '/^PREFIX/s:/local::' \
434 - -e '1iBUILDTYPE = NATIVEONLY' \
435 - -e '1iV = 1' \
436 - -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
437 - -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
438 - Makefile
439 - if [ "$(get_libdir)" == "lib64" ]; then
440 - sed -i \
441 - -e "/^LIB\(32\)/s:=.*:= lib32:" \
442 - Makefile
443 - fi
444 -}
445 -
446 -src_compile() {
447 - tc-export AR
448 - emake CC="$(tc-getCC)" libs tools
449 -}
450 -
451 -src_install() {
452 - default
453 - use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.a
454 - rm "${D}"/usr/bin/oprofile* || die
455 -}
456 -
457 -src_test_alloc_one() {
458 - hugeadm="$1"
459 - sign="$2"
460 - pagesize="$3"
461 - pagecount="$4"
462 - ${hugeadm} \
463 - --pool-pages-max ${pagesize}:${sign}${pagecount} \
464 - && \
465 - ${hugeadm} \
466 - --pool-pages-min ${pagesize}:${sign}${pagecount}
467 - return $?
468 -}
469 -
470 -# die is NOT allowed in this src_test block after the marked point, so that we
471 -# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
472 -src_test() {
473 - [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
474 - einfo "Building testsuite"
475 - emake -j1 tests || die "Failed to build tests"
476 -
477 - hugeadm='obj/hugeadm'
478 - allocated=''
479 - rc=0
480 - # the testcases need 64MiB per pagesize.
481 - MIN_HUGEPAGE_RAM=$((64*1024*1024))
482 -
483 - einfo "Planning allocation"
484 - PAGESIZES="$(${hugeadm} --page-sizes-all)"
485 -
486 - # Need to do this before we can create the mountpoints.
487 - for pagesize in ${PAGESIZES} ; do
488 - # The kernel depends on the location :-(
489 - mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
490 - addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
491 - done
492 - addwrite /proc/sys/vm/
493 - addwrite /proc/sys/kernel/shmall
494 - addwrite /proc/sys/kernel/shmmax
495 - addwrite /proc/sys/kernel/shmmni
496 -
497 - einfo "Checking HugeTLB mountpoints"
498 - ${hugeadm} --create-mounts || die "Failed to set up hugetlb mountpoints."
499 -
500 - # -----------------------------------------------------
501 - # --------- die is unsafe after this point. -----------
502 - # -----------------------------------------------------
503 -
504 - einfo "Starting allocation"
505 - for pagesize in ${PAGESIZES} ; do
506 - pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
507 - einfo " ${pagecount} @ ${pagesize}"
508 - addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
509 - src_test_alloc_one "$hugeadm" "+" "${pagesize}" "${pagecount}"
510 - rc=$?
511 - if [[ $rc -eq 0 ]]; then
512 - allocated="${allocated} ${pagesize}:${pagecount}"
513 - else
514 - eerror "Failed to add ${pagecount} pages of size ${pagesize}"
515 - fi
516 - done
517 -
518 - einfo "Allocation status"
519 - ${hugeadm} --pool-list
520 -
521 - if [[ -n "${allocated}" ]]; then
522 - # All our allocations worked, so time to run.
523 - einfo "Starting tests"
524 - cd "${S}"/tests
525 - TESTOPTS="-t func"
526 - case $ARCH in
527 - amd64|ppc64)
528 - TESTOPTS="${TESTOPTS} -b 64"
529 - ;;
530 - x86)
531 - TESTOPTS="${TESTOPTS} -b 32"
532 - ;;
533 - esac
534 - # This needs a bit of work to give a nice exit code still.
535 - ./run_tests.py ${TESTOPTS}
536 - rc=$?
537 - else
538 - eerror "Failed to make HugeTLB allocations."
539 - rc=1
540 - fi
541 -
542 - einfo "Cleaning up memory"
543 - cd "${S}"
544 - # Cleanup memory allocation
545 - for alloc in ${allocated} ; do
546 - pagesize="${alloc/:*}"
547 - pagecount="${alloc/*:}"
548 - einfo " ${pagecount} @ ${pagesize}"
549 - src_test_alloc_one "$hugeadm" "-" "${pagesize}" "${pagecount}"
550 - done
551 -
552 - # ---------------------------------------------------------
553 - # --------- die is safe again after this point. -----------
554 - # ---------------------------------------------------------
555 -
556 - return $rc
557 -}