diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-03-01 10:11:07 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-03-01 10:11:07 +0100 |
commit | d5b9e35e2f0c7196f6f458ff4d0fb267f45301c5 (patch) | |
tree | 9504d46e08bc6db9e17de100e037370869e1d00f | |
parent | ad691bdc906f9158701d64effce51205b8654c83 (diff) | |
download | udisks-d5b9e35e2f0c7196f6f458ff4d0fb267f45301c5.tar.gz |
integration-test: Fix race condition in fake CD drive creation harder
Fix previous commit: We still must reset ptype to 0 for the force-removal test
to work, just do it *after* the CD drive was created successfully.
-rwxr-xr-x | src/tests/integration-test | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/integration-test b/src/tests/integration-test index 2fcc755..3c09880 100755 --- a/src/tests/integration-test +++ b/src/tests/integration-test @@ -434,6 +434,9 @@ class UDisksTestCase(unittest.TestCase): assert open('/sys/block/%s/device/model' % os.path.basename(rw_dev)).read().strip() == 'scsi_debug' + with open('/sys/bus/pseudo/drivers/scsi_debug/ptype', 'w') as f: + f.write('0') + print('Set up test device: r/w: %s, r/o: %s' % (rw_dev, ro_dev)) return (rw_dev, ro_dev) |