Closed Bug 1247052 Opened 4 years ago Closed 4 years ago

Improper outdated octal constant syntax in mailnews/compose/test/unit/test_bug235432.js

Categories

(Thunderbird :: Testing Infrastructure, defect)

defect
Not set

Tracking

(thunderbird46 fixed, thunderbird47 fixed)

RESOLVED FIXED
Thunderbird 47.0
Tracking Status
thunderbird46 --- fixed
thunderbird47 --- fixed

People

(Reporter: ishikawa, Assigned: ishikawa)

References

Details

Attachments

(1 file)

File mailnews/compose/test/unit/test_bug235432.js
has an outdated octal constant format on line 80 0600 as opposed to proper 0o600 

This results in warning/syntax error during C-C TB's xpcshell-tests run.

This should be fixed to remove any clutter from the log.
Assignee: nobody → ishikawa
Here is the patch.

BTW, the warning shows up in the log of Windows exceution run of xpcshell-tests on try-comm-central as follows: very verbose.

08:12:12     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "SyntaxError: octal literals and octal escape sequences are deprecated" {file: "C:/slave/test/build/tests/xpcshell/tests/mailnews/compose/test/unit/test_bug235432.js" line: 80 column: 51 source: "    file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
08:12:12     INFO -  "}]"
08:12:12     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "SyntaxError: octal literals and octal escape sequences are deprecated" {file: "C:/slave/test/build/tests/xpcshell/tests/mailnews/compose/test/unit/test_bug235432.js" line: 80 column: 51 source: "    file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
08:12:12     INFO -  "}]"
08:12:12     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "SyntaxError: octal literals and octal escape sequences are deprecated" {file: "C:/slave/test/build/tests/xpcshell/tests/mailnews/compose/test/unit/test_bug235432.js" line: 80 column: 51 source: "    file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
Attachment #8717601 - Flags: review?(standard8)
Comment on attachment 8717601 [details] [diff] [review]
Use proper octal constant syntax.

Sorry, I'm no long actively working on Thunderbird.
Attachment #8717601 - Flags: review?(standard8) → review?(Pidgeot18)
Comment on attachment 8717601 [details] [diff] [review]
Use proper octal constant syntax.

Review of attachment 8717601 [details] [diff] [review]:
-----------------------------------------------------------------

Stealing this trivial review.

This is fine (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates)

There are a few other places this occurs in tests, you might fix those as well, preferably in a single bug.
Attachment #8717601 - Flags: review?(Pidgeot18) → review+
OK I will o(In reply to Mark Banner (:standard8) from comment #2)
> Comment on attachment 8717601 [details] [diff] [review]
> Use proper octal constant syntax.
> 
> Sorry, I'm no long actively working on Thunderbird.

Sorry, you name came on the recommeded reviewer list and you had the smallest # of review requests. I bear this in mind, though, in the future.

(In reply to Kent James (:rkent) from comment #3)
> Comment on attachment 8717601 [details] [diff] [review]
> Use proper octal constant syntax.
> 
> Review of attachment 8717601 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Stealing this trivial review.
> 
> This is fine
> (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/
> Numbers_and_dates)
> 
> There are a few other places this occurs in tests, you might fix those as
> well, preferably in a single bug.

I will look for them and creates a one patch, then.
spcshell-test(s) only print the logs when a unit test fails. So there are probably 
many instances, but testers were not aware of the improper syntax before
because the logs were not printed at all.


TIA
I am creating another bugzilla for the fixing of other usages in the tree.
I would put a coule of patches there: one for C-C portion and the other for M-C portion.

I am putting checkin-needed keyword for this entry.
Keywords: checkin-needed
Blocks: 1247368
https://hg.mozilla.org/comm-central/rev/fe0300249b7d125c87448b522c178c539aefaadb
Bug 1247052 - Use proper octal constant syntax in test_bug235432.js. r=rkent
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
Comment on attachment 8717601 [details] [diff] [review]
Use proper octal constant syntax.

This is the perfect patch to push to Aurora (TB 46) to get the build there going (since I foolishly had checked in some stuff with DONTBUILD).
https://hg.mozilla.org/releases/comm-aurora/rev/6853aa433495
It does absolutely no harm. Sorry guys to hijack this for my purposes ;-)
Attachment #8717601 - Flags: approval-comm-aurora+
Jorg, you need the self-service build page to allow you to start builds:

https://secure.pub.build.mozilla.org/buildapi/self-serve

If you don't have permissions for that, file a bug asking for them.
Thanks, I do have permissions for that page, the normal LDAP permissions suffice. However, what do I do? At the bottom the page says:
Create new dep builds on comm-aurora revision
Create new PGO builds on comm-aurora revision
Create new nightly builds on comm-aurora revision
The three lines have an input field and a "Submit" button.
So I enter the revision I want in the last line for the nightly build and press submit?
(In reply to Jorg K (GMT+1) from comment #9)

> So I enter the revision I want in the last line for the nightly build and
> press submit?

Basically, yes. Starting a job is also very low impact, so don't be afraid to try things.
Blocks: 1248252
No longer blocks: 1248252
Cancelling checkin-needed as this already landed on comm-aurora.
Keywords: checkin-needed
checkin-needed is for comm-central. It was landed there, see comment #6. Aurora landing in comment #7.
You need to log in before you can comment on or make changes to this bug.