SFTP Test File

Modify the SFTP tests to use the file configure.ac instead of configure.
Some environments do not have or use configure. Configure.ac is in the
source archive.
pull/648/head
John Safranek 2023-12-06 09:32:37 -08:00
parent f3752a90c7
commit 27275b76f3
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
2 changed files with 8 additions and 8 deletions

View File

@ -44,17 +44,17 @@ static const char* cmds[] = {
"pwd", "pwd",
"ls", "ls",
#ifdef WOLFSSH_ZEPHYR #ifdef WOLFSSH_ZEPHYR
"put " CONFIG_WOLFSSH_SFTP_DEFAULT_DIR "/configure", "put " CONFIG_WOLFSSH_SFTP_DEFAULT_DIR "/configure.ac",
#else #else
"put configure", "put configure.ac",
#endif #endif
"ls", "ls",
#ifdef WOLFSSH_ZEPHYR #ifdef WOLFSSH_ZEPHYR
"get configure " CONFIG_WOLFSSH_SFTP_DEFAULT_DIR "/test-get", "get configure.ac " CONFIG_WOLFSSH_SFTP_DEFAULT_DIR "/test-get",
#else #else
"get configure test-get", "get configure.ac test-get",
#endif #endif
"rm configure", "rm configure.ac",
"cd ../", "cd ../",
"ls", "ls",
"rename test-get test-get-2", "rename test-get test-get-2",
@ -116,8 +116,8 @@ static int Expected(int command)
} }
case 6: case 6:
if (WSTRNSTR(inBuf, "configure", sizeof(inBuf)) == NULL) { if (WSTRNSTR(inBuf, "configure.ac", sizeof(inBuf)) == NULL) {
fprintf(stderr, "configure not found in %s\n", inBuf); fprintf(stderr, "configure.ac not found in %s\n", inBuf);
return 1; return 1;
} }
else { else {

View File

@ -81,7 +81,7 @@ int main(void)
/* Setup the necessary files for the sftp tests */ /* Setup the necessary files for the sftp tests */
fs_file_t_init(&zfp); fs_file_t_init(&zfp);
snprintf(filename, sizeof(filename), "%s/%s", snprintf(filename, sizeof(filename), "%s/%s",
CONFIG_WOLFSSH_SFTP_DEFAULT_DIR, "configure"); CONFIG_WOLFSSH_SFTP_DEFAULT_DIR, "configure.ac");
CHECK_TEST_RETURN(fs_open(&zfp, filename, FS_O_WRITE|FS_O_CREATE)); CHECK_TEST_RETURN(fs_open(&zfp, filename, FS_O_WRITE|FS_O_CREATE));
/* Write some random data to file */ /* Write some random data to file */
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)