Closed Bug 1575821 Opened 1 year ago Closed 1 year ago

pr/tests/attach.c:170:2: error: unterminated conditional directive

Categories

(NSPR :: NSPR, defect)

4.22
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jbeich, Assigned: Usul)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

$ cc --version
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

$ ./configure; gmake -sj8; gmake -sj8 -C lib/tests; gmake -sj8 -C pr/tests
attach.c:170:2: error: unterminated conditional directive
#ifdef _PR_PTHREADS
 ^
attach.c:275:2: error: expected '}'
}
 ^
attach.c:109:1: note: to match this '{'
{
^
attach.c:176:8: error: use of undeclared label 'exit_now'
                goto exit_now;
                     ^
nonblock.c:44:57: error: use of undeclared identifier 'UNIT_TIME'
    PRIntervalTime unitTime = PR_MillisecondsToInterval(UNIT_TIME);
                                                        ^
nonblock.c:117:57: error: use of undeclared identifier 'UNIT_TIME'
    PRIntervalTime unitTime = PR_MillisecondsToInterval(UNIT_TIME);
                                                        ^
stack.c:56:22: error: expected end of line in preprocessor expression
#if defined(__WINS__))
                     ^
testfile.c:78:2: error: #endif without #if
#endif
 ^
Attached patch 1575821.patch (obsolete) — Splinter Review

Looks like I cleaned up and #else #endif too much in https://phabricator.services.mozilla.com/D24708#change-9ZG7lYM4ZRsr

Does it work with the attached patch ?

Assignee: nobody → ludovic
Flags: needinfo?(jbeich)

(In reply to Ludovic Hirlimann [:Usul] from comment #3)

Does it work with the attached patch ?

No, there're more such typos. comment 0 was edited to document all errors.

Flags: needinfo?(jbeich)
Attached patch 1575821_2.patch (obsolete) — Splinter Review

I think This fixes everything you are seeing - I'm sorry I don't have a freebsd box for testing, can you let me know if this fixes everything?

Attachment #9087371 - Attachment is obsolete: true
Flags: needinfo?(jbeich)

(In reply to Ludovic Hirlimann [:Usul] from comment #5)

I think This fixes everything you are seeing

Looks same as v1.

I'm sorry I don't have a freebsd box for testing, can you let me know if this fixes everything?

Can you try to build tests on Linux or macOS? There's nothing FreeBSD-specific about these errors.

Flags: needinfo?(jbeich)
Attached patch 1575821_2.patch (obsolete) — Splinter Review

of course, I should be diffing the dir, not a file :(

Attachment #9087377 - Attachment is obsolete: true
Comment on attachment 9087391 [details] [diff] [review]
1575821_2.patch

Still missing a typo mentioned in comment 0:
```c
testfile.c:78:2: error: #endif without #if
#endif
 ^
```
Attachment #9087391 - Flags: feedback-
Attached patch v1Splinter Review

Here's what I had in mind (except for #else in attach.c) before you've assigned the bug.

Kai, what value tests provide given they're not routinely built/run on Tier1 platforms?

Attachment #9087391 - Attachment is obsolete: true
Attachment #9087671 - Flags: review?(kaie)
Comment on attachment 9087671 [details] [diff] [review]
v1

patch allows me to build & run tests on OpenBSD/amd64 w/ 4.22.
Attachment #9087671 - Flags: feedback+

(In reply to Jan Beich from comment #9)

Kai, what value tests provide given they're not routinely built/run on Tier1 platforms?

Very little... I had started to get them enabled in bug 1385061 and bug 1385039 but there's just always too much work waiting to be done.

Comment on attachment 9087671 [details] [diff] [review]
v1

allows me to build on Linux, too.
Attachment #9087671 - Flags: review?(kaie) → review+
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 4.23
You need to log in before you can comment on or make changes to this bug.