Files

35 lines
1.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Functional test: openssl - 错误处理
# Beakerlib-based test with lifecycle management
# Shared suite setup/cleanup via ../lib.sh (install once, uninstall once)
. /usr/share/beakerlib/beakerlib.sh || exit 1
. "$(dirname "$0")/../lib.sh"
rlJournalStart
rlPhaseStartSetup "环境准备"
opensslSetup
TmpDir=$(mktemp -d)
rlRun "cd $TmpDir" 0 "进入临时测试目录"
rlPhaseEnd
rlPhaseStartTest "错误处理"
rlRun "openssl version" 0 "汾"
rlRun "openssl help 2>&1 | head -20" 0 ""
rlRun "openssl list -standard-commands 2>&1 | head -10" 0 "г׼"
rlRun "openssl list -cipher-commands 2>&1 | head -10" 0 "г错误处理"
rlRun "openssl list -digest-commands 2>&1 | head -10" 0 "гժҪ"
rlPhaseEnd
rlPhaseStartCleanup "清理测试环境"
rlRun "cd /" 0 "离开测试目录"
if [ -n "$TmpDir" ] && [ -d "$TmpDir" ]; then
rlRun "rm -rf $TmpDir" 0 "清理临时测试目录"
fi
# openssl 软件包由 lib.sh 的引用计数机制自动管理卸载
rlPhaseEnd
rlJournalPrintText
rlJournalEnd