|
@@ -1,39 +1,6 @@
|
|
# We use jq for comparing the pin config in the clevis luks list tests.
|
|
# We use jq for comparing the pin config in the clevis luks list tests.
|
|
jq = find_program('jq', required: false)
|
|
jq = find_program('jq', required: false)
|
|
|
|
|
|
-# We use systemd-socket-activate for running test tang servers.
|
|
|
|
-actv = find_program(
|
|
|
|
- 'systemd-socket-activate',
|
|
|
|
- 'systemd-activate',
|
|
|
|
- join_paths('/', 'usr', 'lib', 'systemd', 'systemd-activate'),
|
|
|
|
- required: false
|
|
|
|
-)
|
|
|
|
-
|
|
|
|
-kgen = find_program(
|
|
|
|
- join_paths(libexecdir, 'tangd-keygen'),
|
|
|
|
- join_paths(get_option('prefix'), get_option('libdir'), 'tangd-keygen'),
|
|
|
|
- join_paths(get_option('prefix'), get_option('libexecdir'), 'tangd-keygen'),
|
|
|
|
- join_paths('/', 'usr', get_option('libdir'), 'tangd-keygen'),
|
|
|
|
- join_paths('/', 'usr', get_option('libexecdir'), 'tangd-keygen'),
|
|
|
|
- required: false
|
|
|
|
-)
|
|
|
|
-updt = find_program(
|
|
|
|
- join_paths(libexecdir, 'tangd-update'),
|
|
|
|
- join_paths(get_option('prefix'), get_option('libdir'), 'tangd-update'),
|
|
|
|
- join_paths(get_option('prefix'), get_option('libexecdir'), 'tangd-update'),
|
|
|
|
- join_paths('/', 'usr', get_option('libdir'), 'tangd-update'),
|
|
|
|
- join_paths('/', 'usr', get_option('libexecdir'), 'tangd-update'),
|
|
|
|
- required: false
|
|
|
|
-)
|
|
|
|
-tang = find_program(
|
|
|
|
- join_paths(libexecdir, 'tangd'),
|
|
|
|
- join_paths(get_option('prefix'), get_option('libdir'), 'tangd'),
|
|
|
|
- join_paths(get_option('prefix'), get_option('libexecdir'), 'tangd'),
|
|
|
|
- join_paths('/', 'usr', get_option('libdir'), 'tangd'),
|
|
|
|
- join_paths('/', 'usr', get_option('libexecdir'), 'tangd'),
|
|
|
|
- required: false
|
|
|
|
-)
|
|
|
|
-
|
|
|
|
common_functions = configure_file(input: 'tests-common-functions.in',
|
|
common_functions = configure_file(input: 'tests-common-functions.in',
|
|
output: 'tests-common-functions',
|
|
output: 'tests-common-functions',
|
|
configuration: luksmeta_data,
|
|
configuration: luksmeta_data,
|
|
@@ -53,19 +20,11 @@ env.prepend('PATH',
|
|
join_paths(meson.build_root(), 'src', 'luks'),
|
|
join_paths(meson.build_root(), 'src', 'luks'),
|
|
join_paths(meson.build_root(), 'src', 'pins', 'sss'),
|
|
join_paths(meson.build_root(), 'src', 'pins', 'sss'),
|
|
join_paths(meson.build_root(), 'src', 'pins', 'tang'),
|
|
join_paths(meson.build_root(), 'src', 'pins', 'tang'),
|
|
|
|
+ join_paths(meson.build_root(), 'src', 'pins', 'tang', 'tests'),
|
|
join_paths(meson.build_root(), 'src', 'pins', 'tpm2'),
|
|
join_paths(meson.build_root(), 'src', 'pins', 'tpm2'),
|
|
separator: ':'
|
|
separator: ':'
|
|
)
|
|
)
|
|
|
|
|
|
-has_tang = false
|
|
|
|
-if actv.found() and kgen.found() and updt.found() and tang.found()
|
|
|
|
- has_tang = true
|
|
|
|
- env.set('SD_ACTIVATE', actv.path())
|
|
|
|
- env.set('TANGD_KEYGEN', kgen.path())
|
|
|
|
- env.set('TANGD_UPDATE', updt.path())
|
|
|
|
- env.set('TANGD', tang.path())
|
|
|
|
-endif
|
|
|
|
-
|
|
|
|
test('bind-wrong-pass-luks1', find_program('bind-wrong-pass-luks1'), env: env)
|
|
test('bind-wrong-pass-luks1', find_program('bind-wrong-pass-luks1'), env: env)
|
|
test('bind-luks1', find_program('bind-luks1'), env: env)
|
|
test('bind-luks1', find_program('bind-luks1'), env: env)
|
|
test('unbind-unbound-slot-luks1', find_program('unbind-unbound-slot-luks1'), env: env)
|
|
test('unbind-unbound-slot-luks1', find_program('unbind-unbound-slot-luks1'), env: env)
|
|
@@ -73,6 +32,7 @@ test('unbind-luks1', find_program('unbind-luks1'), env: env)
|
|
test('bind-key-file-non-interactive', find_program('bind-key-file-non-interactive-luks1'), env: env)
|
|
test('bind-key-file-non-interactive', find_program('bind-key-file-non-interactive-luks1'), env: env)
|
|
test('bind-pass-with-newline', find_program('bind-pass-with-newline-luks1'), env: env)
|
|
test('bind-pass-with-newline', find_program('bind-pass-with-newline-luks1'), env: env)
|
|
test('bind-pass-with-newline-keyfile', find_program('bind-pass-with-newline-keyfile-luks1'), env: env)
|
|
test('bind-pass-with-newline-keyfile', find_program('bind-pass-with-newline-keyfile-luks1'), env: env)
|
|
|
|
+test('bind-binary-keyfile', find_program('bind-binary-keyfile-luks1'), env: env)
|
|
# Bug #70.
|
|
# Bug #70.
|
|
test('bind-already-used-luksmeta-slot', find_program('bind-already-used-luksmeta-slot'), env: env, timeout: 60)
|
|
test('bind-already-used-luksmeta-slot', find_program('bind-already-used-luksmeta-slot'), env: env, timeout: 60)
|
|
test('bad-sss', find_program('bad-sss'), env: env)
|
|
test('bad-sss', find_program('bad-sss'), env: env)
|
|
@@ -85,17 +45,16 @@ else
|
|
warning('Will not run "clevis luks list" tests due to missing jq dependency')
|
|
warning('Will not run "clevis luks list" tests due to missing jq dependency')
|
|
endif
|
|
endif
|
|
|
|
|
|
-if has_tang
|
|
|
|
- test('unlock-tang-luks1', find_program('unlock-tang-luks1'), env: env, timeout: 90)
|
|
|
|
- test('assume-yes', find_program('assume-yes'), env: env, timeout: 60)
|
|
|
|
- test('regen-inplace-luks1', find_program('regen-inplace-luks1'), env: env, timeout: 90)
|
|
|
|
- test('regen-not-inplace-luks1', find_program('regen-not-inplace-luks1'), env: env, timeout: 90)
|
|
|
|
- test('report-tang-luks1', find_program('report-tang-luks1'), env: env, timeout: 90)
|
|
|
|
- test('report-sss-luks1', find_program('report-sss-luks1'), env: env, timeout: 90)
|
|
|
|
- test('edit-tang-luks1', find_program('edit-tang-luks1'), env: env, timeout: 150)
|
|
|
|
-endif
|
|
|
|
|
|
+test('unlock-tang-luks1', find_program('unlock-tang-luks1'), env: env, timeout: 90)
|
|
|
|
+test('assume-yes', find_program('assume-yes'), env: env, timeout: 60)
|
|
|
|
+test('regen-inplace-luks1', find_program('regen-inplace-luks1'), env: env, timeout: 90)
|
|
|
|
+test('regen-not-inplace-luks1', find_program('regen-not-inplace-luks1'), env: env, timeout: 90)
|
|
|
|
+test('report-tang-luks1', find_program('report-tang-luks1'), env: env, timeout: 90)
|
|
|
|
+test('report-sss-luks1', find_program('report-sss-luks1'), env: env, timeout: 90)
|
|
|
|
+test('edit-tang-luks1', find_program('edit-tang-luks1'), env: env, timeout: 150)
|
|
|
|
|
|
test('backup-restore-luks1', find_program('backup-restore-luks1'), env: env, timeout: 60)
|
|
test('backup-restore-luks1', find_program('backup-restore-luks1'), env: env, timeout: 60)
|
|
|
|
+test('pass-tang-luks1', find_program('pass-tang-luks1'), env: env, timeout: 60)
|
|
|
|
|
|
# LUKS2 tests go here, and they get included if we get support for it, based
|
|
# LUKS2 tests go here, and they get included if we get support for it, based
|
|
# on the cryptsetup version.
|
|
# on the cryptsetup version.
|
|
@@ -112,15 +71,14 @@ if luksmeta_data.get('OLD_CRYPTSETUP') == '0'
|
|
test('list-sss-tang-luks2', find_program('list-sss-tang-luks2'), env: env, timeout: 60)
|
|
test('list-sss-tang-luks2', find_program('list-sss-tang-luks2'), env: env, timeout: 60)
|
|
endif
|
|
endif
|
|
|
|
|
|
- if has_tang
|
|
|
|
- test('unlock-tang-luks2', find_program('unlock-tang-luks2'), env: env, timeout: 120)
|
|
|
|
- test('assume-yes-luks2', find_program('assume-yes-luks2'), env: env, timeout: 90)
|
|
|
|
- test('regen-inplace-luks2', find_program('regen-inplace-luks2'), env: env, timeout: 120)
|
|
|
|
- test('regen-not-inplace-luks2', find_program('regen-not-inplace-luks2'), env: env, timeout: 120)
|
|
|
|
- test('report-tang-luks2', find_program('report-tang-luks2'), env: env, timeout: 120)
|
|
|
|
- test('report-sss-luks2', find_program('report-sss-luks2'), env: env, timeout: 120)
|
|
|
|
- test('edit-tang-luks2', find_program('edit-tang-luks2'), env: env, timeout: 210)
|
|
|
|
- endif
|
|
|
|
|
|
+ test('unlock-tang-luks2', find_program('unlock-tang-luks2'), env: env, timeout: 120)
|
|
|
|
+ test('assume-yes-luks2', find_program('assume-yes-luks2'), env: env, timeout: 90)
|
|
|
|
+ test('regen-inplace-luks2', find_program('regen-inplace-luks2'), env: env, timeout: 120)
|
|
|
|
+ test('regen-not-inplace-luks2', find_program('regen-not-inplace-luks2'), env: env, timeout: 120)
|
|
|
|
+ test('report-tang-luks2', find_program('report-tang-luks2'), env: env, timeout: 120)
|
|
|
|
+ test('report-sss-luks2', find_program('report-sss-luks2'), env: env, timeout: 120)
|
|
|
|
+ test('edit-tang-luks2', find_program('edit-tang-luks2'), env: env, timeout: 210)
|
|
|
|
|
|
-test('backup-restore-luks2', find_program('backup-restore-luks2'), env: env, timeout: 120)
|
|
|
|
|
|
+ test('backup-restore-luks2', find_program('backup-restore-luks2'), env: env, timeout: 120)
|
|
|
|
+ test('pass-tang-luks2', find_program('pass-tang-luks2'), env: env, timeout: 60)
|
|
endif
|
|
endif
|