From 48b52117235928cfd7ef1ec5c3f2cff5d7b03862 Mon Sep 17 00:00:00 2001 From: Jordan Hand Date: Wed, 10 Apr 2019 09:46:32 -0700 Subject: [PATCH,v2] fdt: Fix mkimage list to try every header type Origin: https://patchwork.ozlabs.org/patch/1083495/ Image type is not supplied to `mkimage -l`. For this reason, we cannot use imagetool_verify_print_header_by_type. Instead, this patch uses imagetool_verify_print_header to look through all header types to find one where image validation succeeds. This patch fixes failures in test/image/test-imagetools.sh Signed-off-by: Jordan Hand Tested-by: Alex Kiernan Tested-by: Vagrant Cascadian --- tools/mkimage.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index 2899adff81..76c3406d37 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -403,14 +403,21 @@ int main(int argc, char **argv) exit (EXIT_FAILURE); } - /* - * scan through mkimage registry for all supported image types - * and verify the input image file header for match - * Print the image information for matched image type - * Returns the error code if not matched - */ - retval = imagetool_verify_print_header_by_type(ptr, &sbuf, - tparams, ¶ms); + if (params.fflag) { + /* + * Verifies the header format based on the expected header for + * image type in tparams + */ + retval = imagetool_verify_print_header_by_type(ptr, &sbuf, + tparams, ¶ms); + } else { + /** + * When listing the image, we are not given the image type. Simply check all + * image types to find one that matches our header + */ + retval = imagetool_verify_print_header(ptr, &sbuf, + tparams, ¶ms); + } (void) munmap((void *)ptr, sbuf.st_size); (void) close (ifd); -- 2.20.1 tr>
AgeCommit message (Expand)Author
2023-08-21tests: Adjust 'node-back-edges' test for 'bag' to system-dependent glibc....Fixes a regression introduced in 560cb51e7b37e2c6f6fe4b72a3781185c57fdf83, which would lead this test on x86_64-linux to return a DIFF with two packages, nhc98 and dev86 (both have #:system "i686-linux" and thus depend on a different glibc object; why other system-specific packages such as 'wine' aren't reported is unclear). * tests/graph.scm ("node-transitive-edges + node-back-edges"): Use 'test-equal'. Define 'system-specific?' and use it. Ludovic Courtès
2023-04-07gnu: Purge pre-1.3.0 deprecated packages....* gnu/packages/bioinformatics.scm (deeptools): Remove variable. * gnu/packages/efi.scm (efi_analyzer): Ditto. * gnu/packages/guile.scm (guile-2.2/bug-fix, guile-json): Ditto. * gnu/packages/image.scm (libjpeg): Ditto. * gnu/packages/kde.scm (kdevplatform): Ditto * gnu/packages/linphone.scm (linphoneqt): Ditto. * gnu/packages/maths.scm (blis-sandybridge, blis-haswell, blis-knl): Ditto. * gnu/packages/mpi.scm (hwloc-2.0): Ditto. * gnu/packages/music.scm (python-abjad, zlfo): Ditto. * gnu/packages/perl.scm (perl-base, perl-parent): Ditto. * gnu/packages/tryton.scm (python-trytond): Ditto. * gnu/packages/video.scm (gnome-mpv): Ditto. * tests/graph.scm: Use guile-json-1. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Bruno Victal
2022-10-22Remove now unnecessary uses of (guix grafts)....These modules would use (guix grafts) just to access '%graft?' and related bindings, which are now in (guix store). * gnu/ci.scm, guix/gexp.scm, guix/lint.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/deploy.scm, guix/scripts/environment.scm, guix/scripts/home.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/pull.scm, guix/scripts/size.scm, guix/scripts/system.scm, guix/scripts/weather.scm, tests/builders.scm, tests/channels.scm, tests/cpan.scm, tests/derivations.scm, tests/gexp.scm, tests/graph.scm, tests/guix-daemon.sh, tests/monads.scm, tests/pack.scm, tests/packages.scm, tests/profiles.scm, tests/system.scm: Remove #:use-module (guix grafts). Ludovic Courtès
2022-07-01tests: Adjust 'guix graph' test to latest OCaml changes....* tests/graph.scm ("reverse bag DAG"): Adjust to latest OCaml changes by looking at dune/ocaml-camomile/ocaml-utop. Ludovic Courtès
2022-02-05tests: Assert that cyclic graphs can be produced....* tests/graph.scm ("package DAG, oops it was a cycle"): New test. Liliana Marie Prikler
2021-09-21graph: Add '--max-depth'....* guix/graph.scm (export-graph): Add #:max-depth and honor it, adding 'depths' argument to 'loop'. * guix/scripts/graph.scm (%options, show-help): Add '--max-depth'. (%default-options): Add 'max-depth'. (guix-graph): Pass #:max-depth to 'export-graph'. * tests/graph.scm ("package DAG, limited depth"): New test. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès
2020-10-20graph: Adjust test for recent OCaml changes....This is a followup to 339177956affdc471832750a3805b74356487e93. * tests/graph.scm ("reverse bag DAG"): Look for "ocaml4.07-dune" rather than "dune". Ludovic Courtès