summary refs log tree commit diff
path: root/tests/nar.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-03-16 15:03:01 +0100
committerLudovic Courtès <ludo@gnu.org>2022-03-16 15:48:52 +0100
commit47960b55268220ca1cb7d2fed41c53873181d816 (patch)
treea0ca790a00c22231eabc008d6cf3f5fa60830c5f /tests/nar.scm
parent5d4af22ef21b71556e0f9a2ddc2d33366858813b (diff)
downloadguix-47960b55268220ca1cb7d2fed41c53873181d816.tar.gz
system: Improve 'read-boot-parameters' incompatibility diagnostic.
Previously, when reading an incompatible "parameters" file, 'guix
system' would print a warning and then crash with a wrong-type-arg
backtrace because code expects 'read-boot-parameters' to always return a
<boot-parameters> record.

* gnu/system.scm (read-boot-parameters): Upon incompatibility, raise an
error instead of returning #f.  Also raise a '&fix-hint' condition.
* tests/boot-parameters.scm ("read, construction, mandatory fields"):
Define 'test-read-boot-parameters' as a macro; expect
'formatted-message?' exceptions rather than #f returns.
Diffstat (limited to 'tests/nar.scm')
0 files changed, 0 insertions, 0 deletions