Skip to contentSkip to conversation

ftp/ftp02: The case needs to check vsftpd first

PATCH New Cui Bixuan 2 participants 4 messages Sep 16, 2015 – Oct 8, 2015

lore
Share & tools
lore

Cui Bixuan

author
#0 lore raw

PATCH 1/1 ftp/ftp02: The case needs to check vsftpd first

The ftp02 case will use vsftpd so we should check it first

---
 testcases/network/tcp_cmds/ftp/ftp02 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/network/tcp_cmds/ftp/ftp02 +1 -1
index 92e7944..6b84f22 100755
@@ -38,7 +38,7 @@
 
 setup()
 {
-	tst_check_cmds expect ftp useradd userdel
+	tst_check_cmds expect ftp useradd userdel vsftpd
 	export TEST_USER="ftpuser2"
 }
 
Signature · 1 line
1.6.0.2
#1 lore raw

PATCH 1/1 ftp/ftp02: The case needs to check vsftpd first

Hi!

Quoted 9 lines
---
 testcases/network/tcp_cmds/ftp/ftp02 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/network/tcp_cmds/ftp/ftp02 +0 -0
index 92e7944..6b84f22 100755

testcases/network/tcp_cmds/ftp/ftp02 line 42

Quoted 6 lines
testcases/network/tcp_cmds/ftp/ftp02 +1 -1
@@ -38,7 +38,7 @@
 
 setup()
 {
-	tst_check_cmds expect ftp useradd userdel
+	tst_check_cmds expect ftp useradd userdel vsftpd
 	export TEST_USER="ftpuser2"

I see that rest of the ftp testcases that uses vsftpd has it in tst_check_cmds. However it would be cleaner to add this check to the top of the ftp_setup file so that it's called at the moment the file is sourced and remove it from the individual testcases.

Signature · 2 lines
Cyril Hrubis
[email protected]
author
#2 lore raw

PATCH v2 1/1 ftp: Move commands check to ftp_setup

Move commands check to ftp_setup and add vsftpd check to ftp02

---
 testcases/network/tcp_cmds/ftp/ftp02     |    1 -
 testcases/network/tcp_cmds/ftp/ftp03     |    1 -
 testcases/network/tcp_cmds/ftp/ftp04     |    2 --
 testcases/network/tcp_cmds/ftp/ftp05     |    1 -
 testcases/network/tcp_cmds/ftp/ftp_setup |    2 ++
 5 files changed, 2 insertions(+), 5 deletions(-)
testcases/network/tcp_cmds/ftp/ftp02 +0 -1
index 92e7944..1316109 100755
@@ -38,7 +38,6 @@
 
 setup()
 {
-	tst_check_cmds expect ftp useradd userdel
 	export TEST_USER="ftpuser2"
 }
 
testcases/network/tcp_cmds/ftp/ftp03 +0 -1
index 4ad5560..e2925e8 100755
@@ -33,7 +33,6 @@
 
 setup()
 {
-	tst_check_cmds ftp useradd userdel vsftpd
 	export TEST_USER="ftpuser3"
 }
 
testcases/network/tcp_cmds/ftp/ftp04 +0 -2
index f38640d..1327b8e 100755
@@ -30,8 +30,6 @@
 
 setup()
 {
-	tst_check_cmds awk expect ftp vsftpd
-
 	TEST_USER=root
 
 	tvar=${MACHTYPE%-*}
testcases/network/tcp_cmds/ftp/ftp05 +0 -1
index 65a8a67..e9e4272 100755
@@ -38,7 +38,6 @@
 
 setup()
 {
-	tst_check_cmds expect ftp vsftpd
 	TEST_USER="anonymous"
 }
 
testcases/network/tcp_cmds/ftp/ftp_setup +2 -0
index 1731a6d..f148281 100644
@@ -26,6 +26,8 @@ do_setup()
 	export TEST_USER_ENCRYPTED_PASSWD="42VmxaOByKwlA"
 	export TEST_USER_HOMEDIR="/home/$TEST_USER"
 
+	tst_check_cmds awk expect ftp useradd userdel vsftpd
+
 	for vsftp_confdir in /etc/vsftpd /etc; do
 		if [ -r "$vsftp_confdir/vsftpd.conf" ]; then
 			VSFTP_CONF="$vsftp_confdir/vsftpd.conf"
Signature · 1 line
1.6.0.2 .