]> git.proxmox.com Git - pxar.git/commitdiff
test socket/fifo entry kinds in accessor
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 27 Oct 2022 12:59:49 +0000 (14:59 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 27 Oct 2022 13:18:20 +0000 (15:18 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
tests/simple/main.rs

index 676322d5480c2f81edc3e32a2bacc64c0d341b73..d661c7d0ad6075bd84bdf3704e1c66f8c1532122 100644 (file)
@@ -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));
 }