Closed Bug 1694521 Opened 5 years ago Closed 5 years ago

Clean up test_trr.js

Categories

(Core :: Networking: DNS, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: nhnt11, Assigned: nhnt11)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(5 files, 1 obsolete file)

This test is huge and has many possibilities for cleanup and de-duplication.

  1. Moved some setup stuff to head.js
  2. Removed dumps
  3. Changed comments to info()s at the beginning of tests
  4. Combined some related tests.
  5. Added helper to set TRR mode and uri
  6. Some de-duplication when needing to do a test for different modes (more to be done)
  7. Added some comments where missing, e.g. linking a bug
  8. Gave all test functions good names
  9. Made dns-cname endpoint automatically cycle states instead of waiting to reset
Attachment #9204992 - Attachment description: Bug 1694521 - Clean up test_trr.js - part 1. → Bug 1694521 - Part 1: Clean up test_trr.js. r=valentin!
Attachment #9205240 - Attachment description: Bug 1694521 - Part 2: combine cname tests and simplify mode 1 and 4 tests. r=valentin! → Bug 1694521 - Part 2: unify confirmation and cname tests and simplify mode 1 and 4 tests. r=valentin!
Attachment #9205241 - Attachment description: Bug 1694521 - Part 3: save stack trace sync'ly and dump it when asserting in DNSListener. r=valentin! → Bug 1694521 - Part 3: Adapt TRRDNSListener in head_trr.js for use in test_trr.js. r=valentin!

The wait-for-A-and-AAAA and early-AAAA prefs were removed.

Depends on D106215

Pushed by nhnt11@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2cbdf93337fe Part 1: Clean up test_trr.js. r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/bb7f09af9a68 Part 2: unify confirmation and cname tests and simplify mode 1 and 4 tests. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/e1eb73d967f9 Part 3: Adapt TRRDNSListener in head_trr.js for use in test_trr.js. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/8bdbbb7e590e Part 4: In test_trr_flags, check that the channel actually used TRR if possible. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/0a83b1b7d78b Part 5: Clean up test_AAAA_records. r=valentin,necko-reviewers
Flags: needinfo?(nhnt11)
Pushed by nhnt11@gmail.com: https://hg.mozilla.org/integration/autoland/rev/605a5ce59dd7 Part 1: Clean up test_trr.js. r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/b91e0a2caf42 Part 2: unify confirmation and cname tests and simplify mode 1 and 4 tests. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/b3591788658c Part 3: Adapt TRRDNSListener in head_trr.js for use in test_trr.js. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/6248905f1783 Part 4: In test_trr_flags, check that the channel actually used TRR if possible. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/706062287f0f Part 5: Clean up test_AAAA_records. r=valentin,necko-reviewers

Backed out for causing xpc failures in netwerk/test/unit/test_partial_response_entry_size_smart_shrink.js

Backout link: https://hg.mozilla.org/integration/autoland/rev/f27b259301d1dd4f4e242ed59876e1fdbf741372

Push with failures

Failure log

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:valentin, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(valentin.gosu)
Flags: needinfo?(nhnt11)
Pushed by nhnt11@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c8f117ae9339 Part 1: Clean up test_trr.js. r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/bac1e7636cea Part 2: unify confirmation and cname tests and simplify mode 1 and 4 tests. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/d583fb117af4 Part 3: Adapt TRRDNSListener in head_trr.js for use in test_trr.js. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/3ca672212d45 Part 4: In test_trr_flags, check that the channel actually used TRR if possible. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/bce9de43b16f Part 5: Clean up test_AAAA_records. r=valentin,necko-reviewers

Backed out for causing xpc failures in netwerk/test/unit/test_trr.js

Backout link: https://hg.mozilla.org/integration/autoland/rev/9388ed37dcce5adf76715096bf6b2bb3b877959d

Push with failures

Failure log

INFO - TEST-START | security/manager/ssl/tests/unit/test_validity.js
[task 2021-03-21T01:50:55.766Z] 01:50:55 INFO - TEST-PASS | security/manager/ssl/tests/unit/test_validity.js | took 303ms
[task 2021-03-21T01:50:55.769Z] 01:50:55 INFO - Retrying tests that failed when run in parallel.
[task 2021-03-21T01:50:55.773Z] 01:50:55 INFO - TEST-START | netwerk/test/unit/test_trr.js
[task 2021-03-21T01:50:55.995Z] 01:50:55 WARNING - TEST-UNEXPECTED-FAIL | netwerk/test/unit/test_trr.js | xpcshell return code: 0
[task 2021-03-21T01:50:55.995Z] 01:50:55 INFO - TEST-INFO took 214ms
[task 2021-03-21T01:50:55.995Z] 01:50:55 INFO - >>>>>>>
[task 2021-03-21T01:50:55.995Z] 01:50:55 INFO - PID 15985 | start!

In the refactored test_trr_flags, we test that a channel that has
TRR mode = 2 uses TRR when global mode is 0. test_trr.js sets
confirmationNS = "skip" for most tests, which results in Enabled()
returning false without this patch, since mMode is 0 and we end up
setting CONFIRM_OFF.

Attachment #9210574 - Attachment is obsolete: true
Depends on: 1699998
Pushed by nhnt11@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0f61c91a9086 Part 1: Clean up test_trr.js. r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/b274e5a637f2 Part 2: unify confirmation and cname tests and simplify mode 1 and 4 tests. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/bddb73e3b4b6 Part 3: Adapt TRRDNSListener in head_trr.js for use in test_trr.js. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/01dde5f01ffb Part 4: In test_trr_flags, check that the channel actually used TRR if possible. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/f91d9c87bed7 Part 5: Clean up test_AAAA_records. r=valentin,necko-reviewers
Flags: needinfo?(valentin.gosu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: