You are not logged in.

#1 2023-07-22 11:32:13

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Building selftest for amd-pstates

Has anyone successfully followed these instructions to build the selftest tools for the amd-pstates benchmarks?

Under "How to execute the tests" it seems that clang and llvm are needed... but I appear to be missing more...

% cd /scratch/linux-6.4.4
make -C tools/testing/selftests
...
make[1]: Leaving directory '/scratch/linux-6.4.4/tools/testing/selftests/vDSO'
make[1]: Entering directory '/scratch/linux-6.4.4/tools/testing/selftests/mm'
Warning: you seem to have a broken 32-bit build
environment. This will reduce test coverage of 64-bit
kernels. If you are using a Debian-like distribution,
try:

  apt-get install gcc-multilib libc6-i386 libc6-dev-i386

If you are using a Fedora-like distribution, try:

  yum install glibc-devel.*i686
make[1]: Leaving directory '/scratch/linux-6.4.4/tools/testing/selftests/mm'
make[1]: Entering directory '/scratch/linux-6.4.4/tools/testing/selftests/x86'
Warning: you seem to have a broken 32-bit build
environment.  This will reduce test coverage of 64-bit
kernels.  If you are using a Debian-like distribution,
try:

  apt-get install gcc-multilib libc6-i386 libc6-dev-i386

If you are using a Fedora-like distribution, try:

  yum install glibc-devel.*i686

If you are using a SUSE-like distribution, try:

  zypper install gcc-32bit glibc-devel-static-32bit
make[1]: Leaving directory '/scratch/linux-6.4.4/tools/testing/selftests/x86'
make[1]: Entering directory '/scratch/linux-6.4.4/tools/testing/selftests/zram'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/scratch/linux-6.4.4/tools/testing/selftests/zram'
make: Leaving directory '/scratch/linux-6.4.4/tools/testing/selftests'

EDIT: I created a PKGBUILD and am building a clean chroot but this is just wrought with errors:

_minor=4

pkgname=linux-selftests
_major=6.4
[[ -z ${_minor} ]] && pkgver=${_major} || pkgver=${_major}.${_minor}
pkgrel=1
pkgdesc='Linux'
_srctag="linux-$pkgver"
url="https://github.com/archlinux/linux/commits/v$_srcver"
arch=(x86_64)
license=(GPL2)
makedepends=(clang llvm linux-headers rsync python gcc alsa-lib)
options=('!strip')
source=(
  https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar.{xz,sign}
)
validpgpkeys=(
  'ABAF11C65A2970B130ABE3C479BE3E4300411886'  # Linus Torvalds
  '647F28654894E3BD457199BE38DBBDC86092693E'  # Greg Kroah-Hartman
  'A2FF3A36AAA56654109064AB19802F8B0D70FC30'  # Jan Alexander Steffens (heftig)
  'C7E7849466FE2358343588377258734B41C31549'  # David Runge
)
sha256sums=('9cbc4a2be714a4d154e1312c9f33ded91174907c8b15ee936ad27002ac75ff2a'
            'SKIP')
build() {
  cd $_srctag
  make -C tools/testing/selftests
}

package() {
  cd $_srctag
  # TODO
}

# vim:set ts=8 sts=2 sw=2 et:

Last edited by graysky (2023-07-22 11:49:24)

Offline

#2 2023-07-24 17:23:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Building selftest for amd-pstates

I seems to be missing headers that are clearly present in the linux-headers package:

% pkgfile numa.h
core/linux-headers

Yet:

% grep 'No such' linux-selftests-6.4.4-1-x86_64-build.log
fuse_mnt.c:17:10: fatal error: fuse.h: No such file or directory
reuseport_bpf_numa.c:24:10: fatal error: numa.h: No such file or directory
ksm_tests.c:9:10: fatal error: numa.h: No such file or directory
migration.c:10:10: fatal error: numa.h: No such file or directory

Is there a make FLAG I need to pass to the build that would fix these?

Offline

Board footer

Powered by FluxBB