Repository: reframe-hpc/reframe

Issue:
`TypeError: can only join an iterable is` if resubmit_on_errors is not set
This is with ReFrame 4.2.0 (and also 4.1.0).

```
Traceback (most recent call last):
  File "/bask/projects/e/edmondac-rsg/reframe/venv-system/lib64/python3.6/site-packages/reframe/frontend/executors/__init__.py", line 317, in _safe_call
    return fn(*args, **kwargs)
  File "/bask/projects/e/edmondac-rsg/reframe/venv-system/lib64/python3.6/site-packages/reframe/core/hooks.py", line 103, in _fn
    func(obj, *args, **kwargs)
  File "/bask/projects/e/edmondac-rsg/reframe/venv-system/lib64/python3.6/site-packages/reframe/core/pipeline.py", line 2564, in run
    super().run()
  File "/bask/projects/e/edmondac-rsg/reframe/venv-system/lib64/python3.6/site-packages/reframe/core/pipeline.py", line 1998, in run
    self._job.submit()
  File "/bask/projects/e/edmondac-rsg/reframe/venv-system/lib64/python3.6/site-packages/reframe/core/schedulers/__init__.py", line 581, in submit
    return self.scheduler.submit(self)
  File "/bask/projects/e/edmondac-rsg/reframe/venv-system/lib64/python3.6/site-packages/reframe/core/schedulers/slurm.py", line 261, in submit
    rf'({"|".join(self._resubmit_on_errors)})', e.stderr
TypeError: can only join an iterable
```

I am not setting `resubmit_on_errors` and https://reframe-hpc.readthedocs.io/en/stable/config_reference.html#config.systems.partitions.sched_options.resubmit_on_errors says that this should default to `[]`. However, that is not happening. We then see the failure at https://github.com/reframe-hpc/reframe/blob/bacb1aff91852b0a8bee3f58fd6a7b938d7bb87b/reframe/core/schedulers/slurm.py#L260 when the join fails.

Discussion:

Patch:
diff --git a/reframe/schemas/config.json b/reframe/schemas/config.json
index d2bb4551..5128d9bf 100644
--- a/reframe/schemas/config.json
+++ b/reframe/schemas/config.json
@@ -606,9 +606,9 @@
         "systems/partitions/time_limit": null,
         "systems/partitions/devices": [],
         "systems/partitions/extras": {},
-        "{systems,systems/partitions}/sched_options/ignore_reqnodenotavail": false,
-        "{systems,systems/partitions}/sched_options/job_submit_timeout": 60,
-        "{systems,systems/partitions}/sched_options/resubmit_on_errors": [],
-        "{systems,systems/partitions}/sched_options/use_nodes_option": false
+        "systems*/sched_options/ignore_reqnodenotavail": false,
+        "systems*/sched_options/job_submit_timeout": 60,
+        "systems*/sched_options/resubmit_on_errors": [],
+        "systems*/sched_options/use_nodes_option": false
     }
 }


Test patch:
diff --git a/unittests/test_config.py b/unittests/test_config.py
index 442d5120..01bcad21 100644
--- a/unittests/test_config.py
+++ b/unittests/test_config.py
@@ -301,6 +301,12 @@ def test_select_subconfig(site_config):
     assert site_config.get('systems/0/sched_options') == {
         'job_submit_timeout': 10
     }
+    assert site_config.get(
+        'systems/0/sched_options/resubmit_on_errors'
+    ) == []
+    assert site_config.get(
+        'systems/0/partitions/@gpu/sched_options/resubmit_on_errors'
+    ) == []
     assert site_config.get('environments/@PrgEnv-gnu/cc') == 'cc'
     assert site_config.get('environments/1/cxx') == 'CC'
     assert site_config.get('general/0/check_search_path') == ['c:d']