[PATCH 05/23] test: py: add sudo for virt-make-fs

Raymond Mao raymond.mao at linaro.org
Tue Apr 16 21:00:01 CEST 2024


Fix a permission issue when running virt-make-fs

Signed-off-by: Raymond Mao <raymond.mao at linaro.org>
---
 test/py/tests/test_efi_secboot/conftest.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/py/tests/test_efi_secboot/conftest.py b/test/py/tests/test_efi_secboot/conftest.py
index ff7ac7c810..30357913f0 100644
--- a/test/py/tests/test_efi_secboot/conftest.py
+++ b/test/py/tests/test_efi_secboot/conftest.py
@@ -113,7 +113,7 @@ def efi_boot_env(request, u_boot_config):
                    % (mnt_point, EFITOOLS_PATH),
                    shell=True)
 
-        check_call('virt-make-fs --partition=gpt --size=+1M --type=vfat {} {}'.format(
+        check_call('sudo virt-make-fs --partition=gpt --size=+1M --type=vfat {} {}'.format(
             mnt_point, image_path), shell=True)
         check_call('rm -rf {}'.format(mnt_point), shell=True)
 
@@ -232,7 +232,7 @@ def efi_boot_env_intca(request, u_boot_config):
         check_call('cd %s; cat TestSub.crt TestRoot.crt > TestSubRoot.crt; %ssbsign --key TestCert.key --cert TestCert.crt --addcert TestSubRoot.crt --out helloworld.efi.signed_abc helloworld.efi'
                    % (mnt_point, SBSIGN_PATH), shell=True)
 
-        check_call('virt-make-fs --partition=gpt --size=+1M --type=vfat {} {}'.format(mnt_point, image_path), shell=True)
+        check_call('sudo virt-make-fs --partition=gpt --size=+1M --type=vfat {} {}'.format(mnt_point, image_path), shell=True)
         check_call('rm -rf {}'.format(mnt_point), shell=True)
 
     except CalledProcessError as e:
-- 
2.25.1



More information about the U-Boot mailing list