Commit Graph

16 Commits

Author SHA1 Message Date
Dan Streetman
898358a430 d/t/storage: check for ext2 or ext4 fs when using crypttab 'tmp' option
https://github.com/systemd/systemd/pull/15853
2020-07-05 19:21:55 +02:00
Dan Streetman
ffbe3afd1a d/t/storage: fail if socket info not in ask_password contents 2019-07-25 11:54:45 -04:00
Dan Streetman
b25028f63e d/t/storage: convert password agent into normal Thread
There is no need to fork() a password agent; if it's a normal Thread
then it can generate testcase failures and can be easily stopped
and join()ed.
2019-07-25 11:54:45 -04:00
Dan Streetman
9ff84f7786 d/t/storage: use short timeout waiting for scsi_debug block dev to appear 2019-07-25 11:54:45 -04:00
Dan Streetman
54fce9cf49 d/t/storage: manage scsi_debug using add_hosts
This allows each test to run independently using their own untouched
scsi device, without the need to rmmod/modprobe the module.

Closes: #929728
2019-07-25 11:54:40 -04:00
Dan Streetman
e44222a95c d/t/storage: don't search for 'scsi_debug' in ask_password
A previous commit changed the plaintext_name to a unique per-test name,
so there is no need to match the ask_password content on 'scsi_debug' now,
since just matching the plaintext_name should be unique.
2019-07-24 14:15:09 -04:00
Dan Streetman
753da881de d/t/storage: wait for service to start, only stop if active
This removes the systemctl start, as the service should already be
running (or starting, or failed).  Instead, just wait for the service
to actually reach 'active' or 'failed' state.  Then, only stop the
service if its state is 'active'.

Previous attempts to fix hung or flaky test runs included adding a start
before the stop, but the start-the-stop calls can lead to cancelled jobs
instead of a properly stopped service, which is again flaky.
2019-07-24 14:15:09 -04:00
Dan Streetman
f4f6a47596 d/t/storage: increase wait for plaintext_dev from 5 to 30 seconds
Also change the wait time from magic number into variable, and fix
typo in failure message.
2019-07-24 14:15:09 -04:00
Dan Streetman
02df3e5aa4 d/t/storage: change plaintext_name to include testname
Setting the plaintext name to include the testname makes debugging failures
easier.

Also for convenience, create service_name field in setup method, for use
in tests and/or teardown method.
2019-07-24 14:15:09 -04:00
Dimitri John Ledkov
5594ebf325
debian/tests/storage: fix for LUKS2 and avoid interactive password prompts. 2019-02-14 14:48:02 +00:00
Dimitri John Ledkov
bfafb0924a
debian/tests/storage: improve cleanups.
On fast ppc64el machines, cryptsetup start job may not complete by the time
tearDown is executed. In that case stop, causes to simply cancel the start job
without actually cleaning up the dmsetup node. This leads to failing subsequent
test as it no longer starts with a clean device. Thus ensure the
systemd-cryptsetup unit is started, before stopping it.

Also rmmod scsi_debug module at the end, to allow re-running the test in a
loop.
2019-01-28 13:04:21 +00:00
Martin Pitt
9cba5a09dd debian/tests/storage: Avoid rmmod scsi_debug
rmmod can often be brittle, so just clear the fake drive in between tests
instead of rmmod/modprobe.

LP: #1626737
2016-09-25 23:08:22 +02:00
Martin Pitt
c80c55b22d debian/tests/storage: Avoid stderr output of stopping systemd-cryptsetup@.service 2016-09-20 13:25:28 +02:00
Martin Pitt
46be001b74 debian/tests/storage: Sync and settle udev after luksFormat
This hopefully reduces the chance of seeing some half-written signatures.
2016-06-27 14:26:51 +02:00
Martin Pitt
a863860881 debian/tests/storage: Remove duplicated code 2016-02-09 10:49:03 +01:00
Martin Pitt
9b6e890efc Add "storage" autopkgtest
Initially this covers some basic use cases with LUKS cryptsetup devices.
2015-11-30 07:48:49 +01:00