From: tip-bot for Sedat Dilek <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, shuahkh@osg.samsung.com,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
mingo@kernel.org, hpa@zytor.com, sedat.dilek@gmail.com,
tglx@linutronix.de, boqun.feng@gmail.com,
linux-fsdevel@vger.kernel.org, tytso@mit.edu
Subject: [tip:core/urgent] tools/lib/lockdep: Fix unsupported 'basename -s' in run_tests.sh
Date: Wed, 30 Mar 2016 03:51:38 -0700 [thread overview]
Message-ID: <tip-a189c017ded0f13650793067fb7a1afbc2b98cd5@git.kernel.org> (raw)
In-Reply-To: <1459326169-7009-1-git-send-email-sedat.dilek@gmail.com>
Commit-ID: a189c017ded0f13650793067fb7a1afbc2b98cd5
Gitweb: http://git.kernel.org/tip/a189c017ded0f13650793067fb7a1afbc2b98cd5
Author: Sedat Dilek <sedat.dilek@gmail.com>
AuthorDate: Wed, 30 Mar 2016 10:22:49 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 30 Mar 2016 12:45:56 +0200
tools/lib/lockdep: Fix unsupported 'basename -s' in run_tests.sh
Here on Ubuntu/precise I have GNU/coreutils v8.13 installed
where 'basename -s' is not supported.
The result is that run_tests.sh is not done properly.
How to reproduce:
$ cd $BUILD_DIR
$ LC_ALL=C make -C tools/ liblockdep
$ cd tools/lib/lockdep/
$ LC_ALL=C ./run_tests.sh
basename: invalid option -- 's'
Try `basename --help' for more information.
... timeout: failed to run command `./tests/': Permission denied
FAILED!
rm: cannot remove `tests/': Is a directory
Due to unsupported basename the tests programs are not generated
and cannot be removed.
Fix this by doing a compatible basename invocation and check for
the existence of generated tests programs.
For more details see this LKML thread:
http://marc.info/?t=145906667300001&r=1&w=2
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com> (maintainer:LIBLOCKDEP)
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Link: http://lkml.kernel.org/r/1459326169-7009-1-git-send-email-sedat.dilek@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/lib/lockdep/run_tests.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh
index 5334ad9..1069d96 100755
--- a/tools/lib/lockdep/run_tests.sh
+++ b/tools/lib/lockdep/run_tests.sh
@@ -3,7 +3,7 @@
make &> /dev/null
for i in `ls tests/*.c`; do
- testname=$(basename -s .c "$i")
+ testname=$(basename "$i" .c)
gcc -o tests/$testname -pthread -lpthread $i liblockdep.a -Iinclude -D__USE_LIBLOCKDEP &> /dev/null
echo -ne "$testname... "
if [ $(timeout 1 ./tests/$testname | wc -l) -gt 0 ]; then
@@ -11,11 +11,13 @@ for i in `ls tests/*.c`; do
else
echo "FAILED!"
fi
- rm tests/$testname
+ if [ -f "tests/$testname" ]; then
+ rm tests/$testname
+ fi
done
for i in `ls tests/*.c`; do
- testname=$(basename -s .c "$i")
+ testname=$(basename "$i" .c)
gcc -o tests/$testname -pthread -lpthread -Iinclude $i &> /dev/null
echo -ne "(PRELOAD) $testname... "
if [ $(timeout 1 ./lockdep ./tests/$testname | wc -l) -gt 0 ]; then
@@ -23,5 +25,7 @@ for i in `ls tests/*.c`; do
else
echo "FAILED!"
fi
- rm tests/$testname
+ if [ -f "tests/$testname" ]; then
+ rm tests/$testname
+ fi
done
prev parent reply other threads:[~2016-03-30 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 8:22 [PATCH] liblockdep: " Sedat Dilek
2016-03-30 10:51 ` tip-bot for Sedat Dilek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-a189c017ded0f13650793067fb7a1afbc2b98cd5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=boqun.feng@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sedat.dilek@gmail.com \
--cc=shuahkh@osg.samsung.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome