diff options
Diffstat (limited to 'tests/slow')
-rw-r--r-- | tests/slow/test-ciphers-common.sh | 4 | ||||
-rwxr-xr-x | tests/slow/test-hash-large.sh | 18 |
2 files changed, 9 insertions, 13 deletions
diff --git a/tests/slow/test-ciphers-common.sh b/tests/slow/test-ciphers-common.sh index b1a238671a..e8b38c84ed 100644 --- a/tests/slow/test-ciphers-common.sh +++ b/tests/slow/test-ciphers-common.sh @@ -74,8 +74,8 @@ if test $ret != 0; then fi #SHANI -$(which lscpu)|grep Flags|grep sha_ni >/dev/null -if test $? = 0;then +if (lscpu --version) >/dev/null 2>&1 && \ + lscpu 2>/dev/null | grep 'Flags:[ ]*sha_ni' >/dev/null; then GNUTLS_CPUID_OVERRIDE=0x20 ${PROG} ret=$? if test $ret != 0; then diff --git a/tests/slow/test-hash-large.sh b/tests/slow/test-hash-large.sh index 359a15ff72..7a052bddcd 100755 --- a/tests/slow/test-hash-large.sh +++ b/tests/slow/test-hash-large.sh @@ -44,23 +44,19 @@ run_test() { #0x1: no optimizations #"": default optimizations -SSSE3FLAG="" -SHANIFLAG="" -which lscpu >/dev/null 2>&1 -if test $? = 0;then - $(which lscpu)|grep Architecture|grep x86 >/dev/null - if test $? = 0;then - SSSE3FLAG="0x4" +FLAGS="" +if (lscpu --version) >/dev/null 2>&1; then + if lscpu 2>/dev/null | grep 'Flags:[ ]*ssse3' >/dev/null; then + FLAGS="$FLAGS 0x4" fi - $(which lscpu)|grep Flags|grep sha_ni >/dev/null - if test $? = 0;then - SHANIFLAG="0x20" + if lscpu 2>/dev/null | grep 'Flags:[ ]*sha_ni' >/dev/null; then + FLAGS="$FLAGS 0x20" fi fi WAITPID="" -for flags in "" "0x1" ${SSSE3FLAG} ${SHANIFLAG};do +for flags in "" "0x1" ${FLAGS};do run_test ${flags} & WAITPID="${WAITPID} $!" done |