From: Alan T. DeKok Date: Tue, 5 Sep 2023 18:59:28 +0000 (-0400) Subject: this is now nested X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5407c3a9b996e075e6d31de5cbf809993da138f;p=thirdparty%2Ffreeradius-server.git this is now nested --- diff --git a/src/tests/keywords/all.mk b/src/tests/keywords/all.mk index 4ee5a441aff..f42f0020881 100644 --- a/src/tests/keywords/all.mk +++ b/src/tests/keywords/all.mk @@ -70,9 +70,6 @@ KEYWORD_UPDATE_TESTS := update-attr-ref-null update-error-3 update-group-error u # Tests for rewriting "udpate" KEYWORD_UPDATE_REWRITE_TESTS := update-all update-array update-delete update-remove-any update-group update-hex update-remove-value update-index update-list-error update-remove-list update-prepend unknown-update update-error update-error-2 update-exec-error update-list-null-rhs update-exec -# the protocol decoder puts the attributes into a flat namespace -KEYWORD_UPDATE_TMPL_TESTS := xlat-dhcpv4 - # # Migration support. Some of the tests don't run under the new # conditions, so we don't run them under the new conditions. @@ -83,15 +80,16 @@ $(OUTPUT)/${1}: NEW_COND= else ifneq "$(findstring ${1}, $(KEYWORD_UPDATE_REWRITE_TESTS))" "" $(OUTPUT)/${1}: NEW_COND=-S rewrite_update=yes -S tmpl_tokenize_all_nested=yes -else ifneq "$(findstring ${1}, $(KEYWORD_UPDATE_TMPL_TESTS))" "" -$(OUTPUT)/${1}: NEW_COND=-S forbid_update=yes - else $(OUTPUT)/${1}: NEW_COND=-S forbid_update=yes -S tmpl_tokenize_all_nested=yes -S pair_legacy_nested=true ifeq "${1}" "mschap" $(OUTPUT)/${1}: $(BUILD_DIR)/lib/rlm_mschap.la endif + +ifeq "${1}" "xlat-dhcpv4" +$(OUTPUT)/${1}: $(BUILD_DIR)/lib/libfreeradius-dhcpv4.la +endif endif endef diff --git a/src/tests/keywords/xlat-dhcpv4 b/src/tests/keywords/xlat-dhcpv4 index eb88cd843fe..3ec811659a4 100644 --- a/src/tests/keywords/xlat-dhcpv4 +++ b/src/tests/keywords/xlat-dhcpv4 @@ -5,15 +5,15 @@ &Tmp-Octets-0 := 0x520d0103abcdef0206010203040506 # the protocol decoder puts the attributes into a flat namespace -if (!("%(dhcpv4.decode:%{Tmp-Octets-0})" == 2)) { +if (!("%(dhcpv4.decode:%{Tmp-Octets-0})" == 1)) { test_fail } -if (!(&Relay-Agent-Information.Circuit-Id == 0xabcdef)) { +if !(&Relay-Agent-Information.Circuit-Id == 0xabcdef) { test_fail } -if (!(&Relay-Agent-Information.Remote-Id == 0x010203040506)) { +if !(&Relay-Agent-Information.Remote-Id == 0x010203040506) { test_fail }