[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: sync: check that all files are processed even when errors
|
From: |
Collin Funk |
|
Subject: |
[PATCH] tests: sync: check that all files are processed even when errors occur |
|
Date: |
Sun, 18 Jan 2026 15:23:05 -0800 |
* tests/misc/sync.sh: Add the test case.
---
tests/misc/sync.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/misc/sync.sh b/tests/misc/sync.sh
index a7cace6fd..ff147999d 100755
--- a/tests/misc/sync.sh
+++ b/tests/misc/sync.sh
@@ -38,6 +38,14 @@ sync file || fail=1
# Ensure multiple args are processed and diagnosed
returns_ 1 sync file nofile || fail=1
+# Ensure all arguments a processed even if one results in an error
+returns_ 1 sync nofile1 file nofile2 2>err || fail=1
+cat <<\EOF > exp || framework_failure_
+sync: error opening 'nofile1': No such file or directory
+sync: error opening 'nofile2': No such file or directory
+EOF
+compare exp err || fail=1
+
# Ensure inaccessible dirs give an appropriate error
mkdir norw || framework_failure_
chmod 0 norw || framework_failure_
--
2.52.0
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: sync: check that all files are processed even when errors occur,
Collin Funk <=