nspr tests using fixed tmp file names fail on Windows Mobile

RESOLVED WONTFIX

Status

NSPR
NSPR
RESOLVED WONTFIX
8 years ago
7 years ago

People

(Reporter: alexp, Assigned: alexp)

Tracking

4.8.4
ARM
Windows Mobile 6 Professional

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

8 years ago
nsprpub/pr/tests/append.c fails on a temp file creation.
(Assignee)

Comment 1

8 years ago
Created attachment 429628 [details] [diff] [review]
Fix the temp file location
Attachment #429628 - Flags: review?(bugmail)
(Assignee)

Comment 2

8 years ago
Created attachment 429629 [details] [diff] [review]
Fix the temp file location

Missed the "const".
Attachment #429628 - Attachment is obsolete: true
Attachment #429629 - Flags: review?(bugmail)
Attachment #429628 - Flags: review?(bugmail)
not to over engineer this, but its probably more robust to do something like this:
http://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/tests/testfile.c#957

I think its safe to default to /tmp for *nix, but on win32 we should use GetTempPath.
Assignee: nobody → wtc
Component: General → NSPR
Product: Core → NSPR
QA Contact: general → nspr
Version: Trunk → 4.8.4
(Assignee)

Comment 4

8 years ago
(In reply to comment #3)
> I think its safe to default to /tmp for *nix, but on win32 we should use
> GetTempPath.

We can do this, though it won't make a big difference, as the other tests
create a bunch of files and dirs in the root folder anyway.
we also need a similar fix in nameshm1.c.  Can you put together one patch that fixes all of them?
(Assignee)

Comment 6

8 years ago
sem* tests also use a fixed /tmp/* file name.
(Assignee)

Updated

8 years ago
Summary: append nspr test fails on Windows Mobile → nspr tests using fixed tmp file names fail on Windows Mobile
(Assignee)

Updated

8 years ago
Assignee: wtc → alexp
(Assignee)

Comment 7

8 years ago
Created attachment 430760 [details] [diff] [review]
append patch v3

This is a patch using GetTempPath() for append test only.
If it's OK, I'll propagate it to the other tests.

It would make sense to move this new GetFullTempFileName() function to a separate header and include it in the other tests. I'm not sure though if it's the way to go, as such approach for the common code was not used in nspr tests before, even though they do have some functionality, which could be shared.
So any suggestions are welcome.
Attachment #429629 - Attachment is obsolete: true
Attachment #430760 - Flags: review?(bugmail)
Attachment #429629 - Flags: review?(bugmail)
(Assignee)

Updated

8 years ago
Status: NEW → ASSIGNED
Comment on attachment 430760 [details] [diff] [review]
append patch v3

per irc, alex is going to move this logic to a header so it can be shared by all tests.

Wan-Teh, if you have any objections or suggestions here, let me know.
Attachment #430760 - Flags: review?(bugmail)
(Assignee)

Updated

7 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.