| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
tests: fix argument order in bare-rootfs.sh and add wc to busybox-bin - Fix 'env create' command argument order: --root must come before -c to match correct CLI syntax (epkg env create --root <PATH> -c <CHANNEL>) - Add logic to find auto-generated env name when using --root / - Add wc to vm.sh busybox-bin symlinks for install-remove-upgrade.sh test - Note: bare-rootfs.sh still fails due to chroot CLI parsing issue that needs separate investigation Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests: reorganize e2e test architecture and rename to in-vm Problem: The tests/e2e/ directory had grown with inconsistent organization: - tests/e2e/cases/bash-sh.sh had an OS loop that could be split - tests/e2e/cases/sandbox-run.sh and epkg-wrapper.sh were standalone tests that did not need the full VM harness - CLI patterns were inconsistent across test scripts - Directory name "e2e" was ambiguous about the testing mechanism Purpose: Improve test architecture clarity by: 1. Renaming "e2e" to "in-vm" to clearly indicate VM-based isolation 2. Moving standalone tests to appropriate dedicated directories 3. Splitting monolithic OS-loop tests into focused scenario tests 4. Standardizing CLI patterns with consistent help messages and debug flags Solution: - Rename tests/e2e/ -> tests/in-vm/ - Update all internal path references (host-vars.sh, lib.sh, vm.sh) - Update documentation references in README files - Move sandbox-run.sh -> tests/sandbox/test-isolation-modes.sh - Use common.sh for parse_debug_flags, set_epkg_bin, set_color_names - Add standardized --help output - Move epkg-wrapper.sh -> tests/misc/test-shell-wrapper.sh - Add CLI argument parsing with --help support - Use common.sh shared functions - Split bash-sh.sh OS loop into tests/dev-projects/scenes/ - test-bash.sh -> scenes/bash.sh - test-curl-https.sh -> scenes/curl-https.sh - test-epkg-nested.sh -> scenes/epkg-nested.sh - test-package-queries.sh -> scenes/package-queries.sh - test-search-paths.sh -> scenes/search-paths.sh - Remove redundant "test-" prefix in scenes/ directory - Standardize CLI across all test scripts - Consistent -d/-dd/-ddd debug flags - Consistent --help output using parse_debug_flags from common.sh - Clear usage messages with examples - Update documentation - tests/README.md: new structure diagram and updated paths - tests/in-vm/README.md: renamed from e2e/README.md with all references updated Rationale: The "in-vm" name is more descriptive than "e2e" because it explicitly indicates the isolation mechanism (microVM via epkg run --isolate=vm) rather than just the testing scope. This helps distinguish from other tests that also test "end-to-end" behavior but do not require VM isolation (like those in tests/sandbox/ and tests/dev-projects/). The new structure separates concerns: - in-vm/: tests that require full VM isolation (may pollute host if run outside VM) - sandbox/: tests for sandbox/isolation features themselves - dev-projects/scenes/: focused test scenarios for specific behaviors - dev-projects/langs/: language toolchain tests - misc/: standalone utility tests Usage: Run in-VM tests: cd tests/in-vm ./test-all.sh ./test-one.sh cases/env-register-activate.sh Run scenario tests (host-safe): cd tests/dev-projects/scenes E2E_OS=debian ./bash.sh Run sandbox tests: cd tests/sandbox E2E_OS=debian ./test-isolation-modes.sh Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
tests: hide expected error output in Test 5 The Test 5 verifies -e flag overrides --root flag precedence. When running epkg -e explicit-name --root env3_path run jq --version, jq should NOT be found because explicit-name env doesn't have jq installed. This expected error was confusing users. Add explanatory log message and suppress stderr with 2>/dev/null to avoid confusion. Before: ERROR: epkg command failed with exit code 1 [2026-05-04 10:13:18] All tests passed! After: [2026-05-04 10:36:04] Verifying -e overrides --root (jq should NOT be found) [2026-05-04 10:36:04] All tests passed! Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests: fix env-register-activate test for idempotent execution Fix two issues causing confusing error output: 1. Remove stale test environments before creation - test-install-env, test-pure-env, test-stack1-env, test-stack2-env - These could remain from previous test runs, causing creation failures 2. Fix 'main' environment public/private test - Old test tried epkg env create main --public expecting --public rejection - But actually failed because main already exists - Then used env config get public which doesn't support -e flag - New test directly reads main's env.yaml to verify private status Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests: fix export-import.sh to check correct package on Linux Problem: - On Linux, TEST_PKGS="jq htop" is installed - But test verified 'tree --version' which wasn't installed - 'tree' is only used on macOS (TEST_PKGS="jq tree" on Darwin) Solution: - Check for correct second package based on platform: - macOS: tree - Linux: htop Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
store: fix restore failure with stale consumed stores Problem: When restoring to a previous generation, packages that were removed after the target generation would fail to reinstall because their store was marked as "consumed" by LinkType::Move, but the files were no longer in the environment. Root Cause: 1. During restore, target_packages is loaded from the generation's installed-packages.json, which already contains pkgline 2. The pkgline pointed to a store with consumed.json marker 3. The consumed.json pointed to the same environment being restored 4. But files were deleted from the environment when package was removed 5. link_package_generic() detected stale consumed.json and failed Solution: 1. In collect_store_pkglines(): detect and skip stale consumed stores (consumed by target env but files don't exist) 2. In try_match_and_fill_pkgline(): validate existing pkgline and clear it if store is consumed without files 3. In link_package_generic(): detect stale consumed.json and remove marker, return error to trigger re-download The fix ensures that stale consumed stores are detected early and packages are re-downloaded when needed. Test changes: - Added macOS support to history-restore.sh test using brew channel Fixes: history-restore test failure on macOS with brew channel Error: "Store needs re-download (stale consumed.json removed)" Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
tests: reorganize e2e test architecture and rename to in-vm Problem: The tests/e2e/ directory had grown with inconsistent organization: - tests/e2e/cases/bash-sh.sh had an OS loop that could be split - tests/e2e/cases/sandbox-run.sh and epkg-wrapper.sh were standalone tests that did not need the full VM harness - CLI patterns were inconsistent across test scripts - Directory name "e2e" was ambiguous about the testing mechanism Purpose: Improve test architecture clarity by: 1. Renaming "e2e" to "in-vm" to clearly indicate VM-based isolation 2. Moving standalone tests to appropriate dedicated directories 3. Splitting monolithic OS-loop tests into focused scenario tests 4. Standardizing CLI patterns with consistent help messages and debug flags Solution: - Rename tests/e2e/ -> tests/in-vm/ - Update all internal path references (host-vars.sh, lib.sh, vm.sh) - Update documentation references in README files - Move sandbox-run.sh -> tests/sandbox/test-isolation-modes.sh - Use common.sh for parse_debug_flags, set_epkg_bin, set_color_names - Add standardized --help output - Move epkg-wrapper.sh -> tests/misc/test-shell-wrapper.sh - Add CLI argument parsing with --help support - Use common.sh shared functions - Split bash-sh.sh OS loop into tests/dev-projects/scenes/ - test-bash.sh -> scenes/bash.sh - test-curl-https.sh -> scenes/curl-https.sh - test-epkg-nested.sh -> scenes/epkg-nested.sh - test-package-queries.sh -> scenes/package-queries.sh - test-search-paths.sh -> scenes/search-paths.sh - Remove redundant "test-" prefix in scenes/ directory - Standardize CLI across all test scripts - Consistent -d/-dd/-ddd debug flags - Consistent --help output using parse_debug_flags from common.sh - Clear usage messages with examples - Update documentation - tests/README.md: new structure diagram and updated paths - tests/in-vm/README.md: renamed from e2e/README.md with all references updated Rationale: The "in-vm" name is more descriptive than "e2e" because it explicitly indicates the isolation mechanism (microVM via epkg run --isolate=vm) rather than just the testing scope. This helps distinguish from other tests that also test "end-to-end" behavior but do not require VM isolation (like those in tests/sandbox/ and tests/dev-projects/). The new structure separates concerns: - in-vm/: tests that require full VM isolation (may pollute host if run outside VM) - sandbox/: tests for sandbox/isolation features themselves - dev-projects/scenes/: focused test scenarios for specific behaviors - dev-projects/langs/: language toolchain tests - misc/: standalone utility tests Usage: Run in-VM tests: cd tests/in-vm ./test-all.sh ./test-one.sh cases/env-register-activate.sh Run scenario tests (host-safe): cd tests/dev-projects/scenes E2E_OS=debian ./bash.sh Run sandbox tests: cd tests/sandbox E2E_OS=debian ./test-isolation-modes.sh Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
tests: add has_cmd helper and use it in test scripts Add has_cmd() function to tests/common.sh for checking command existence. This is a cleaner alternative to 'command -v ... >/dev/null 2>&1'. Update test scripts to use has_cmd: - sandbox/test-vm-sandbox.sh: check_dependency(), auto_select_vmm(), virtiofsd checks - in-vm/cases/public-multi-user.sh: adduser/useradd detection - in-vm/cases/env-register-activate.sh: jq command verification Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests/in-vm: add virtiofs DAX file I/O tests to test-vm-sandbox-wsl2.sh Add DAX-specific test cases for files of various sizes: - DAX-1: /etc/hosts (~200 bytes) - small file - DAX-2: /etc/inputrc (1748 bytes) - near page boundary, triggers VirtualAlloc - DAX-3: yash initialization (11859 bytes) - triggers VirtualAlloc - DAX-4: page-aligned file (4096 bytes) - should use file mapping - DAX-5: sub-page file (4094 bytes) - triggers VirtualAlloc - DAX-6: /bin/bash (~789KB) - large binary Also fix virtiofs-dax-io.sh to use busybox head/cat instead of dd since dd is not available in minimal Alpine VM environment. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 3 个月前 |