diff options
author | Tony Asleson <tasleson@redhat.com> | 2023-03-10 10:41:50 -0600 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2023-03-10 12:51:53 -0600 |
commit | f8876290bfc8d11400901e9eac32f6d613b0ed70 (patch) | |
tree | aa345fe2304f1a89e186dba6d8accb1b0836599a /test | |
parent | 568e8c71d7e39da7494a470400d3f9977c13a1c7 (diff) | |
download | lvm2-f8876290bfc8d11400901e9eac32f6d613b0ed70.tar.gz |
lvmdbustest: Check for needed env. variables
Diffstat (limited to 'test')
-rwxr-xr-x | test/dbus/lvm_error_inject.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/dbus/lvm_error_inject.py b/test/dbus/lvm_error_inject.py index 2849dd29c..098f87070 100755 --- a/test/dbus/lvm_error_inject.py +++ b/test/dbus/lvm_error_inject.py @@ -336,8 +336,12 @@ if __name__ == "__main__": cmdline.extend(args) ec = run_one(cmdline) else: - SH = LvmShellHandler(cmdline) - ec = SH.run() + if "LVM_REPORT_FD" in os.environ: + SH = LvmShellHandler(cmdline) + ec = SH.run() + else: + debug('running as lvm shell requires: LVM_REPORT_FD to be set') + ec = 1 sys.exit(ec) except Exception: traceback.print_exc(file=d_out) |