* [PATCH 1/3] scripts: TRINITY_PATH defaults to "."
2013-10-09 10:56 [PATCH 0/3] script enhancements Anders Roxell
@ 2013-10-09 10:56 ` Anders Roxell
2013-10-09 10:56 ` [PATCH 2/3] scripts: change mkdir tmp to mktemp Anders Roxell
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Anders Roxell @ 2013-10-09 10:56 UTC (permalink / raw)
To: davej; +Cc: trinity, patches, Anders Roxell
TRINITY_PATH may be changed in the enviroment
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
scripts/analyse-dumps.sh | 4 +++-
scripts/clean-cores.sh | 4 +++-
scripts/find.sh | 8 +++++---
scripts/test-all-syscalls-parallel.sh | 6 ++++--
scripts/test-all-syscalls-sequentially.sh | 8 +++++---
scripts/test-multi.sh | 6 ++++--
scripts/test-vm.sh | 4 +++-
7 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/scripts/analyse-dumps.sh b/scripts/analyse-dumps.sh
index d55393c..bd45ea5 100755
--- a/scripts/analyse-dumps.sh
+++ b/scripts/analyse-dumps.sh
@@ -1,8 +1,10 @@
#!/bin/sh
+TRINITY_PATH=${TRINITY_PATH:-.}
+
for core in $(find . -name "core.*")
do
- gdb -batch -n -ex 'bt' ./trinity $core > core.txt
+ gdb -batch -n -ex 'bt' $TRINITY_PATH/trinity $core > core.txt
SHA=$(cat core.txt| grep -v New\ LWP | sha1sum)
cat core.txt > core-$SHA.txt
rm -f core.txt
diff --git a/scripts/clean-cores.sh b/scripts/clean-cores.sh
index 821e06a..0b90be6 100755
--- a/scripts/clean-cores.sh
+++ b/scripts/clean-cores.sh
@@ -1,8 +1,10 @@
#!/bin/sh
+TRINITY_PATH=${TRINITY_PATH:-.}
+
# remove old cores
for i in `find . -name "core.*" -exec ls -l {} \; | grep -v "$(date +%b\ %e)" | awk '{ print $9 }'`; do rm -f $i; done
# Remove corrupted cores
find . -empty -name "core.*" -exec rm -f {} \;
-for i in $(file core.* | grep -v trinity | awk '{ print $1 }' | sed 's/://'); do rm -f $i; done
+for i in $(file core.* | grep -v $TRINITY_PATH/trinity | awk '{ print $1 }' | sed 's/://'); do rm -f $i; done
diff --git a/scripts/find.sh b/scripts/find.sh
index 537160f..5528210 100755
--- a/scripts/find.sh
+++ b/scripts/find.sh
@@ -5,6 +5,8 @@
# sendmsg that only occurred after connect was called.
#
+TRINITY_PATH=${TRINITY_PATH:-.}
+
check_tainted()
{
if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then
@@ -27,18 +29,18 @@ while [ 1 ];
do
-for sc in $(../trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+for sc in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
do
mkdir -p tmp.$i
pushd tmp.$i
- if [ ! -f ../../trinity ]; then
+ if [ ! -f $TRINITY_PATH/trinity ]; then
echo lost!
pwd
exit
fi
- ../../trinity -q -l off -n -c sendmsg -c $sc -C32 -N 999999
+ $TRINITY_PATH/trinity -q -l off -n -c sendmsg -c $sc -C32 -N 999999
popd
diff --git a/scripts/test-all-syscalls-parallel.sh b/scripts/test-all-syscalls-parallel.sh
index 861c156..c713cce 100755
--- a/scripts/test-all-syscalls-parallel.sh
+++ b/scripts/test-all-syscalls-parallel.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+TRINITY_PATH=${TRINITY_PATH:-.}
+
if [ ! -d tmp ]; then
mkdir tmp
fi
@@ -8,9 +10,9 @@ cd tmp
while [ 1 ];
do
- for syscall in $(../trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+ for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
do
- MALLOC_CHECK_=2 ../trinity -q -c $syscall -D &
+ MALLOC_CHECK_=2 $TRINITY_PATH/trinity -q -c $syscall -D &
done
wait
done
diff --git a/scripts/test-all-syscalls-sequentially.sh b/scripts/test-all-syscalls-sequentially.sh
index 85bcf71..6d79db4 100755
--- a/scripts/test-all-syscalls-sequentially.sh
+++ b/scripts/test-all-syscalls-sequentially.sh
@@ -3,6 +3,8 @@
# This is a useful test to run occasionally, to see which syscalls are
# causing trinity to segfault.
+TRINITY_PATH=${TRINITY_PATH:-.}
+
check_tainted()
{
if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then
@@ -19,18 +21,18 @@ TAINT=$(cat /proc/sys/kernel/tainted)
while [ 1 ]
do
-for syscall in $(./trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
do
chmod 755 tmp
pushd tmp
- if [ ! -f ../trinity ]; then
+ if [ ! -f $TRINITY_PATH/trinity ]; then
echo lost!
pwd
exit
fi
- MALLOC_CHECK_=2 ../trinity -q -c $syscall -N 99999 -l off -C 64
+ MALLOC_CHECK_=2 $TRINITY_PATH/trinity -q -c $syscall -N 99999 -l off -C 64
popd
check_tainted
diff --git a/scripts/test-multi.sh b/scripts/test-multi.sh
index 6fddeba..993e124 100755
--- a/scripts/test-multi.sh
+++ b/scripts/test-multi.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+TRINITY_PATH=${TRINITY_PATH:-.}
+
check_tainted()
{
if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then
@@ -22,7 +24,7 @@ NR_PROCESSES=$(($NR_CPUS * 2))
while [ 1 ];
do
rm -f trinity
- cp ../trinity .
+ cp $TRINITY_PATH/trinity .
chmod -w trinity
for i in `seq 1 $NR_PROCESSES`
@@ -35,7 +37,7 @@ do
mkdir -p tmp.$i
pushd tmp.$i
- if [ ! -f ../../trinity ]; then
+ if [ ! -f $TRINITY_PATH/trinity ]; then
echo lost!
pwd
exit
diff --git a/scripts/test-vm.sh b/scripts/test-vm.sh
index 4c472ca..6b75e8d 100755
--- a/scripts/test-vm.sh
+++ b/scripts/test-vm.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+TRINITY_PATH=${TRINITY_PATH:-.}
+
if [ ! -d tmp ]; then
mkdir tmp
fi
@@ -16,7 +18,7 @@ do
cd tmp.$RND
for i in `seq 1 $NR_PROCESSES`
do
- ../../trinity -q -g vm &
+ $TRINITY_PATH/trinity -q -g vm &
done
wait
cd ..
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] scripts: change mkdir tmp to mktemp
2013-10-09 10:56 [PATCH 0/3] script enhancements Anders Roxell
2013-10-09 10:56 ` [PATCH 1/3] scripts: TRINITY_PATH defaults to "." Anders Roxell
@ 2013-10-09 10:56 ` Anders Roxell
2013-10-09 10:56 ` [PATCH 3/3] scripts: arch dependent to get the syscall_list Anders Roxell
2013-10-10 8:41 ` [PATCHv2 3/3] tables.c: change the output format of -L Anders Roxell
3 siblings, 0 replies; 8+ messages in thread
From: Anders Roxell @ 2013-10-09 10:56 UTC (permalink / raw)
To: davej; +Cc: trinity, patches, Anders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
scripts/find.sh | 10 ++++------
scripts/test-all-syscalls-parallel.sh | 8 +++-----
scripts/test-all-syscalls-sequentially.sh | 9 +++------
scripts/test-multi.sh | 12 +++++-------
scripts/test-vm.sh | 8 +++-----
5 files changed, 18 insertions(+), 29 deletions(-)
diff --git a/scripts/find.sh b/scripts/find.sh
index 5528210..3f10c58 100755
--- a/scripts/find.sh
+++ b/scripts/find.sh
@@ -6,6 +6,7 @@
#
TRINITY_PATH=${TRINITY_PATH:-.}
+TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
check_tainted()
{
@@ -15,11 +16,8 @@ check_tainted()
fi
}
-if [ ! -d tmp ]; then
- mkdir tmp
-fi
-chmod 755 tmp
-cd tmp
+chmod 755 $TRINITY_TMP
+cd $TRINITY_TMP
TAINT=$(cat /proc/sys/kernel/tainted)
@@ -46,7 +44,7 @@ do
check_tainted
- chmod 755 ../tmp
+ chmod 755 $TRINITY_TMP
done
diff --git a/scripts/test-all-syscalls-parallel.sh b/scripts/test-all-syscalls-parallel.sh
index c713cce..312fd2a 100755
--- a/scripts/test-all-syscalls-parallel.sh
+++ b/scripts/test-all-syscalls-parallel.sh
@@ -1,12 +1,10 @@
#!/bin/bash
TRINITY_PATH=${TRINITY_PATH:-.}
+TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
-if [ ! -d tmp ]; then
- mkdir tmp
-fi
-chmod 755 tmp
-cd tmp
+chmod 755 $TRINITY_TMP
+cd $TRINITY_TMP
while [ 1 ];
do
diff --git a/scripts/test-all-syscalls-sequentially.sh b/scripts/test-all-syscalls-sequentially.sh
index 6d79db4..2b726fc 100755
--- a/scripts/test-all-syscalls-sequentially.sh
+++ b/scripts/test-all-syscalls-sequentially.sh
@@ -4,6 +4,7 @@
# causing trinity to segfault.
TRINITY_PATH=${TRINITY_PATH:-.}
+TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
check_tainted()
{
@@ -13,18 +14,14 @@ check_tainted()
fi
}
-if [ ! -d tmp ]; then
- mkdir tmp
-fi
-
TAINT=$(cat /proc/sys/kernel/tainted)
while [ 1 ]
do
for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
do
- chmod 755 tmp
- pushd tmp
+ chmod 755 $TRINITY_TMP
+ pushd $TRINITY_TMP
if [ ! -f $TRINITY_PATH/trinity ]; then
echo lost!
diff --git a/scripts/test-multi.sh b/scripts/test-multi.sh
index 993e124..0b2a629 100755
--- a/scripts/test-multi.sh
+++ b/scripts/test-multi.sh
@@ -1,6 +1,7 @@
#!/bin/bash
TRINITY_PATH=${TRINITY_PATH:-.}
+TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
check_tainted()
{
@@ -10,11 +11,8 @@ check_tainted()
fi
}
-if [ ! -d tmp ]; then
- mkdir tmp
-fi
-chmod 755 tmp
-cd tmp
+chmod 755 $TRINITY_TMP
+cd $TRINITY_TMP
TAINT=$(cat /proc/sys/kernel/tainted)
@@ -29,7 +27,7 @@ do
for i in `seq 1 $NR_PROCESSES`
do
- chmod 755 ../tmp
+ chmod 755 ../$TRINITY_TMP
if [ -d tmp.$i ]; then
chmod 755 tmp.$i
rm -rf tmp.$i
@@ -55,7 +53,7 @@ do
sleep 1
check_tainted
- chmod 755 ../tmp
+ chmod 755 ../$TRINITY_TMP
for i in `seq 1 $NR_PROCESSES`
do
diff --git a/scripts/test-vm.sh b/scripts/test-vm.sh
index 6b75e8d..6804c0e 100755
--- a/scripts/test-vm.sh
+++ b/scripts/test-vm.sh
@@ -1,12 +1,10 @@
#!/bin/bash
TRINITY_PATH=${TRINITY_PATH:-.}
+TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
-if [ ! -d tmp ]; then
- mkdir tmp
-fi
-chmod 755 tmp
-cd tmp
+chmod 755 $TRINITY_TMP
+cd $TRINITY_TMP
NR_CPUS=`grep ^processor /proc/cpuinfo | /usr/bin/wc -l`
NR_PROCESSES=$(($NR_CPUS * 2))
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] scripts: arch dependent to get the syscall_list
2013-10-09 10:56 [PATCH 0/3] script enhancements Anders Roxell
2013-10-09 10:56 ` [PATCH 1/3] scripts: TRINITY_PATH defaults to "." Anders Roxell
2013-10-09 10:56 ` [PATCH 2/3] scripts: change mkdir tmp to mktemp Anders Roxell
@ 2013-10-09 10:56 ` Anders Roxell
2013-10-09 16:41 ` Dave Jones
2013-10-10 8:41 ` [PATCHv2 3/3] tables.c: change the output format of -L Anders Roxell
3 siblings, 1 reply; 8+ messages in thread
From: Anders Roxell @ 2013-10-09 10:56 UTC (permalink / raw)
To: davej; +Cc: trinity, patches, Anders Roxell
ARCH may be changed in the enviroment
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
scripts/find.sh | 10 +++++++++-
scripts/test-all-syscalls-parallel.sh | 10 +++++++++-
scripts/test-all-syscalls-sequentially.sh | 10 +++++++++-
3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/scripts/find.sh b/scripts/find.sh
index 3f10c58..717beb1 100755
--- a/scripts/find.sh
+++ b/scripts/find.sh
@@ -8,6 +8,14 @@
TRINITY_PATH=${TRINITY_PATH:-.}
TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
+if [ $ARCH = "arm" ]; then
+ $TRINITY_PATH/trinity -L | grep -v AVOID | \
+ awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list
+else
+ $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \
+ awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list
+fi
+
check_tainted()
{
if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then
@@ -27,7 +35,7 @@ while [ 1 ];
do
-for sc in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+for sc in $(cat $TRINITY_TMP/syscall_list)
do
mkdir -p tmp.$i
pushd tmp.$i
diff --git a/scripts/test-all-syscalls-parallel.sh b/scripts/test-all-syscalls-parallel.sh
index 312fd2a..e229702 100755
--- a/scripts/test-all-syscalls-parallel.sh
+++ b/scripts/test-all-syscalls-parallel.sh
@@ -3,12 +3,20 @@
TRINITY_PATH=${TRINITY_PATH:-.}
TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
+if [ $ARCH = "arm" ]; then
+ $TRINITY_PATH/trinity -L | grep -v AVOID | \
+ awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list
+else
+ $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \
+ awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list
+fi
+
chmod 755 $TRINITY_TMP
cd $TRINITY_TMP
while [ 1 ];
do
- for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+ for syscall in $(cat $TRINITY_TMP/syscall_list)
do
MALLOC_CHECK_=2 $TRINITY_PATH/trinity -q -c $syscall -D &
done
diff --git a/scripts/test-all-syscalls-sequentially.sh b/scripts/test-all-syscalls-sequentially.sh
index 2b726fc..1b56a0c 100755
--- a/scripts/test-all-syscalls-sequentially.sh
+++ b/scripts/test-all-syscalls-sequentially.sh
@@ -6,6 +6,14 @@
TRINITY_PATH=${TRINITY_PATH:-.}
TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
+if [ $ARCH = "arm" ]; then
+ $TRINITY_PATH/trinity -L | grep -v AVOID | \
+ awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list
+else
+ $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \
+ awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list
+fi
+
check_tainted()
{
if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then
@@ -18,7 +26,7 @@ TAINT=$(cat /proc/sys/kernel/tainted)
while [ 1 ]
do
-for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+for syscall in $(cat $TRINITY_TMP/syscall_list)
do
chmod 755 $TRINITY_TMP
pushd $TRINITY_TMP
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] scripts: arch dependent to get the syscall_list
2013-10-09 10:56 ` [PATCH 3/3] scripts: arch dependent to get the syscall_list Anders Roxell
@ 2013-10-09 16:41 ` Dave Jones
2013-10-10 8:45 ` Anders Roxell
0 siblings, 1 reply; 8+ messages in thread
From: Dave Jones @ 2013-10-09 16:41 UTC (permalink / raw)
To: Anders Roxell; +Cc: trinity, patches
On Wed, Oct 09, 2013 at 12:56:26PM +0200, Anders Roxell wrote:
> ARCH may be changed in the enviroment
>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
> scripts/find.sh | 10 +++++++++-
> scripts/test-all-syscalls-parallel.sh | 10 +++++++++-
> scripts/test-all-syscalls-sequentially.sh | 10 +++++++++-
> 3 files changed, 27 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/find.sh b/scripts/find.sh
> index 3f10c58..717beb1 100755
> --- a/scripts/find.sh
> +++ b/scripts/find.sh
> @@ -8,6 +8,14 @@
> TRINITY_PATH=${TRINITY_PATH:-.}
> TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
>
> +if [ $ARCH = "arm" ]; then
> + $TRINITY_PATH/trinity -L | grep -v AVOID | \
> + awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list
> +else
> + $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \
> + awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list
> +fi
Ugh. How about we just change the format of the output of -L so it's
more similar on both uniarch and biarch ?
Changing to to be..
on biarch=true:
entrypoint 0 restart_syscall [32-bit] : Enabled AVOID
entrypoint 1 exit [32-bit] : Enabled AVOID
..
entrypoint 312 kcmp [64-bit]
entrypoint 313 finit_module [64-bit]
And then the !biarch case would just lack the *-bit tags, allowing the awk to
pluck out column 2 regardless of arch.
Does that sound better ?
Dave
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] scripts: arch dependent to get the syscall_list
2013-10-09 16:41 ` Dave Jones
@ 2013-10-10 8:45 ` Anders Roxell
0 siblings, 0 replies; 8+ messages in thread
From: Anders Roxell @ 2013-10-10 8:45 UTC (permalink / raw)
To: Dave Jones; +Cc: trinity, patches
On 2013-10-09 12:41, Dave Jones wrote:
> On Wed, Oct 09, 2013 at 12:56:26PM +0200, Anders Roxell wrote:
> > ARCH may be changed in the enviroment
> >
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> > ---
> > scripts/find.sh | 10 +++++++++-
> > scripts/test-all-syscalls-parallel.sh | 10 +++++++++-
> > scripts/test-all-syscalls-sequentially.sh | 10 +++++++++-
> > 3 files changed, 27 insertions(+), 3 deletions(-)
> >
> > diff --git a/scripts/find.sh b/scripts/find.sh
> > index 3f10c58..717beb1 100755
> > --- a/scripts/find.sh
> > +++ b/scripts/find.sh
> > @@ -8,6 +8,14 @@
> > TRINITY_PATH=${TRINITY_PATH:-.}
> > TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX)
> >
> > +if [ $ARCH = "arm" ]; then
> > + $TRINITY_PATH/trinity -L | grep -v AVOID | \
> > + awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list
> > +else
> > + $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \
> > + awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list
> > +fi
>
> Ugh. How about we just change the format of the output of -L so it's
> more similar on both uniarch and biarch ?
>
> Changing to to be..
>
> on biarch=true:
>
> entrypoint 0 restart_syscall [32-bit] : Enabled AVOID
> entrypoint 1 exit [32-bit] : Enabled AVOID
> ..
> entrypoint 312 kcmp [64-bit]
> entrypoint 313 finit_module [64-bit]
>
>
> And then the !biarch case would just lack the *-bit tags, allowing the awk to
> pluck out column 2 regardless of arch.
>
> Does that sound better ?
That sound great!
I will redo and send patchv2.
Anders
>
> Dave
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCHv2 3/3] tables.c: change the output format of -L
2013-10-09 10:56 [PATCH 0/3] script enhancements Anders Roxell
` (2 preceding siblings ...)
2013-10-09 10:56 ` [PATCH 3/3] scripts: arch dependent to get the syscall_list Anders Roxell
@ 2013-10-10 8:41 ` Anders Roxell
2013-10-10 17:20 ` Dave Jones
3 siblings, 1 reply; 8+ messages in thread
From: Anders Roxell @ 2013-10-10 8:41 UTC (permalink / raw)
To: davej; +Cc: trinity, patches, Anders Roxell
So the scripts can works for both biarch and !biarch
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
scripts/find.sh | 2 +-
scripts/test-all-syscalls-parallel.sh | 2 +-
scripts/test-all-syscalls-sequentially.sh | 2 +-
tables.c | 10 +++++-----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/scripts/find.sh b/scripts/find.sh
index 3f10c58..4c970c1 100755
--- a/scripts/find.sh
+++ b/scripts/find.sh
@@ -27,7 +27,7 @@ while [ 1 ];
do
-for sc in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+for sc in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $3 }' | sort -u)
do
mkdir -p tmp.$i
pushd tmp.$i
diff --git a/scripts/test-all-syscalls-parallel.sh b/scripts/test-all-syscalls-parallel.sh
index 312fd2a..7206364 100755
--- a/scripts/test-all-syscalls-parallel.sh
+++ b/scripts/test-all-syscalls-parallel.sh
@@ -8,7 +8,7 @@ cd $TRINITY_TMP
while [ 1 ];
do
- for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+ for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $3 }' | sort -u)
do
MALLOC_CHECK_=2 $TRINITY_PATH/trinity -q -c $syscall -D &
done
diff --git a/scripts/test-all-syscalls-sequentially.sh b/scripts/test-all-syscalls-sequentially.sh
index 2b726fc..14fb4c3 100755
--- a/scripts/test-all-syscalls-sequentially.sh
+++ b/scripts/test-all-syscalls-sequentially.sh
@@ -18,7 +18,7 @@ TAINT=$(cat /proc/sys/kernel/tainted)
while [ 1 ]
do
-for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u)
+for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $3 }' | sort -u)
do
chmod 755 $TRINITY_TMP
pushd $TRINITY_TMP
diff --git a/tables.c b/tables.c
index 618d742..b5c06fa 100644
--- a/tables.c
+++ b/tables.c
@@ -527,18 +527,18 @@ void dump_syscall_tables(void)
unsigned int i;
if (biarch == TRUE) {
- printf("32-bit syscalls: %d\n", max_nr_32bit_syscalls);
- printf("64-bit syscalls: %d\n", max_nr_64bit_syscalls);
+ printf("syscalls: %d [32-bit] \n", max_nr_32bit_syscalls);
+ printf("syscalls: %d [64-bit] \n", max_nr_64bit_syscalls);
for_each_32bit_syscall(i) {
- printf("32-bit entrypoint %d %s : ", syscalls_32bit[i].entry->number, syscalls_32bit[i].entry->name);
+ printf("entrypoint %d %s : [32-bit] ", syscalls_32bit[i].entry->number, syscalls_32bit[i].entry->name);
show_state(syscalls_32bit[i].entry->flags & ACTIVE);
if (syscalls_32bit[i].entry->flags & AVOID_SYSCALL)
printf(" AVOID");
printf("\n");
}
for_each_64bit_syscall(i) {
- printf("64-bit entrypoint %d %s : ", syscalls_64bit[i].entry->number, syscalls_64bit[i].entry->name);
+ printf("entrypoint %d %s : [64-bit] ", syscalls_64bit[i].entry->number, syscalls_64bit[i].entry->name);
show_state(syscalls_64bit[i].entry->flags & ACTIVE);
if (syscalls_64bit[i].entry->flags & AVOID_SYSCALL)
printf(" AVOID");
@@ -547,7 +547,7 @@ void dump_syscall_tables(void)
} else {
printf("syscalls: %d\n", max_nr_syscalls);
for_each_syscall(i) {
- printf("%d %s : ", syscalls[i].entry->number, syscalls[i].entry->name);
+ printf("entrypoint %d %s : ", syscalls[i].entry->number, syscalls[i].entry->name);
show_state(syscalls[i].entry->flags & ACTIVE);
if (syscalls[i].entry->flags & AVOID_SYSCALL)
printf(" AVOID");
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCHv2 3/3] tables.c: change the output format of -L
2013-10-10 8:41 ` [PATCHv2 3/3] tables.c: change the output format of -L Anders Roxell
@ 2013-10-10 17:20 ` Dave Jones
0 siblings, 0 replies; 8+ messages in thread
From: Dave Jones @ 2013-10-10 17:20 UTC (permalink / raw)
To: Anders Roxell; +Cc: trinity, patches
On Thu, Oct 10, 2013 at 10:41:15AM +0200, Anders Roxell wrote:
> So the scripts can works for both biarch and !biarch
>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
> scripts/find.sh | 2 +-
> scripts/test-all-syscalls-parallel.sh | 2 +-
> scripts/test-all-syscalls-sequentially.sh | 2 +-
> tables.c | 10 +++++-----
> 4 files changed, 8 insertions(+), 8 deletions(-)
applied, with some tweaks to fit on top of Ildar's recent output() changes.
thanks,
Dave
^ permalink raw reply [flat|nested] 8+ messages in thread