addFile: Error checking not made on jarsrc parameter

VERIFIED FIXED

Status

P3
normal
VERIFIED FIXED
19 years ago
3 years ago

People

(Reporter: jimmykenlee, Assigned: dveditz)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
Build: 2000-01-31-11-M14(WIN), 2000-01-31-11-M14(MAC), 2000-01-31-14-M14(LINUX)

1. From http://jimbob/trigger2.html, enter f_dtype_addfile_jarsrc.xpi in first
   field and click Trigger button

////////////////////////////////////////////////////////////////////////////////
// f_dtype_addfile_jarsrc.js
// 
// Functional test
// 	• This test checks different data types for the jarSrc parameter for all 
//        forms of addFile()
//
// ~ XPInstall QA
//   January 31, 2000
//
////////////////////////////////////////////////////////////////////////////////

var regName = "regName";
var jarSrc = "smrtupdt.txt";
vi = "1.1.1.1";
var vi2 = new InstallVersion();
vi2.init("2.2.2.2");
valueArrayObject = new Array();
typeArrayObject = new Array();
typeArrayObject[0] = "null";
typeArrayObject[1] = "boolean-true";
typeArrayObject[2] = "boolean-false";
typeArrayObject[3] = "integer";
typeArrayObject[4] = "decimal";
typeArrayObject[5] = "string";
typeArrayObject[6] = "object";


function addFile1(tvalue, dtype) {
	
	err1 = addFile(tvalue);
	logComment("addFile1--" + dtype + " --jarSrc returned " + err1);
}

function addFile4(tvalue, dtype) {
	
	err2 = addFile(regName, tvalue, f, "addFile4_jarSrc_" + dtype + ".txt");
	logComment("addFile4--" + dtype + " --jarSrc returned " + err2);
}

function addFile5s(tvalue, dtype) {
	
	err3 = addFile(regName, vi, tvalue, f, "addFile5s_jarSrc_" + dtype + 
".txt");
	logComment("addFile5s--" + dtype + " --jarSrc returned " + err3);
}

function addFile5v(tvalue, dtype) {
	
	err4 = addFile(regName, vi2, tvalue, f, "addFile5v_jarSrc_" + dtype + 
".txt");
	logComment("addFile5v--" + dtype + " --jarSrc returned " + err4);
}

function addFile6s(tvalue, dtype) {
	
	err5 = addFile(regName, vi, tvalue, f, "addFile6s_jarSrc_" + dtype + 
".txt", true);
	logComment("addFile6s--" + dtype + " --jarSrc returned " + err5);
}

function addFile6v(tvalue, dtype) {
	
	err6 = addFile(regName, vi2, tvalue, f, "addFile6v_jarSrc_" + dtype + 
".txt", false);
	logComment("addFile6v--" + dtype + " --jarSrc returned " + err6);
}

//********************************MAIN********************************

startInstall("Functional: f_dtype_addfile_jarSrc", "dtype_addfile_jarSrc", vi, 
1);
f = getFolder("Program", "dtype_afile_jarSrc");

valueArrayObject[0] = null;		//null
valueArrayObject[1] = true;		//boolean-true
valueArrayObject[2] = false;		//boolean-false
valueArrayObject[3] = 7;		//integer
valueArrayObject[4] = 8.53;		//decimal
valueArrayObject[5] = "SimpleString";	//string
valueArrayObject[6] = f;		//object

for (var i = 0; i < 7; i++) {

	setPackageFolder(f);
	addFile1(valueArrayObject[i], typeArrayObject[i]);
	addFile4(valueArrayObject[i], typeArrayObject[i]);
	addFile5s(valueArrayObject[i], typeArrayObject[i]);
	addFile5v(valueArrayObject[i], typeArrayObject[i]);
	addFile6s(valueArrayObject[i], typeArrayObject[i]);
	addFile6v(valueArrayObject[i], typeArrayObject[i]);
}

if (0 == getLastError())
	finalizeInstall();
else
	abortInstall();

RESULT:
No information is written to the Netscape registry as expected.  A folder 
dtype_afile_jarSrc is created with several 0KB files.  The Install.log shows the 
following:

