/usr/src/linux-headers-5.15.0-181/tools/testing/selftests/rcutorture/bin
NameSizeModeActions
config2csv.sh18420755editdlrm
configcheck.sh9860755editdlrm
configinit.sh13140755editdlrm
configNR_CPUS.sh6880755editdlrm
config_override.sh8140755editdlrm
console-badness.sh7840755editdlrm
cpus2use.sh8290755editdlrm
functions.sh75380644editdlrm
jitter.sh22440755editdlrm
jitterstart.sh9940644editdlrm
jitterstop.sh5200644editdlrm
kcsan-collapse.sh4840755editdlrm
kvm-again.sh40250755editdlrm
kvm-assign-cpus.sh19990755editdlrm
kvm-build.sh13170755editdlrm
kvm-check-branches.sh35170755editdlrm
kvm-end-run-stats.sh10830755editdlrm
kvm-find-errors.sh16240755editdlrm
kvm-get-cpus-script.sh23260755editdlrm
kvm-recheck-lock.sh8840755editdlrm
kvm-recheck-rcu.sh21250755editdlrm
kvm-recheck-rcuscale-ftrace.sh26800755editdlrm
kvm-recheck-rcuscale.sh19590755editdlrm
kvm-recheck-refscale.sh15620755editdlrm
kvm-recheck-scf.sh9300755editdlrm
kvm-recheck.sh26940755editdlrm
kvm-remote-noreap.sh6290755editdlrm
kvm-remote.sh71880755editdlrm
kvm-test-1-run-batch.sh26300755editdlrm
kvm-test-1-run-qemu.sh53930755editdlrm
kvm-test-1-run.sh87360755editdlrm
kvm-transform.sh20110755editdlrm
kvm.sh189360755editdlrm
mkinitrd.sh19960755editdlrm
parse-build.sh10320755editdlrm
parse-console.sh39680755editdlrm
torture.sh147750755editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/tools/testing/selftests/rcutorture/bin/mkinitrd.sh (1996B)
#!/bin/bash # SPDX-License-Identifier: GPL-2.0+ # # Create an initrd directory if one does not already exist. # # Copyright (C) IBM Corporation, 2013 # # Author: Connor Shu D=tools/testing/selftests/rcutorture # Prerequisite checks [ -z "$D" ] && echo >&2 "No argument supplied" && exit 1 if [ ! -d "$D" ]; then echo >&2 "$D does not exist: Malformed kernel source tree?" exit 1 fi if [ -s "$D/initrd/init" ]; then echo "$D/initrd/init already exists, no need to create it" exit 0 fi # Create a C-language initrd/init infinite-loop program and statically # link it. This results in a very small initrd. echo "Creating a statically linked C-language initrd" cd $D mkdir -p initrd cd initrd cat > init.c << '___EOF___' #ifndef NOLIBC #include #include #endif volatile unsigned long delaycount; int main(int argc, int argv[]) { int i; struct timeval tv; struct timeval tvb; for (;;) { sleep(1); /* Need some userspace time. */ if (gettimeofday(&tvb, NULL)) continue; do { for (i = 0; i < 1000 * 100; i++) delaycount = i * i; if (gettimeofday(&tv, NULL)) break; tv.tv_sec -= tvb.tv_sec; if (tv.tv_sec > 1) break; tv.tv_usec += tv.tv_sec * 1000 * 1000; tv.tv_usec -= tvb.tv_usec; } while (tv.tv_usec < 1000); } return 0; } ___EOF___ # build using nolibc on supported archs (smaller executable) and fall # back to regular glibc on other ones. if echo -e "#if __x86_64__||__i386__||__i486__||__i586__||__i686__" \ "||__ARM_EABI__||__aarch64__\nyes\n#endif" \ | ${CROSS_COMPILE}gcc -E -nostdlib -xc - \ | grep -q '^yes'; then # architecture supported by nolibc ${CROSS_COMPILE}gcc -fno-asynchronous-unwind-tables -fno-ident \ -nostdlib -include ../../../../include/nolibc/nolibc.h \ -s -static -Os -o init init.c -lgcc else ${CROSS_COMPILE}gcc -s -static -Os -o init init.c fi rm init.c echo "Done creating a statically linked C-language initrd" exit 0