mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-12-01 08:04:28 +08:00
05a92e6424
Add test vectors, a subset without keys as found in linux kernel sources in crypto/test-mgr.h for all supported hash algorithms. Signed-off-by: David Sterba <dsterba@suse.com>
42 lines
731 B
Bash
Executable File
42 lines
731 B
Bash
Executable File
#!/bin/sh
|
|
# Test all supported hash algorithms on all backends on the sample test vectors
|
|
# This requires all crypto backends available for full coverage.
|
|
|
|
make=make
|
|
opts="-j16 $@"
|
|
verdict=
|
|
|
|
die() {
|
|
echo "ERROR: $@"
|
|
exit 1
|
|
}
|
|
|
|
buildme() {
|
|
make clean-all
|
|
|
|
echo "BUILD WITH: $1"
|
|
./autogen.sh && configure \
|
|
--disable-documentation --disable-convert --disable-python \
|
|
--with-crypto="$1" || die "configure not working with: $@"
|
|
$make clean
|
|
$make $opts hash-vectest
|
|
if ./hash-vectest; then
|
|
verdict="$verdict
|
|
$1: OK"
|
|
fi
|
|
}
|
|
|
|
# main()
|
|
if ! [ -f configure.ac ]; then
|
|
echo "Please run me from the top directory"
|
|
exit 1
|
|
fi
|
|
|
|
buildme builtin
|
|
buildme libgcrypt
|
|
buildme libsodium
|
|
buildme libkcapi
|
|
|
|
echo "VERDICT:"
|
|
echo "$verdict"
|