From 5b87b4edf9a4a0b7f5fbacb6e8ef5387674f53de Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 28 Aug 2024 11:01:26 +0200 Subject: [PATCH] test1013.pl: require case match for features, order match for protos, fix issue Update the script for test 1013 and 1014 to require: - case-sensitive match for the curl feature list. (Continue to allow case-difference for protocols. They've always been in uppercase within curl config.) - matching order for the protocol list. (Continue to allow any order for features. autotools builds on platforms without `sort -f` need it. E.g. Old Linux CI) Also: - fix casing of the `gsasl` feature in `configure`, to match `curl -V` and cmake. - delete obsolete comment. Closes #14706 --- configure.ac | 2 +- tests/libtest/test1013.pl | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0b3dc86052..2488029412 100644 --- a/configure.ac +++ b/configure.ac @@ -4938,7 +4938,7 @@ if test "x$curl_psl_msg" = "xenabled"; then fi if test "x$curl_gsasl_msg" = "xenabled"; then - SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL" + SUPPORT_FEATURES="$SUPPORT_FEATURES gsasl" fi if test "x$enable_altsvc" = "xyes"; then diff --git a/tests/libtest/test1013.pl b/tests/libtest/test1013.pl index 9ae7723a21..6d10a3223a 100755 --- a/tests/libtest/test1013.pl +++ b/tests/libtest/test1013.pl @@ -37,14 +37,13 @@ my $curl_protocols=""; open(CURL, "$ARGV[1]") || die "Can't get curl $what list\n"; while( ) { - $curl_protocols = lc($_) if ( /$what:/i ); + $curl_protocols = $_ if ( /$what:/i ); } close CURL; $curl_protocols =~ s/\r//; $curl_protocols =~ /\w+: (.*)$/; @curl = split / /,$1; -@curl = sort @curl; # Read the output of curl-config my @curl_config; @@ -52,12 +51,16 @@ open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config $what lis while( ) { chomp; - # ignore curl-config --features not in curl's feature list - push @curl_config, lc($_); + $_ = lc($_) if($what eq "protocols"); # accept uppercase protocols in curl-config + push @curl_config, $_; } close CURLCONFIG; -@curl_config = sort @curl_config; +# allow order mismatch to handle autotools builds with no 'sort -f' available +if($what eq "features") { + @curl = sort @curl; + @curl_config = sort @curl_config; +} my $curlproto = join ' ', @curl; my $curlconfigproto = join ' ', @curl_config; -- 2.47.3