From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mx.groups.io with SMTP id smtpd.web10.3257.1685560443111842693 for ; Wed, 31 May 2023 12:14:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=Pt/0yq2r; spf=pass (domain: gmail.com, ip: 209.85.210.181, mailfrom: kuqin12@gmail.com) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-64d24136663so107842b3a.0 for ; Wed, 31 May 2023 12:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685560442; x=1688152442; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JgdsD0Kziuz3I4VoEbVuFyOxkJFvBy5R1in8f5Oeq/k=; b=Pt/0yq2rgkplyOnlSxUu14j6OItgFPddDXLKszFQgMLVc/cxDhTD4IUwFU0JMnuY4d Js1A+jR1UAtG0BNgmvuyRnW+qrZzeBfrKVLTOHuK042TGlSYRn1Yv0I30/r9wjPjl0K7 AVaWn4VinNfh203SRUy+00LxFcAi8I7jybVT7EIq7AZyrx2Y5G+CIOzCfn3iE3qLqydM v7ufXIcGeCSz+Cq8frQCwdOrcKaRHXoP2t69+DcI/ODpq5O1qY+StiELvRpBXHAIp+jB 3oaLRnp06roWGG0eF5ZsU/zTIdpx6o1BCziOS5LvrxiSY6gD63mE+faJQyjRCEXDoeGt m3mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685560442; x=1688152442; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JgdsD0Kziuz3I4VoEbVuFyOxkJFvBy5R1in8f5Oeq/k=; b=cf8MR/eIBuO4B5JN39FCgRzTVg7Uc8tKPq0FjlKcactDOH7g3BOEeYtCgJuAe8YOio HgCDDUHVZLCQlz94U2q3bjL/bBoqvMlE3ZHpxjU5DN1eLwu84+4ngQ4odaqpZunnH5nA g4spS4sy+8uSgw0tQAo5BueCp8Y0HVXwg003qSnZ39CtjXC2hCw4mwazElY0MPFyK9Wa c/oUPBnD5dR95abZIO5yipnuzcQgl7JWZC+xV5jBuhPrLWXS4DSAi4UjlkXVhNz2WHZT x8A3OyzBn0DY+ymSy0x3idlhz/xgsILmwKcnd4SMI0tlnUmnur+sX942ZGOs/SUM39Ne emTw== X-Gm-Message-State: AC+VfDxiNloFrK16076HEnMgGeSWsrt7a4SlbNcdPbS+0pns2M/UYEHq /giq4hKf4kWzdGLQjiuNyGaEYgKS6as= X-Google-Smtp-Source: ACHHUZ5B3lp1LcQEXqBl6Ocwy3Q4+O81XL7bcgmKdHWzvZNt5OE2Ay8IlLAQc2rkCv23igIkiQLPYg== X-Received: by 2002:a05:6a00:1a91:b0:64d:61f2:ca88 with SMTP id e17-20020a056a001a9100b0064d61f2ca88mr5755868pfv.12.1685560442054; Wed, 31 May 2023 12:14:02 -0700 (PDT) Return-Path: Received: from MININT-0U7P5GU.redmond.corp.microsoft.com ([2001:4898:80e8:2:2436:c26b:8629:f4ff]) by smtp.gmail.com with ESMTPSA id d2-20020aa78682000000b005d72e54a7e1sm3621371pfo.215.2023.05.31.12.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 12:14:01 -0700 (PDT) From: "Kun Qin" To: devel@edk2.groups.io Cc: Michael D Kinney , Michael Kubacki , Sean Brogan Subject: [PATCH v1 0/1] Add support for running shell test application in an immutable volume Date: Wed, 31 May 2023 12:13:57 -0700 Message-Id: <20230531191358.587-1-kuqin12@gmail.com> X-Mailer: git-send-email 2.40.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4467 Current implementation of UnitTestFrameworkPkg for shell-based unit test will save the unit test cache to the same file system as the test application itself. This works as long as the test application is on a writable volume, such as USB or EFI partition. However, sometimes the test application would live inside the firmware volume because it was integrated into the UEFI image and published through drivers such as "FvSimpleFileSystem". In this case, attempting to write cache file to the file system will fail and thus unable to run the tests. The included change will write the test cache to the path where this unit test is invoked. i.e. test is on FS0, which is a FV file system, but FS1 is a usb file system. The traditional flow of running this test in shell will be "fs0:", "test.efi", which will fail to write to "fs0:". The updated flow is to navigate shell to "fs1:", then execute the test with "fs0:test.efi". This way the cache file will be saved to "fs1:" properly. This change will have no impact on existing users who already run shell based tests from writeable file systesms, such as USB, FAT on NVMe. Patch v1 branch: https://github.com/kuqin12/edk2/tree/unit_test_fv_v1. Cc: Michael D Kinney Cc: Michael Kubacki Cc: Sean Brogan kuqin12 (1): UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache to Drive UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c | 81 +++++++++++--------- 1 file changed, 43 insertions(+), 38 deletions(-) -- 2.40.1.windows.1