From 7246f4dcaccc8de76a96a41359d89c3c791579bc Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 12 Nov 2021 10:16:02 -0500 Subject: tools/lib/lockdep: drop liblockdep TL;DR: While a tool like liblockdep is useful, it probably doesn't belong within the kernel tree. liblockdep attempts to reuse kernel code both directly (by directly building the kernel's lockdep code) as well as indirectly (by using sanitized headers). This makes liblockdep an integral part of the kernel. It also makes liblockdep quite unique: while other userspace code might use sanitized headers, it generally doesn't attempt to use kernel code directly which means that changes on the kernel side of things don't affect (and break) it directly. All our workflows and tooling around liblockdep don't support this uniqueness. Changes that go into the kernel code aren't validated to not break in-tree userspace code. liblockdep ended up being very fragile, breaking over and over, to the point that living in the same tree as the lockdep code lost most of it's value. liblockdep should continue living in an external tree, syncing with the kernel often, in a controllable way. Signed-off-by: Sasha Levin Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Linus Torvalds --- tools/lib/lockdep/run_tests.sh | 47 ------------------------------------------ 1 file changed, 47 deletions(-) delete mode 100755 tools/lib/lockdep/run_tests.sh (limited to 'tools/lib/lockdep/run_tests.sh') diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh deleted file mode 100755 index 11f425662b43..000000000000 --- a/tools/lib/lockdep/run_tests.sh +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: GPL-2.0 - -if ! make >/dev/null; then - echo "Building liblockdep failed." - echo "FAILED!" - exit 1 -fi - -find tests -name '*.c' | sort | while read -r i; do - testname=$(basename "$i" .c) - echo -ne "$testname... " - if gcc -o "tests/$testname" -pthread "$i" liblockdep.a -Iinclude -D__USE_LIBLOCKDEP && - timeout 1 "tests/$testname" 2>&1 | /bin/bash "tests/${testname}.sh"; then - echo "PASSED!" - else - echo "FAILED!" - fi - rm -f "tests/$testname" -done - -find tests -name '*.c' | sort | while read -r i; do - testname=$(basename "$i" .c) - echo -ne "(PRELOAD) $testname... " - if gcc -o "tests/$testname" -pthread -Iinclude "$i" && - timeout 1 ./lockdep "tests/$testname" 2>&1 | - /bin/bash "tests/${testname}.sh"; then - echo "PASSED!" - else - echo "FAILED!" - fi - rm -f "tests/$testname" -done - -find tests -name '*.c' | sort | while read -r i; do - testname=$(basename "$i" .c) - echo -ne "(PRELOAD + Valgrind) $testname... " - if gcc -o "tests/$testname" -pthread -Iinclude "$i" && - { timeout 10 valgrind --read-var-info=yes ./lockdep "./tests/$testname" >& "tests/${testname}.vg.out"; true; } && - /bin/bash "tests/${testname}.sh" < "tests/${testname}.vg.out" && - ! grep -Eq '(^==[0-9]*== (Invalid |Uninitialised ))|Mismatched free|Source and destination overlap| UME ' "tests/${testname}.vg.out"; then - echo "PASSED!" - else - echo "FAILED!" - fi - rm -f "tests/$testname" -done -- cgit v1.2.3