File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,20 @@ static int checkLsSize(void)
137137}
138138
139139static const SftpTestCmd cmds [] = {
140+ /* If a prior run was interrupted, files and directories
141+ * created during the test may still exist in the working
142+ * directory, causing mkdir to fail and ls checks to see
143+ * unexpected entries. Remove them here before starting.
144+ * These run as SFTP commands rather than local syscalls
145+ * so they are portable across all platforms (Windows,
146+ * Zephyr, POSIX). Failures are silently ignored since
147+ * the files may not exist. */
148+ { "rm a/configure.ac" , NULL },
149+ { "rmdir a" , NULL },
150+ { "rm test-get" , NULL },
151+ { "rm test-get-2" , NULL },
152+
153+ /* --- test sequence starts here --- */
140154 { "mkdir a" , NULL },
141155 { "cd a" , NULL },
142156 { "pwd" , checkPwdInA },
You can’t perform that action at this time.
0 commit comments