You may run crash in batchmode and grep for the expected string and do compare and fail if
not as expected.
For example
# echo 'p linux_banner' | crash -s vmlinux vmcore | grep 'Linux version'
# echo net | crash -s vmlinux vmcore
# echo bt | crash -s vmlinux vmcore | grep "PID:.*TASK:.*CPU:.*COMMAND:.*bash"