Skip to content
Snippets Groups Projects
  1. Mar 31, 2021
    • Andy Shevchenko's avatar
      test: Don't unmount not (yet) mounted system · 1ba21bb0
      Andy Shevchenko authored and Tom Rini's avatar Tom Rini committed
      
      When test suite tries to create a file for a new filesystem test case and fails,
      the clean up of the exception tries to unmount the image, that has not yet been
      mounted. When it happens, the fuse_mounted global variable is set to False and
      inconveniently the test case tries to use sudo, so without this change the
      admin of the machine gets an (annoying) email:
      
        Subject: *** SECURITY information for example.com ***
      
        example.com : Feb  5 19:43:47 : ... COMMAND=/bin/umount .../build-sandbox/persistent-data/mnt
      
      and second run of the test cases on uncleaned build folder will ask for sudo
      which is not what expected.
      
      Besides that there is a double unmount calls during successfully run test case.
      
      All of these due to over engineered Python try-except clause and people didn't
      get it properly at all. The rule of thumb is that don't use more keywords than
      try-except in the exception handling code. Nevertheless, here we adjust code
      to be less intrusive to the initial logic behind that complex and unclear
      constructions in the test case, although it adds a lot of lines of the code,
      i.e. splits one exception handler to three, so on each step we know what
      cleanup shall perform.
      
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1ba21bb0
  2. Mar 28, 2021
  3. Mar 27, 2021
    • Simon Glass's avatar
      sf: Support querying write-protect · b3b60f59
      Simon Glass authored
      
      This feature was dropped from U-Boot some time ago:
      
         f12f96cf (sf: Drop spl_flash_get_sw_write_prot")
      
      However, we do need a way to see if a flash device is write-protected,
      since if it is, it may not be possible to write to do (i.e. failing to
      write is expected).
      
      I am not sure of the correct layer to implement this, so this patch is a
      stab at it. If spi-flash makes sense then I will add to the 'sf' also.
      
      Re the points mentioned in the removal commit:
      
          1) This kind of requirement can be achieved using existing
             flash operations and flash locking API calls instead of
             making a separate flash API.
      
      Which uclass is this?
      
          2) Technically there is no real hardware user for this API to
             use in the source tree.
      
      I do want coral (at least) to support this.
      
          3) Having a flash operations API for simple register read bits
             also make difficult to extend the flash operations.
      
      This new patch only mentions write-protect being on or off, rather than
      the actual mechanism.
      
          4) Instead of touching generic code, it is possible to have
             this functionality inside spinor operations in the form of
             flash hooks or fixups for associated flash chips.
      
      That sounds to me like what drivers are for. But we still need some sort
      of API for it to be accessible.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      b3b60f59
    • Simon Glass's avatar
      test: Silenece the echo and print tests · b6da5597
      Simon Glass authored
      
      These tests current produce unwanted output on sandbox. Use the correct
      functions to controller console output, to avoid this.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      b6da5597
  4. Mar 26, 2021
  5. Mar 25, 2021
    • Jose Marinho's avatar
      test: test the ESRT creation · de489d82
      Jose Marinho authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      This commit slightly extends test_efi_capsule_fw3.
      
       In order to run the test the following must be added to
       sandbox_defconfig:
        +CONFIG_CMD_SF=y
        +CONFIG_CMD_MEMORY=y
        +CONFIG_CMD_FAT=y
        +CONFIG_DFU=y
      
       The ESRT is printed in the u-boot shell by calling efidebug esrt.
       The test ensures that, after the capsule is installed, the  ESRT
       contains entries with the GUIDs:
        - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID;
        - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID;
      
      test invocation:
       sudo ./test/py/test.py --bd sandbox -k capsule_fw3 -l --build
      
      CC: Heinrich Schuchardt	<xypron.glpk@gmx.de>
      CC: Sughosh Ganu <sughosh.ganu@linaro.org>
      CC: AKASHI Takahiro <takahiro.akashi@linaro.org>
      CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
      CC: Andre Przywara <andre.przywara@arm.com>
      CC: Alexander Graf <agraf@csgraf.de>
      CC: nd@arm.com
      Signed-off-by: default avatarJose Marinho <jose.marinho@arm.com>
      Reviewed-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      de489d82
    • Ilias Apalodimas's avatar
      efidebug: add multiple device path instances on Boot#### · cbea241e
      Ilias Apalodimas authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      The UEFI spec allows a packed array of UEFI device paths in the
      FilePathList[] of an EFI_LOAD_OPTION. The first file path must
      describe the loaded image but the rest are OS specific.
      
      Previous patches parse the device path and try to use the second
      member of the array as an initrd. So let's modify efidebug slightly
      and install the second file described in the command line as the
      initrd device path.
      
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      cbea241e
  6. Mar 22, 2021
  7. Mar 17, 2021
  8. Mar 14, 2021
  9. Mar 13, 2021
    • Simon Glass's avatar
      test: acpi: Fix warnings on 32-bit build · 634f5ad3
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Some format strings use the wrong type. Fix them.
      
      Example warnings:
      
      In file included from test/dm/acpi.c:22:
      test/dm/acpi.c: In function ‘dm_test_acpi_cmd_list’:
      test/dm/acpi.c:362:21: warning: format ‘%lx’ expects argument of type
        ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
        ut_assert_nextline("RSDP %08lx %06lx (v02 U-BOOT)", addr,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             sizeof(struct acpi_rsdp));
             ~~~~~~~~~~~~~~~~~~~~~~~~
      include/test/ut.h:282:33: note: in definition of macro ‘ut_assert_nextline’
        if (ut_check_console_line(uts, fmt, ##args)) {   \
                                       ^~~
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      634f5ad3
  10. Mar 12, 2021
Loading