From 61370082d63af8abd2ad40ecf962df17b2476f66 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 17 Dec 2016 00:37:00 +0100 Subject: [PATCH] catch errno.ENOSYS for mknod (win 10 lxsys) mknod raises this when running as non-root under Windows 10's Linux Subsystem. --- borg/testsuite/archiver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/borg/testsuite/archiver.py b/borg/testsuite/archiver.py index 67b5e581b..815c8943a 100644 --- a/borg/testsuite/archiver.py +++ b/borg/testsuite/archiver.py @@ -311,7 +311,8 @@ def create_test_files(self): except PermissionError: have_root = False except OSError as e: - if e.errno != errno.EINVAL: + # Note: ENOSYS "Function not implemented" happens as non-root on Win 10 Linux Subsystem. + if e.errno not in (errno.EINVAL, errno.ENOSYS): raise have_root = False return have_root