Christian Ebner and Dietmar Maurer
fe61cc1099
tests/pxar.rs: Make sure the correct pxar binary is run in the tests.
...
If compiled in debug mode, the debug binary should be tested, in release mode
the release binary has to be invoked.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:31:37 +02:00
Christian Ebner and Dietmar Maurer
ec56f07bec
Makefile: make the tests folder available in the build folder on 'make deb'
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-23 06:31:06 +02:00
Christian Ebner and Dietmar Maurer
cc119edbe5
Makefile: Allow to pass parameter tests=pattern to make test
...
`make test tests=pattern` will only run the subset of tests containing pattern,
therefore allowing to specify which subset of tests to run.
If the parameter is not specified, all tests are run.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-22 10:01:35 +02:00
Christian Ebner and Dietmar Maurer
de61bc9264
src/tools/xattr.rs: impl unit tests for fsetattr and fgetattr
...
As git does not preserve xattrs they have to be set before they can be read.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-22 10:01:10 +02:00
Christian Ebner and Dietmar Maurer
015c5f6bfb
tests/pxar.rs: Integrity test for pxar
...
Test the integrity of the restored folder content of data previously archived with pxar
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:26:34 +02:00
Christian Ebner and Dietmar Maurer
596182056b
src/pxar/sequential_decoder.rs: impl functionality to restore xattrs/fcaps from pxar achives
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:15:30 +02:00
Christian Ebner and Dietmar Maurer
b303057a19
src/pxar/encoder.rs: impl functionality to encode xattrs/fcaps in pxar
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:06:26 +02:00
Christian Ebner and Dietmar Maurer
bee8d8ea78
src/tools/xattr.rs: add functions name_store and security_capability
...
These functions allow to check if the name for xattrs/fcaps are valid.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-21 06:05:31 +02:00
Christian Ebner and Dietmar Maurer
2dcdd3b427
src/tools/xattrs.rs: impl libc wrapper functions to get/set xattrs and fcaps
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-16 11:14:21 +02:00
Christian Ebner and Dietmar Maurer
de2016d58a
src/pxar/format_definitions.rs: add format definitions for xattrs and fcaps
...
In addition to the format definition, the traits needed for sorting of xattr
entries by name are derived.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-16 11:14:13 +02:00
Christian Ebner and Dietmar Maurer
dec1ff18b8
src/tools/acl.rs: impl add_entry_full for ACL and set_permissions for ACLEntry
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-16 11:10:06 +02:00
Christian Ebner and Dietmar Maurer
25e205a1d3
src/tools.rs: add mod acl to tools
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-14 06:34:24 +02:00
Christian Ebner and Dietmar Maurer
d22096ef4b
src/tools/acl.rs: impl POSIX access control list (ACL) manipulation tools
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-05-14 06:28:42 +02:00
Christian Ebner and Dietmar Maurer
8b7c0def84
src/tools/procfs.rs: clean up tab indentation and use whitespaces instead
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-25 13:14:52 +02:00
Christian Ebner and Dietmar Maurer
ae694f44ef
src/tools/procfs.rs: add tests for read_proc_net_route() and read_proc_net_ipv6_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-24 06:43:52 +02:00
Christian Ebner and Dietmar Maurer
ec8db837fb
src/tools/procfs.rs: refactor read_proc_net_route() and read_proc_net_ipv6_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-24 06:43:32 +02:00
Christian Ebner and Dietmar Maurer
eb46c3d1ec
src/tools/procfs.rs: implement read_proc_net_ipv6_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-23 14:31:23 +02:00
Christian Ebner and Dietmar Maurer
286f0d4099
src/tools/procfs.rs: implement read_proc_net_route()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-15 11:13:16 +02:00
Christian Ebner and Dietmar Maurer
d2981e2738
src/tools/procfs.rs: implement read_proc_net_dev()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-13 11:52:59 +02:00
Christian Ebner and Dietmar Maurer
13abfdc57a
src/tools/procfs.rs: implement read_memory_usage()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-13 11:52:01 +02:00
Christian Ebner and Dietmar Maurer
3005ef48b6
src/tools/procfs.rs: Rename variable and struct to be more consistent
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-12 12:13:34 +02:00
Christian Ebner and Dietmar Maurer
cc93bacb72
src/tools/procfs.rs: simplify read_cpuinfo()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-12 12:13:14 +02:00
Christian Ebner and Dietmar Maurer
1cd33633aa
/src/tools: Cleanup tempfiles in folder
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-10 13:56:22 +02:00
Christian Ebner and Dietmar Maurer
2b6a3e1396
src/tools/procfs.rs: implement read_cpuinfo()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-10 13:11:11 +02:00
Christian Ebner and Dietmar Maurer
1f6fbf1c57
src/tools/procfs.rs: implement read_meminfo()
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-09 15:21:49 +02:00
Christian Ebner and Dietmar Maurer
a2474d328f
src/tools/procfs.rs: implement read_proc_uptime and read_proc_uptime_ticks
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-05 06:22:21 +02:00
Christian Ebner and Dietmar Maurer
08daa81af6
procfs: implement check_process_running and check_process_running_pstart
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-04-04 13:54:17 +02:00
Christian Ebner and Dietmar Maurer
e04d1bfadc
Cleanup of if statement with unwraps by a more compact match statement
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2019-03-20 09:49:18 +01:00