tstclnt "ping" (-q) shouldn't require an NSS database, introduce ping timeout parameter

RESOLVED FIXED in 3.14

Status

NSS
Tools
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: kaie, Assigned: kaie)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
It should be possible to use the

  -q  :  "ping to tcp/ip port"

feature of tstclnt without having to provice an NSS database.

(This will simplify some new test automation I'm going to propose.)
(Assignee)

Comment 1

6 years ago
Created attachment 617491 [details] [diff] [review]
Patch v1

This patch simply:

- moves the NSS init code further down

- removes the unnecessary NSS shutdown inside the "ping and exit" code
  (because with the above move of code, we haven't initialized yet).
Assignee: nobody → kaie
Attachment #617491 - Flags: review?(rrelyea)
(Assignee)

Updated

6 years ago
Summary: tstclnt "ping" (-q) should not require an NSS database → tstclnt "ping" (-q) shouldn't require an NSS database
(Assignee)

Updated

6 years ago
Blocks: 741873
(Assignee)

Comment 2

6 years ago
Comment on attachment 617491 [details] [diff] [review]
Patch v1

I'll also need a configurable timeout parameter, so let's postpone this change until I have a new patch.
Attachment #617491 - Attachment is obsolete: true
Attachment #617491 - Flags: review?(rrelyea)
(Assignee)

Updated

6 years ago
Summary: tstclnt "ping" (-q) shouldn't require an NSS database → tstclnt "ping" (-q) shouldn't require an NSS database, introduce ping timeout parameter
(Assignee)

Comment 3

6 years ago
Created attachment 617508 [details] [diff] [review]
Patch v2
Attachment #617508 - Flags: review?(rrelyea)
(Assignee)

Comment 4

6 years ago
Comment on attachment 617508 [details] [diff] [review]
Patch v2

sigh. not as simple as that, because of the retry loop...
(patch worked with iptables -j DROP, but still blocks with -j REJECT)
Attachment #617508 - Flags: review?(rrelyea) → review-
(Assignee)

Comment 5

6 years ago
Created attachment 617516 [details] [diff] [review]
Patch v3
Attachment #617508 - Attachment is obsolete: true
Attachment #617516 - Flags: review?(rrelyea)

Comment 6

6 years ago
Comment on attachment 617516 [details] [diff] [review]
Patch v3

r+ rrelyea.

I noticed the original code is not calling PR_Cleanup() on the error paths. This is probably because the error paths aren't tested when doing mem-leak testing (which is the only reason to call PR_Cleanup() before closing.

bob
Attachment #617516 - Flags: review?(rrelyea) → review+
(Assignee)

Comment 7

6 years ago
Checking in tstclnt/tstclnt.c;
/cvsroot/mozilla/security/nss/cmd/tstclnt/tstclnt.c,v  <--  tstclnt.c
new revision: 1.71; previous revision: 1.70
done
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.14
You need to log in before you can comment on or make changes to this bug.