openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.31k stars 1.71k forks source link

Platform independent runfiles don't honor defaults section from individual files #9459

Open jwk404 opened 4 years ago

jwk404 commented 4 years ago

With the introduction of shared runfiles, the default section of secondary runfiles is ignored.

Support for multiple runfiles should include defaults that are applied independently to tests in different runfiles. Currently, only defaults from the first file specified on the command line are honored.

System information

Type Version/Name
Distribution Name
Distribution Version
Linux Kernel 5e74ac51
Architecture
ZFS Version
SPL Version

Describe the problem you're observing

Defaults from the first runfile specified on the command line are the only ones honored.

Describe how to reproduce the problem

Set, for example, the timeout to differing values in different runfiles, and observe the behavior.

Include any warning/errors/backtraces from the system logs

ghost commented 4 years ago

I should have removed the default section from the linux.run file. The configparser updates the configuration with each file it parses, and they are not necessarily parsed in the order listed (that could be fixed though). Whatever is parsed last wins.

This was the simplest way to allow for breaking up the runfile into multiple files without writing a new parser or making significant changes to the test runner. I'm not opposed to these changes, but they were out of scope for what I needed to accomplish. I would be strongly in favor of adopting a config language with a more configurable parser (YAML comes to mind as particularly automation-friendly).