config/tests: fix test failure in "/config/set-values"

GKeyfile changed something about how to handle invalid escape sequences.
As we don't want to test GKeyfile (per-se), just adjust to test to not
hit the problem.

This would fail with glib2-2.79.1-1.fc40:

  # ./tools/run-nm-test.sh -m src/core/tests/config/test-config -p /config/set-values
  TAP version 13
  # random seed: R02Sb8afff1ec38ca5a1b7713e8c40eb4f56
  # Start of config tests
  # GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ?gio-vfs?
  # (src/core/tests/config/test-config.c:1107) invalid value in config-data .intern.with-whitespace.key2 = (null) (instead of " b c\,  d  ")
  ./tools/run-nm-test.sh: line 307: 245847 Trace/breakpoint trap   (core dumped) "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "${TEST_ARGV[@]}"
  exec "src/core/tests/config/test-config" failed with exit code 133
This commit is contained in:
Thomas Haller 2024-02-07 15:54:08 +01:00 committed by Íñigo Huguet
parent ced0cf8005
commit 7f2a32fa11

View file

@ -1076,7 +1076,7 @@ _set_values_intern_atomic_section_2_set(NMConfig *config,
g_key_file_set_value(keyfile,
NM_CONFIG_KEYFILE_GROUPPREFIX_INTERN "with-whitespace",
"key2",
" b c\\, d ");
" b c\\\\, d ");
*out_expected_changes = NM_CONFIG_CHANGE_CAUSE_SET_VALUES | NM_CONFIG_CHANGE_VALUES
| NM_CONFIG_CHANGE_VALUES_INTERN;
}