-------------------------------------------------------------------------------
http://jimbob/jars/f_dtype_addfile_jarsrc.xpi  --  01/31/2000 17:01:14
-------------------------------------------------------------------------------

     Functional: f_dtype_addfile_jarSrc
     ----------------------------------

     ** addFile1--null --jarSrc returned -208
     ** addFile4--null --jarSrc returned -208
     ** addFile5s--null --jarSrc returned -208
     ** addFile5v--null --jarSrc returned -208
     ** addFile6s--null --jarSrc returned -208
     ** addFile6v--null --jarSrc returned -208
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\true
     ** addFile1--boolean-true --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile4_jarSrc_boolean-true.txt
     ** addFile4--boolean-true --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5s_jarSrc_boolean-true.txt
     ** addFile5s--boolean-true --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5v_jarSrc_boolean-true.txt
     ** addFile5v--boolean-true --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6s_jarSrc_boolean-true.txt
     ** addFile6s--boolean-true --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6v_jarSrc_boolean-true.txt
     ** addFile6v--boolean-true --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\false
     ** addFile1--boolean-false --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile4_jarSrc_boolean-false.txt
     ** addFile4--boolean-false --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5s_jarSrc_boolean-false.txt
     ** addFile5s--boolean-false --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5v_jarSrc_boolean-false.txt
     ** addFile5v--boolean-false --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6s_jarSrc_boolean-false.txt
     ** addFile6s--boolean-false --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6v_jarSrc_boolean-false.txt
     ** addFile6v--boolean-false --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program Files\moz131\dtype_afile_jarSrc\7
     ** addFile1--integer --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile4_jarSrc_integer.txt
     ** addFile4--integer --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5s_jarSrc_integer.txt
     ** addFile5s--integer --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5v_jarSrc_integer.txt
     ** addFile5v--integer --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6s_jarSrc_integer.txt
     ** addFile6s--integer --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6v_jarSrc_integer.txt
     ** addFile6v--integer --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\8.53
     ** addFile1--decimal --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile4_jarSrc_decimal.txt
     ** addFile4--decimal --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5s_jarSrc_decimal.txt
     ** addFile5s--decimal --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5v_jarSrc_decimal.txt
     ** addFile5v--decimal --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6s_jarSrc_decimal.txt
     ** addFile6s--decimal --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6v_jarSrc_decimal.txt
     ** addFile6v--decimal --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\SimpleString
     ** addFile1--string --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile4_jarSrc_string.txt
     ** addFile4--string --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5s_jarSrc_string.txt
     ** addFile5s--string --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5v_jarSrc_string.txt
     ** addFile5v--string --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6s_jarSrc_string.txt
     ** addFile6s--string --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6v_jarSrc_string.txt
     ** addFile6v--string --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\C:\Program Files\moz131\dtype_afile_jarSrc\
     ** addFile1--object --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile4_jarSrc_object.txt
     ** addFile4--object --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5s_jarSrc_object.txt
     ** addFile5s--object --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile5v_jarSrc_object.txt
     ** addFile5v--object --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6s_jarSrc_object.txt
     ** addFile6s--object --jarSrc returned -225
     ** ERROR (-225): Installing: C:\Program 
Files\moz131\dtype_afile_jarSrc\addFile6v_jarSrc_object.txt
     ** addFile6v--object --jarSrc returned -225

     Install script aborted
     Finished Installation  01/31/2000 17:01:14

EXPECTED RESULT:
Because the jarsource parameter is a string type, error -225 (EXTRACTION ERROR) 
is not what I expect if the data type is not a string.  Perhaps -208 (INVALID 
ARGUMENT) is more accurate.  null returns -208, and this seems correct.

I do not expect 0KB files with the appropriate file name to appear from the 
dtype_afile_jarSrc folder.  No file should appear when it returns an error -225.

NOTE:
The above script is a subset of a larger script.

Updated

19 years ago
Target Milestone: M15

Comment 1

19 years ago
set to m18
bug meeting 3/20
Target Milestone: M15 → M18
(Assignee)

Comment 2

19 years ago
Parcelling out Cathleen's bugs
Assignee: cathleen → dbragg

Updated

18 years ago
Status: NEW → ASSIGNED

Comment 3

18 years ago
*** Bug 47258 has been marked as a duplicate of this bug. ***

Comment 4

18 years ago
There is some good information in bug 47258. I suggest looking at it.
(Assignee)

Comment 5

18 years ago
Resetting target field for missed milestones
Target Milestone: M18 → ---
(Assignee)

Comment 6

18 years ago
Is this one still valid? When bug 47258 gets closed watch for all the -225 
errors to change to DOES_NOT_EXIST (-214) errors. This is as-designed because 
javascript is helpfully translating all your arguments into strings, and then 
nothing is found in the archive by that name.  If you had files in the archive 
by the name of "7" or "false" etc. then they'd get found and extracted.

Are the zero length files still appearing? That would be a problem, but perhaps 
best to create a new bug for it since morphing this bug might be a bit 
confusing.
Assignee: dbragg → dveditz
Status: ASSIGNED → NEW
(Reporter)

Comment 7

18 years ago
The install.log still looks the same.  But zero length files are no longer 
appearing in the directory that is created which is good.
(Assignee)

Comment 8

18 years ago
OK, I'm marking this fixed for the zero-length files. The error codes won't 
change until the fix for bug 47258 is checked in.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Reporter)

Comment 9

18 years ago
Build: 2001-03-12-09-Mtrunk(WIN), 2001-03-12-11-trunk(MAC), 
2001-03-12-12-Mtrunk(LINUX)

No zero length files installed anymore.  Marking Verified!
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.