{"id":19208028,"url":"https://github.com/ubuntu/grubzfs-testsuite","last_synced_at":"2026-03-15T05:36:55.013Z","repository":{"id":54656453,"uuid":"182214897","full_name":"ubuntu/grubzfs-testsuite","owner":"ubuntu","description":"Test for zfs (zsys/non zsys) grub menu generation","archived":false,"fork":false,"pushed_at":"2021-02-08T11:58:38.000Z","size":423,"stargazers_count":7,"open_issues_count":2,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-20T15:44:39.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubuntu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-19T06:36:51.000Z","updated_at":"2024-08-02T02:21:49.000Z","dependencies_parsed_at":"2022-08-13T23:00:54.245Z","dependency_job_id":null,"html_url":"https://github.com/ubuntu/grubzfs-testsuite","commit_stats":null,"previous_names":["ubuntu/grubmenugen-zfs-tests"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fgrubzfs-testsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fgrubzfs-testsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fgrubzfs-testsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fgrubzfs-testsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubuntu","download_url":"https://codeload.github.com/ubuntu/grubzfs-testsuite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253803324,"owners_count":21966901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T13:23:53.696Z","updated_at":"2025-10-26T22:31:57.659Z","avatar_url":"https://github.com/ubuntu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grubzfs-testsuite\nIntegration tests for zfs (zsys/non zsys) grub menu generation (`/etc/grub.d/10_linux_zfs`)\n\n## Test dependencies\n\nOn Debian and derivatives, the following packages are required (grub and zfs):\n* grub-common\n* zfsutils-linux\n* libzfslinux-dev\n* e2fsprogs\n* zsys\n\nGo 1.11 (minimum) is required.\n\n## Running the tests\nAs the tests are interacting with zfs kernel modules, the user should have zpool and zfs dataset creation permissions.\n\nWe are checking if user is root for tests dealing with zpool creation.\n\n```\n# go test\n```\n\nAlternatively, you can use a test binary (compiled by `go test -c`). The test binary will pick any `datadir` and `mocks`\n(or `cmd/` see \"Mock rebuild conditions\") in the current directory. If it can't find them, it will pick them relative to\nthe test binary directory itself.\n\n### Types of tests\n\nThere are 4 types of test:\n* **TestBootlist**: Test the generation of the intermediary bootlist file.\n* **TestMetaMenu**: Test the generation of the intermediary metamenu file from a bootlist.\n* **TestGrubMenu**: Test the generation of the finale grub configuration file from a metamenu.\n* **TestGrubMkConfig**: Run all the above coverage in one shot, without intermediary files.\n\n\u003e Note that tests that don't deal with dataset creation can be executed in parallel.\n\n### Targeting a different 10_linux_zfs file\n\nBy default, the tests are using the installed version of `10_linux_zfs` located in `/etc/grub.d/`. You can target a different file by passing its path to the command line option `-linux-zfs=\u003cpath\u003e`.\n\nIf you have multiple tests to run, you can export `GRUBTESTS_LINUXZFS=\u003cpath\u003e` to avoid setting the flag each for each test. It will take precedence over the command line argument.\n\n### Updating reference files\n\nThe first 3 types of test are using reference (golden) files and compare the generated output with those.\n\nYou can update the reference files with the `-update` command line argument. This argument will also refresh the reference files if they already exist.\n\n\u003e The updated golden files should be committed to the VCS.\n\n### Slow mode options\n\nAs of ZFS 0.7, you can't create multiple times pools with the same names. There is a risk to create data locks. The `-slow` option seems to alleviate the issue by temporizing tests when creating/removing pools and datasets.\n\n### Dangerous mode\n\nSome tests need to move utilities outside of the user's `$PATH` before restoring them. As we are tempering the system, those tests are skipped by default. The command line option `-dangerous` will run them.\n\n## Mock rebuild conditions\n\nWe are using mocks (sources are in the `cmd/` directory) and rebuild them each time you run tests. If this directory\nisn't available, we assume there is a `mocks` subdirectory, with one subdirectory for each mocks.\n.\nThis is mostly used when building a test binary while not shipping the source in a binary package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fgrubzfs-testsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubuntu%2Fgrubzfs-testsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fgrubzfs-testsuite/lists"}