Skip to content

Commit 569d75a

Browse files
Fix HTTP integration tests under parallel ctest execution.
Give each HTTP fixture its own macaroons secret, move httpparserlegacy off port 7096 to avoid clashing with cache, and harden teardown cleanup. Assisted-by: Cursor:Composer-2.5 CursorAI Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 739c136 commit 569d75a

8 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/XrdHttp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ ctest -R 'XRootD::(http|httpparser|httph2)' --output-on-failure
205205
|------------|--------|------|----------|
206206
| `XRootD::http` | `tests/XRootD/http.sh` | 7094 | Full HTTP/1.1 integration |
207207
| `XRootD::httpparser` | `tests/XRootD/httpparser.sh` | 7095 | llhttp header parsing |
208-
| `XRootD::httpparserlegacy` | `tests/XRootD/httpparserlegacy.sh` | 7096 | Legacy line parser regression |
208+
| `XRootD::httpparserlegacy` | `tests/XRootD/httpparserlegacy.sh` | 7098 | Legacy line parser regression |
209209
| `XRootD::httph2` | `tests/XRootD/httph2.sh` | 7097 | HTTPS + ALPN h2 (GET/PUT/HEAD/DELETE, same-connection reuse) |
210210

211211
## Source layout

src/XrdHttp/wire/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ cmake .. -DENABLE_HTTP=ON
3636
## Tests
3737

3838
- `tests/XRootD/httpparser` — llhttp smoke tests (port 7095)
39-
- `tests/XRootD/httpparserlegacy` — legacy parser regression (port 7096)
39+
- `tests/XRootD/httpparserlegacy` — legacy parser regression (port 7098)
4040
- `tests/XRootD/http` — full HTTP/1.1 integration suite (port 7094)
4141
- `tests/XRootD/httph2` — HTTPS + ALPN h2 smoke tests (port 7097, TLS fixture)

tests/XRootD/http.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ofs.authlib libXrdMacaroons.so
1919
http.header2cgi Authorization authz strip-on-redirect
2020
http.exthandler xrdtpc libXrdHttpTPC.so
2121
http.exthandler xrdmacaroons libXrdMacaroons.so
22-
macaroons.secretkey $pwd/macaroons-secret
22+
macaroons.secretkey $pwd/$name/macaroons-secret
2323

2424
xrootd.mongstream http use flush 3s send json 127.0.0.1:8888
2525

tests/XRootD/http.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export XRD_PLUGINCONFDIR="${BINARY_DIR}/config"
44

55
function setup_http() {
66
require_commands openssl curl
7-
openssl rand -base64 -out macaroons-secret 64
7+
openssl rand -base64 -out "${NAME}/macaroons-secret" 64
88
mkdir -p "${XRD_PLUGINCONFDIR}"
99
cat >| "${XRD_PLUGINCONFDIR}/http.conf" <<-EOF
1010
url = http://*;https://*;dav://*;davs://*
@@ -14,9 +14,9 @@ function setup_http() {
1414
}
1515

1616
function teardown_http() {
17-
rm "${XRD_PLUGINCONFDIR}/http.conf"
18-
rmdir "${XRD_PLUGINCONFDIR}"
19-
rm macaroons-secret
17+
rm -f "${XRD_PLUGINCONFDIR}/http.conf"
18+
rmdir "${XRD_PLUGINCONFDIR}" 2>/dev/null || true
19+
rm -f "${NAME}/macaroons-secret"
2020
}
2121

2222
function test_http() {

tests/XRootD/httpparser.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ofs.authlib libXrdMacaroons.so
1515
http.header2cgi Authorization authz strip-on-redirect
1616
http.exthandler xrdtpc libXrdHttpTPC.so
1717
http.exthandler xrdmacaroons libXrdMacaroons.so
18-
macaroons.secretkey $pwd/macaroons-secret
18+
macaroons.secretkey $pwd/$name/macaroons-secret
1919

2020
http.staticheader -verb=OPTIONS Access-Control-Allow-Origin *
2121
http.staticheader Test 1

tests/XRootD/httpparser.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
function setup_httpparser() {
44
require_commands openssl curl
5-
openssl rand -base64 -out macaroons-secret 64
5+
openssl rand -base64 -out "${NAME}/macaroons-secret" 64
66
}
77

88
function teardown_httpparser() {
9-
rm -f macaroons-secret
9+
rm -f "${NAME}/macaroons-secret"
1010
}
1111

1212
function test_httpparser() {

tests/XRootD/httpparserlegacy.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set name = httpparserlegacy
2-
set port = 7096
2+
set port = 7098
33

44
set pwd = $PWD
55
set src = $SOURCE_DIR
@@ -15,6 +15,6 @@ ofs.authlib libXrdMacaroons.so
1515
http.header2cgi Authorization authz strip-on-redirect
1616
http.exthandler xrdtpc libXrdHttpTPC.so
1717
http.exthandler xrdmacaroons libXrdMacaroons.so
18-
macaroons.secretkey $pwd/macaroons-secret
18+
macaroons.secretkey $pwd/$name/macaroons-secret
1919

2020
continue $src/common.cfg

tests/XRootD/httpparserlegacy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
function setup_httpparserlegacy() {
44
require_commands openssl curl
5-
openssl rand -base64 -out macaroons-secret 64
5+
openssl rand -base64 -out "${NAME}/macaroons-secret" 64
66
}
77

88
function teardown_httpparserlegacy() {
9-
rm -f macaroons-secret
9+
rm -f "${NAME}/macaroons-secret"
1010
}
1111

1212
function test_httpparserlegacy() {

0 commit comments

Comments
 (0)