[LTP] [PATCH v2] ftp01.sh: Add support for test lftp

Petr Vorel pvorel@suse.cz
Wed Oct 16 23:15:13 CEST 2024


> On 16. 10. 24 14:47, Cyril Hrubis wrote:
> > Hi!
> > > To be honest, I would rather to remove this FTP test because FTP protocol is
> > > legacy. I know it is supposed to be a smoke test, but maybe using modern tools
> > > would be better than keeping test working among various old FTP implementations.
> > > (Also nontrivial setup is required just for few FTP tests:
> > > https://github.com/linux-test-project/ltp/tree/master/testcases/network )
> > > But probably Cyril would be against. @Cyril @Martin WDYT?

> > So where is the ftp server setup code? Or do we expect ftp server to be
> > installed and configured prior to the test execution?

> > The actuall test does not look that complex to me.

> Hi,
> I've replied to patchset v1[1] that the server setup is better left to the
> user, like we do with NFS. In our case, it should be done in OpenQA during
> VM environment setup.

NFS case is kind of different from FTP. 1) There is the only nfsd implementation,
in kernel. But there are more FTP servers (userspace).

Also it's not just about starting the service (I agree with leaving services
enabled in tooling outside LTP, e.g. *not* using testcases/lib/daemonlib.sh),
but there is also service configuration which is required to be done in the test
(part of the testing). NFS tests just run exportfs. All FTP scripts but ftp01.sh
use vsftpd configuration. ftp01.sh could reuse this code (if it's working).

Besides this FTP server it also involves some additional setup [2] (adjust
/etc/ftpusers or /etc/vsftpd.ftpusers), but sure, this could be left for the
test runner.

> I agree that the test could be replaced by a socket test, either using
> improved netstress tool or some new syscall tests for send()/recv()/...

I was also thinking about using netstress.c (which is already used for
network many tests) for FTP download and upload tests.

There are also other tests in runtest/net_stress.appl:

* dns-stress.sh bind9 resolving test - IMHO not relevant for LTP (bind has nice
  CI testing done by ISC).
* ssh-stress.sh sshd stress test - IMHO not relevant for LTP even as a smoke
  test. Also touching ssh configuration can break some LTP users as LTP is often
  used as a connection to SUT.
* http-stress.sh http downloading stress test - IMHO redundant to FTP download
  (if we replace FTP tests with netstress / other C code, we can delete this as well).

Back to ftp01.sh (file modified in this patch). It tests downloading and
uploading with FTP protocol. It looks to me more as FTP client/server test than
anything else (it's not a stress test). IMHO not relevant for LTP.

Kind regards,
Petr

> [1] https://patchwork.ozlabs.org/project/ltp/patch/20240918100344.21316-1-wegao@suse.com/#3381493

[2] https://github.com/linux-test-project/ltp/tree/master/testcases/network#ftp-and-telnet-setup


More information about the ltp mailing list