{"id":20105040,"url":"https://github.com/misyltoad/ktest","last_synced_at":"2026-05-13T02:34:23.919Z","repository":{"id":257786724,"uuid":"678189949","full_name":"misyltoad/ktest","owner":"misyltoad","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-14T01:09:14.000Z","size":1333,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"casefold","last_synced_at":"2025-03-02T17:47:47.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misyltoad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-14T01:08:56.000Z","updated_at":"2023-08-14T02:00:42.000Z","dependencies_parsed_at":"2024-09-20T17:18:01.661Z","dependency_job_id":"1b7cd62c-151b-4f3f-88f0-7a1eff06a4af","html_url":"https://github.com/misyltoad/ktest","commit_stats":null,"previous_names":["misyltoad/ktest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/misyltoad/ktest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2Fktest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2Fktest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2Fktest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2Fktest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misyltoad","download_url":"https://codeload.github.com/misyltoad/ktest/tar.gz/refs/heads/casefold","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2Fktest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32965437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-13T17:45:41.012Z","updated_at":"2026-05-13T02:34:23.904Z","avatar_url":"https://github.com/misyltoad.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"KERNEL VIRTUAL MACHINE TESTING TOOLS:\n=====================================\n\nThis repository contains some infrastructure for running Linux kernel tests\ninside a virtual machine, primarily for bcachefs.\n\nThe tools will launch a virtual machine (using qemu), complete with networking\nand scratch block devices, run the test(s) inside the vm with test output on\nstandard output, and then kill and cleanup the VM when the test(s) complete (in\nnoninteractive mode) or when killed via ctrl-C.\n\nTests themselves are bash scripts that declare their dependencies (kernel config\noptions, scratch devices, timeouts, etc).\n\nDEPENDENCIES:\n=============\n\n * standand build tools (gcc, make)\n * qemu\n * minicom\n * socat\n * vde2 (for vde_swich and slirpvde, used for user mode networking)\n * liblwipv6 (optional dependency for user mode networking)\n\nYou'll need an ssh key in $HOME/.ssh for build-test-kernel ssh to work; it adds\nyour public key to the vm's authorized_keys.\n\nktest should work on any Linux distribution.\n\nGETTING STARTED:\n================\n\nYou'll need to build a root filesystem image for the virtual machines. As root,\nrun:\n\n```\nroot_image create\n```\n\nThis creates a root image and sticks it in /var/lib/ktest.\n\nThen, to build a kernel and run some tests, from your linux kernel source tree\nrun\n\n```\nbuild-test-kernel run -I ~/ktest/tests/bcachefs/single_device.ktest\n```\n\nWhile virtual machine is running, you can interact with it by running various\nother build-test-kernel subcommands from same directory, e.g.:\n\n```\nbuild-test-kernel ssh\nbuild-test-kernel kgdb\n```\n\nTOOLS:\n------\n\nSymlink the ones you're using somewhere into your path - there's no install\nprocedure, they just expect to be run out of the git repository.\n\n * build-test-kernel\n\n   This is what you'll use most of the time for interactive kernel development.\n   It expects to be run from a Linux kernel source tree - it builds it, and runs\n   the specified test.\n\n\nNormal usage:\n\n```\n$ build-test-kernel run -I ~/ktest/tests/bcache/xfstests.ktest\n```\n\n   run builds a kernel and runs the specified test; there are other subcommands\n   for interacting with a running test VM (sshing in, using kgdb, etc.).\n\n   -I enables interactive mode (disables timeouts, enables kgdb instead of crash\n   dumps)\n\n * ktest\n\n   This is what build-test-kernel calls into after building a kernel. ktest\n   takes a kernel image and a test, and parses the test and figures out the\n   correct parameters for running the virtual machine\n\n * testy\n\n   Simple tool for parsing \"test lists\" - files that specify which tests apply\n   to which source files/directories, and optionally running the appropriate\n   tests.\n\nTESTS:\n======\n\nTests are bash scripts; they specify dependencies/requirements (test libraries,\nbinaries, kernel config options, etc.) by calling various predefined bash\nfunctions.\n\nBy default, tests are shell functions that start with test. You can define tests\ndifferently by defining the shell functions list_tests and run_test.\n\n\n\nAUTOMATION:\n===========\n\nOutput logs go in ktest-out/out/; full output from a run of a .ktest test file\ngoes in\n  ktest-out/out/$basename\n\nIndividual tests go in\n  ktest-out/out/$basename.$testname\n\nSuccess or failure will be the very last line of the per-test logfiles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisyltoad%2Fktest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisyltoad%2Fktest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisyltoad%2Fktest/lists"}