Skip to content

Instantly share code, notes, and snippets.

@nickva
Last active November 8, 2021 22:34
Show Gist options
  • Save nickva/da29c24653cc4ecdbff64b1f1197a89a to your computer and use it in GitHub Desktop.
Save nickva/da29c24653cc4ecdbff64b1f1197a89a to your computer and use it in GitHub Desktop.
Validate Erlang Install By Running Custom Tests Suites

Based on https://www.erlang.org/doc/installation_guide/install

Erlang Version:

commit eef2e7066ecdf9de5dc7fd81dc5043d9a9757efa (HEAD -> maint-24, tag: OTP-24.1.4, origin/maint-24)
Author: Erlang/OTP <[email protected]>
Date:   Mon Nov 1 15:26:06 2021 +0100

SSL Versions:

openssl 1.1.1f-1ubuntu2.5 ppc64el

From Erlang's point of view:

ssl:versions().[{ssl_app,"10.5.2"}, {supported,['tlsv1.3','tlsv1.2']},
 {supported_dtls,['dtlsv1.2']},
 {available,['tlsv1.3','tlsv1.2','tlsv1.1',tlsv1]},
 {available_dtls,['dtlsv1.2',dtlsv1]},
 {implemented,['tlsv1.3','tlsv1.2','tlsv1.1',tlsv1]},
 {implemented_dtls,['dtlsv1.2',dtlsv1]}]

OS: Ubuntu 20.04.3

Arch: PPC64LE

From /proc/cpuinfo

cpu		: POWER9 (architected), altivec supported
clock		: 2500.000000MHz
revision	: 2.2 (pvr 004e 0202)

Install packages. May need others, didn't start with a clean OS image, already had some package installed.

apt-get install build-essential libtool autoconf gcc make sed openssl-dev libssh-dev libncurses-dev
git clone https://github.com/erlang/otp.git
cd otp
git checkout -b maint-24
export ERL_TOP=$(pwd)
./configure --without-wx --without-javac --without-odbc --without-debugger --without-observer --without-et --without-megaco --without-dialyzer
make -j16
cd otp
export ERL_TOP=`pwd`
make release_tests
cd release/tests/test_server

Start Erlang shell

$ERL_TOP/bin/erl

Run these in the Erlang shell

ts:install().

% Basic smoke tests
%  - There should one expected failure:
%      test_server:ts_tc failed on line 1783
%      Reason: {test_case_failed,{527,undefined_functions_in_otp}}
ts:smoke_test([batch]).

% Thread primitive tests
ts:run(system, ethread_SUITE, [batch]).

% Crypto and TLS tests
ts:run(crypto, crypto_SUITE, [batch]).
ts:run(ssl, ssl_basic_SUITE, [batch]).
ts:run(ssl, ssl_handshake_SUITE, [batch]).
ts:run(ssl, ssl_dist_SUITE, [batch]).
ts:run(ssl, tls_1_3_record_SUITE, [batch]).
ts:run(ssl, tls_1_3_version_SUITE, [batch]).
ts:run(ssl, openssl_tls_1_3_version_SUITE, [batch]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment