diff options
author | Dmitry V. Levin <ldv@strace.io> | 2022-01-15 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2022-01-15 08:00:00 +0000 |
commit | 3ae1903c338d233a8465498e126e7b467f2ec716 (patch) | |
tree | 4c62d15632bf77d6ee5107b97b54d54d140460da /tests/qualify_personality.sh | |
parent | 29571af829595c837526f7e9de0c310e708ecf66 (diff) | |
download | strace-3ae1903c338d233a8465498e126e7b467f2ec716.tar.gz |
tests: move current personality designator detection code to init.sh
This functionality is going to be used in different tests.
* tests/init.sh (print_current_personality_designator): New function.
* tests/qualify_personality.sh: Use it.
Diffstat (limited to 'tests/qualify_personality.sh')
-rw-r--r-- | tests/qualify_personality.sh | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/tests/qualify_personality.sh b/tests/qualify_personality.sh index e2677f58d..fe3bd88e8 100644 --- a/tests/qualify_personality.sh +++ b/tests/qualify_personality.sh @@ -33,29 +33,7 @@ aarch64|powerpc64|s390x|sparc64|tile) ;; esac -# Detect current personality designation -if [ "x$STRACE_NATIVE_ARCH" = "x$STRACE_ARCH" ]; then - case "$STRACE_NATIVE_ARCH" in - x32) - cur_pers=x32 - ;; - *) - cur_pers="$(($SIZEOF_LONG * 8))" - ;; - esac -else - if [ "x$SIZEOF_KERNEL_LONG_T" = "x$SIZEOF_LONG" ]; then - [ 4 -eq "$SIZEOF_LONG" ] || - fail_ "sizeof(long) = $SIZEOF_LONG != 4" - cur_pers=32 - else - [ 8 -eq "$SIZEOF_KERNEL_LONG_T" ] || - fail_ "sizeof(kernel_long_t) = $SIZEOF_KERNEL_LONG_T != 8" - [ 4 -eq "$SIZEOF_LONG" ] || - fail_ "sizeof(long) = $SIZEOF_LONG != 4" - cur_pers=x32 - fi -fi +cur_pers=$(print_current_personality_designator) pers_found=0 set -- $supported_pers |