tytso / xfstests-bld

Creates a file system / storage test appliance which can be run using KVM, GCE, and Android
GNU General Public License v2.0
67 stars 46 forks source link

FR: support --no-email option for ltm commands #46

Closed lrumancik closed 4 months ago

lrumancik commented 1 year ago

When running LTM commands for selftests, we likely don't want to receive emails. Right now, --no-email is only supported for pure gce-xfstests commands (gce-xfstests -c ...) but not for ltm commands (gce-xfstests ltm -c ...). If you attempt to use --no-email for an ltm command, the tests will run but sharder.emailReport() will panic due to no email address causing the results not to get packed and uploaded to gce.

sharder.go:

func (sharder *ShardScheduler) finish()  {
    sharder.log.Debug("Finishing sharder")

    sharder.aggResults()
    sharder.createInfo()
    sharder.createRunStats()
    sharder.genResultsSummary()

    if !sharder.reportKCS {
        sharder.emailReport() -> panic'ing because no where to send email
    }

    sharder.packResults()
}
tytso commented 4 months ago

I've also fixed up the appliance and ltm-kcs selftests to no longer send-emails, and ltm-kcs now vaidates the test results files (as opposed to relying on the human to verify the e-mail'ed reports).