Server IP : 85.214.239.14 / Your IP : 18.117.156.84 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/root/proc/3/root/proc/2/root/usr/share/augeas/lenses/dist/tests/ |
Upload File : |
(* Module: Test_LVM Provides unit tests and examples for the <LVM> lens. *) module Test_LVM = (* Variable: conf A full configuration file *) let conf = "# Generated by LVM2: date contents = \"Text Format Volume Group\" version = 1 description = \"Created *after* executing 'eek'\" creation_host = \"eek\" # Linux eek creation_time = 6666666666 # eeeek VG1 { id = \"uuid-uuid-uuid-uuid\" seqno = 2 status = [\"RESIZEABLE\", \"READ\", \"WRITE\"] extent_size = 8192 # 4 Megabytes max_lv = 0 max_pv = 0 process_priority = -18 physical_volumes { pv0 { id = \"uuid-uuid-uuid-uuid\" device = \"/dev/sda6\" # Hint only status = [\"ALLOCATABLE\"] pe_start = 123 pe_count = 123456 # many Gigabytes } } logical_volumes { LogicalEek { id = \"uuid-uuid-uuid-uuid\" status = [\"READ\", \"WRITE\", \"VISIBLE\"] segment_count = 1 segment1 { start_extent = 0 extent_count = 123456 # beaucoup Gigabytes type = \"striped\" stripe_count = 1 # linear stripes = [ \"pv0\", 0 ] } } } } " test LVM.int get "5" = { "int" = "5" } test LVM.str get "\"abc\"" = { "str" = "abc"} test LVM.lns get "\n" = {} test LVM.lns get "#foo\n" = { "#comment" = "foo"} test LVM.lns get "# Generated by LVM2: date contents = \"Text Format Volume Group\" version = 1 description = \"Created *after* executing 'eek'\" creation_host = \"eek\" # Linux eek creation_time = 6666666666 # eeeek\n" = { "#comment" = "Generated by LVM2: date" } {} { "contents" { "str" = "Text Format Volume Group" } } { "version" { "int" = "1" } } {} { "description" { "str" = "Created *after* executing 'eek'" } } {} { "creation_host" { "str" = "eek" } { "#comment" = "Linux eek" } } { "creation_time" { "int" = "6666666666" } { "#comment" = "eeeek" } } (* Test: LVM.lns Test the full <conf> *) test LVM.lns get conf = { "#comment" = "Generated by LVM2: date" } {} { "contents" { "str" = "Text Format Volume Group" } } { "version" { "int" = "1" } } {} { "description" { "str" = "Created *after* executing 'eek'" } } {} { "creation_host" { "str" = "eek" } { "#comment" = "Linux eek" } } { "creation_time" { "int" = "6666666666" } { "#comment" = "eeeek" } } {} { "VG1" { "dict" { "id" { "str" = "uuid-uuid-uuid-uuid" } } { "seqno" { "int" = "2" } } { "status" { "list" { "1" { "str" = "RESIZEABLE" } } { "2" { "str" = "READ" } } { "3" { "str" = "WRITE" } } } } { "extent_size" { "int" = "8192" } { "#comment" = "4 Megabytes" } } { "max_lv" { "int" = "0" } } { "max_pv" { "int" = "0" } } { "process_priority" { "int" = "-18" } } {} { "physical_volumes" { "dict" { "pv0" { "dict" { "id" { "str" = "uuid-uuid-uuid-uuid" } } { "device" { "str" = "/dev/sda6" } { "#comment" = "Hint only" } } {} { "status" { "list" { "1" { "str" = "ALLOCATABLE" } } } } { "pe_start" { "int" = "123" } } { "pe_count" { "int" = "123456" } { "#comment" = "many Gigabytes" } } } } } } {} { "logical_volumes" { "dict" { "LogicalEek" { "dict" { "id" { "str" = "uuid-uuid-uuid-uuid" } } { "status" { "list" { "1" { "str" = "READ" } } { "2" { "str" = "WRITE" } } { "3" { "str" = "VISIBLE" } } } } { "segment_count" { "int" = "1" } } {} { "segment1" { "dict" { "start_extent" { "int" = "0" } } { "extent_count" { "int" = "123456" } { "#comment" = "beaucoup Gigabytes" } } {} { "type" { "str" = "striped" } } { "stripe_count" { "int" = "1" } { "#comment" = "linear" } } {} { "stripes" { "list" { "1" { "str" = "pv0" } } { "2" { "int" = "0" } } } } } } } } } } } } (* Parse description from RHEL 6 *) let descr="\"Created *before* executing '/sbin/vgs --noheadings -o name --config 'log{command_names=0 prefix=\\\" \\\"}''\"" test LVM.str get descr = { "str" = "Created *before* executing '/sbin/vgs --noheadings -o name --config 'log{command_names=0 prefix=\\\" \\\"}''" }