From: Wolfgang Bumiller Date: Thu, 27 Oct 2022 12:59:49 +0000 (+0200) Subject: test socket/fifo entry kinds in accessor X-Git-Url: https://git.proxmox.com/?p=pxar.git;a=commitdiff_plain;h=85f5a177ef8f824591a5bab2d3a1862465a77e60 test socket/fifo entry kinds in accessor Signed-off-by: Wolfgang Bumiller --- diff --git a/tests/simple/main.rs b/tests/simple/main.rs index 676322d..d661c7d 100644 --- a/tests/simple/main.rs +++ b/tests/simple/main.rs @@ -125,9 +125,10 @@ fn check_run_special_files(accessor: &accessor::Accessor<&[u8]>) { "expected first file in /run to be fifo0" ); - let _entry = fifo0 + let entry = fifo0 .decode_entry() .expect("failed to decode entry for fifo0"); + assert!(matches!(entry.kind(), PxarEntryKind::Fifo)); let sock0 = rd .next() @@ -139,7 +140,8 @@ fn check_run_special_files(accessor: &accessor::Accessor<&[u8]>) { "expected second file in /run to be sock0" ); - let _entry = sock0 + let entry = sock0 .decode_entry() .expect("failed to decode entry for sock0"); + assert!(matches!(entry.kind(), PxarEntryKind::Socket)); }