summaryrefslogtreecommitdiffstats
path: root/vendor/tar/debian/patches/test-skip-loop0-if-nonexistent.diff
blob: 1f4eec4abbab19fa4edf28ae1b7a49c0c33c484c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Skip using loop0 if it doesn't exist (apparently it doesn't on Debian CI)
Author: Peter Michael Green <plugwash@debian.org>

--- a/tests/all.rs
+++ b/tests/all.rs
@@ -1394,7 +1394,10 @@
     // unfortunately, block device file cannot be created by non-root users
     // as a substitute, just test the file that exists on most Unix systems
     t!(env::set_current_dir("/dev/"));
-    t!(ar.append_path("loop0"));
+    // debian CI apprently doesn't have loop0, skip testing it if it doesn't exist.
+    if std::path::Path::new("loop0").exists() {
+        t!(ar.append_path("loop0"));
+    }
     // CI systems seem to have issues with creating a chr device
     t!(ar.append_path("null"));
     t!(ar.finish());