asn1_test: Test module for libtasn1

Import tests from libtasn1 that use functionality we import.
This test module is integrated into functional_test so that the
user can run the test in GRUB shell.

This doesn't test the full decoder but that will be exercised in
test suites for coming patch sets.

Add testcase target in accordance with commit 5e10be48e5 (tests: Add
check-native and check-nonnative make targets).

Cc: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Daniel Axtens authored and Daniel Kiper committed 2024-11-28 21:50:54 +01:00
1 parent 504058e82a
commit 99cda67889
7 files changed
+143 -1

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
#! @BUILD_SHEBANG@
set -e
. "@builddir@/grub-core/modinfo.sh"
out=`echo functional_test asn1_test | @builddir@/grub-shell`
if [ "$(echo "$out" | tail -n 1)" != "ALL TESTS PASSED" ]; then
echo "ASN.1 test failure: $out"
exit 1
fi