|
| 1 | +grubenv_tests = { |
| 2 | + 'test.dmpstore.export' : ['testing export to DMPSTORE format', |
| 3 | + '@0@ -n {grub}-GRUB_ENV -f test.dmpstore.export.result.env -D -e test.dmpstore.export.result.var'], |
| 4 | + 'test.efivar.export' : ['testing export to libefivar format', |
| 5 | + '@0@ -n {grub}-GRUB_ENV -f test.efivar.export.result.env -e test.efivar.export.result.var'], |
| 6 | + 'test.grubenv.var.0' : ['test importing from DMPSTORE and exporting to DMPSTORE and symbolic guid-name validation', |
| 7 | + ''' |
| 8 | + @0@ -n {grub}-GRUB_ENV -f test.grubenv.var.0.result.env -D -e test.grubenv.var.0.export.var |
| 9 | + @0@ -i test.grubenv.var.0.export.var -e test.grubenv.var.0.result.var -D |
| 10 | + '''], |
| 11 | + 'test.grubenv.var.1' : ['test importing from DMPSTORE and exporting to libefivar', |
| 12 | + ''' |
| 13 | + @0@ -n {grub}-GRUB_ENV -f test.grubenv.var.1.result.env -D -e test.grubenv.var.1.export.var |
| 14 | + @0@ -i test.grubenv.var.1.export.var -e test.grubenv.var.1.result.var |
| 15 | + '''], |
| 16 | + 'test.grubenv.var.2' : ['test importing from libefivar and exporting to DMPSTORE and mixed-case guid-name validation', |
| 17 | + ''' |
| 18 | + @0@ -n 91376aff-cBa6-42bE-949d-06fde81128e8-GRUB_ENV -f test.grubenv.var.2.result.env -e test.grubenv.var.2.export.var |
| 19 | + @0@ -i test.grubenv.var.2.export.var -e test.grubenv.var.2.result.var -D |
| 20 | + '''], |
| 21 | + 'test.grubenv.var.3' : ['test importing from libefivar and exporting to libefivar and guid-name validation', |
| 22 | + ''' |
| 23 | + @0@ -n 91376aff-cba6-42be-949d-06fde81128e8-GRUB_ENV -f test.grubenv.var.3.result.env -e test.grubenv.var.3.export.var |
| 24 | + @0@ -i test.grubenv.var.3.export.var -e test.grubenv.var.3.result.var |
| 25 | + '''], |
| 26 | +} |
| 27 | + |
| 28 | +# TODO test grub return disabler |
| 29 | +grub_wrapper = find_program('sh/_grubenv-test.sh') |
| 30 | +foreach grubtest, testinfo : grubenv_tests |
| 31 | + test(testinfo[0], grub_wrapper, args: ['grub-editenv', meson.current_source_dir(), grubtest, testinfo[1].format(efivar)]) |
| 32 | +endforeach |
| 33 | + |
| 34 | + |
| 35 | +efivar_tests = { |
| 36 | + 'test.efivar.l' : 'testing efivar -L', |
| 37 | + 'test.bootorder.var' : 'testing with BootOrder variable dmpstore generated', |
| 38 | + 'test.conin.var' : 'testing with ConIn variable dmpstore generated', |
| 39 | +} |
| 40 | + |
| 41 | +foreach efivartest, testname : efivar_tests |
| 42 | + testprog = find_program('sh/' + efivartest + '.sh') |
| 43 | + test(testname, testprog, args: [efivar, meson.current_source_dir()]) |
| 44 | +endforeach |
| 45 | + |
| 46 | +efisecdb_tests = { |
| 47 | + 'test.esl.dump.x509.sha256' : 'testing ESL dumping with x509 + sha256 sums', |
| 48 | + 'test.parse.db' : 'testing parsing db variable', |
| 49 | + 'test.esl.annotation' : 'testing ESL annotation with x509 + sha256 sums', |
| 50 | + 'test.esl.sha256.unsorted' : 'testing ESL creation with sha256 sums (unsorted)', |
| 51 | + 'test.esl.sha256.ascending' : 'testing ESL creation with sha256 sums (ascending)', |
| 52 | + 'test.esl.sha256.removal.descending' : 'testing ESL entry removal with sha256 sums (descending)', |
| 53 | + 'test.esl.sha256.addition.unsorted' : 'testing adding a sha256 sum to an existing ESL (unsorted)', |
| 54 | + 'test.esl.cert.addition' : 'testing ESL entry addition with x509 cert', |
| 55 | + 'test.esl.cert.removal' : 'testing ESL entry removal with x509 cert' |
| 56 | +} |
| 57 | + |
| 58 | +foreach efisectest, testname : efisecdb_tests = { |
| 59 | + |
| 60 | +} |
| 61 | + |
| 62 | +# Threading |
| 63 | +# tester.c |
0 commit comments