[common][filesystem][DPTTIZEN-3242 revert invalid value and remove 64bit test] 76/282676/1
authortangkaiyuan <kaiyuan.tang@samsung.com>
Sat, 8 Oct 2022 07:52:49 +0000 (15:52 +0800)
committertangkaiyuan <kaiyuan.tang@samsung.com>
Sat, 8 Oct 2022 07:52:57 +0000 (15:52 +0800)
Change-Id: Ic9b0e29f979ba0f0ed802c5d4994bbd9ee309d7d
Signed-off-by: tangkaiyuan <kaiyuan.tang@samsung.com>
common/tct-filesystem-tizen-tests/filesystem/FileHandle_readBlobNonBlocking_InvalidValuesError.html
common/tct-filesystem-tizen-tests/filesystem/FileHandle_readBlob_InvalidValuesError.html
common/tct-filesystem-tizen-tests/filesystem/FileHandle_readDataNonBlocking_InvalidValuesError.html
common/tct-filesystem-tizen-tests/filesystem/FileHandle_readData_InvalidValuesError.html
common/tct-filesystem-tizen-tests/filesystem/FileHandle_readStringNonBlocking_InvalidValuesError.html
common/tct-filesystem-tizen-tests/filesystem/FileHandle_readString_InvalidValuesError.html

index 4a5cceec096da905f423eca8190435c761e94438..7a7eb8b4f4673fecc0bb8c0949dc16dc8189ab72 100755 (executable)
@@ -38,40 +38,43 @@ Authors:
 
 var t = async_test(document.title), writeBlobNonBlockingSuccess, writeBlobNonBlockingError,
   fileHandleWrite, fileHandleRead, blob, content = "Lorem ipsum dolor sit amet...",
-  readBlobNonBlockingSuccess, readBlobNonBlockingError;
+  readBlobNonBlockingSuccess, readBlobNonBlockingError, arch;
 
 t.step(function () {
-    add_result_callback(function () {
-        try {
-            tizen.filesystem.deleteFile("documents/file");
-        } catch (err) {
-        }
-    });
+    arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+    if (arch !== "aarch64" && arch !== "armv8") {
+        add_result_callback(function () {
+            try {
+                tizen.filesystem.deleteFile("documents/file");
+            } catch (err) {
+            }
+        });
 
-    writeBlobNonBlockingSuccess = t.step_func(function (blob) {
-    });
+        writeBlobNonBlockingSuccess = t.step_func(function (blob) {
+        });
 
-    writeBlobNonBlockingError = t.step_func(function (error) {
-        assert_unreached("writeBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
-    });
+        writeBlobNonBlockingError = t.step_func(function (error) {
+            assert_unreached("writeBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+        });
 
-    readBlobNonBlockingSuccess = t.step_func(function (output) {
-    });
+        readBlobNonBlockingSuccess = t.step_func(function (output) {
+        });
 
-    readBlobNonBlockingError = t.step_func(function (error) {
-        assert_unreached("readBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
-    });
+        readBlobNonBlockingError = t.step_func(function (error) {
+            assert_unreached("readBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+        });
 
-    blob = new Blob([content], {type: "text/plain"});
-    fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
-    fileHandleWrite.writeBlobNonBlocking(blob, writeBlobNonBlockingSuccess, writeBlobNonBlockingError);
-    fileHandleWrite.close();
+        blob = new Blob([content], {type: "text/plain"});
+        fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+        fileHandleWrite.writeBlobNonBlocking(blob, writeBlobNonBlockingSuccess, writeBlobNonBlockingError);
+        fileHandleWrite.close();
 
-    fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
-    assert_throws(INVALID_VALUES_EXCEPTION, function () {
-        fileHandleRead.readBlobNonBlocking(readBlobNonBlockingSuccess, readBlobNonBlockingError, 0xfffffffffffffffff);
-    }, "InvalidValuesError should be thrown - invalid count.");
-    fileHandleRead.close();
+        fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+        assert_throws(INVALID_VALUES_EXCEPTION, function () {
+            fileHandleRead.readBlobNonBlocking(readBlobNonBlockingSuccess, readBlobNonBlockingError, 0x7fffffffffffffff);
+        }, "InvalidValuesError should be thrown - invalid count.");
+        fileHandleRead.close();
+    }
     t.done();
 });
 
index 02bcd0e976468383ab217665be216d6627f7012e..8734a96fe4a835531ae7a6f4a401aae19a6cd915 100755 (executable)
@@ -36,25 +36,28 @@ Authors:
 //==== TEST_CRITERIA MC
 
 test(function () {
-    var fileHandleWrite, blob, fileHandleRead, content = "Lorem ipsum dolor sit amet...";
-
-    add_result_callback(function () {
-        try {
-            tizen.filesystem.deleteFile("documents/file");
-        } catch (err) {
-        }
-    });
-
-    blob = new Blob([content], {type: "text/plain"});
-    fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
-    fileHandleWrite.writeBlob(blob);
-    fileHandleWrite.close();
-
-    fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
-    assert_throws(INVALID_VALUES_EXCEPTION, function () {
-        fileHandleRead.readBlob(0xfffffffffffffffff);
-    }, "InvalidValuesError should be thrown - invalid count.");
-    fileHandleRead.close();
+    var arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+    if (arch !== "aarch64" && arch !== "armv8") {
+        var fileHandleWrite, blob, fileHandleRead, content = "Lorem ipsum dolor sit amet...";
+
+        add_result_callback(function () {
+            try {
+                tizen.filesystem.deleteFile("documents/file");
+            } catch (err) {
+            }
+        });
+
+        blob = new Blob([content], {type: "text/plain"});
+        fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+        fileHandleWrite.writeBlob(blob);
+        fileHandleWrite.close();
+
+        fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+        assert_throws(INVALID_VALUES_EXCEPTION, function () {
+            fileHandleRead.readBlob(0x7fffffffffffffff);
+        }, "InvalidValuesError should be thrown - invalid count.");
+        fileHandleRead.close();
+    }
 }, document.title);
 
 </script>
index 1320f053493606a1935133cd0f677079130dcc85..7bfcb6940df2aafa24419a2007983912e91db351 100755 (executable)
@@ -36,39 +36,42 @@ Authors:
 //==== TEST_CRITERIA MC
 
 var t = async_test(document.title), dataToWrite = new Uint8Array([11, 21, 31, 71, 81, 91]), writeDataNonBlockingSuccess, writeDataNonBlockingError,
-  readDataNonBlockingSuccess, readDataNonBlockingError, fileHandleWrite, fileHandleRead;
+  readDataNonBlockingSuccess, readDataNonBlockingError, fileHandleWrite, fileHandleRead, arch;
 
 t.step(function () {
-    add_result_callback(function () {
-        try {
-            tizen.filesystem.deleteFile("documents/file");
-        } catch (err) {
-        }
-    });
+    arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+    if (arch !== "aarch64" && arch !== "armv8") {
+        add_result_callback(function () {
+            try {
+                tizen.filesystem.deleteFile("documents/file");
+            } catch (err) {
+            }
+        });
 
-    writeDataNonBlockingSuccess = t.step_func(function (data) {
-    });
+        writeDataNonBlockingSuccess = t.step_func(function (data) {
+        });
 
-    writeDataNonBlockingError = t.step_func(function (error) {
-        assert_unreached("writeDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
-    });
+        writeDataNonBlockingError = t.step_func(function (error) {
+            assert_unreached("writeDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+        });
 
-    readDataNonBlockingSuccess = t.step_func(function (position) {
-    });
+        readDataNonBlockingSuccess = t.step_func(function (position) {
+        });
 
-    readDataNonBlockingError = t.step_func(function (error) {
-        assert_unreached("readDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
-    });
+        readDataNonBlockingError = t.step_func(function (error) {
+            assert_unreached("readDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+        });
 
-    fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
-    fileHandleWrite.writeDataNonBlocking(dataToWrite, writeDataNonBlockingSuccess, writeDataNonBlockingError);
-    fileHandleWrite.close();
+        fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+        fileHandleWrite.writeDataNonBlocking(dataToWrite, writeDataNonBlockingSuccess, writeDataNonBlockingError);
+        fileHandleWrite.close();
 
-    fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
-    assert_throws(INVALID_VALUES_EXCEPTION, function () {
-        fileHandleRead.readDataNonBlocking(readDataNonBlockingSuccess, readDataNonBlockingError, 0xfffffffffffffffff);
-    }, "InvalidValuesError should be thrown - invalid size.");
-    fileHandleRead.close();
+        fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+        assert_throws(INVALID_VALUES_EXCEPTION, function () {
+            fileHandleRead.readDataNonBlocking(readDataNonBlockingSuccess, readDataNonBlockingError, 0x7fffffffffffffff);
+        }, "InvalidValuesError should be thrown - invalid size.");
+        fileHandleRead.close();
+    }
     t.done();
 });
 
index 12d2b56c80f96c0f5e6aa7d4a494c4d317ab6f06..69960087664d3ae13fb08d5aca11a6c6af5e510e 100755 (executable)
@@ -36,24 +36,27 @@ Authors:
 //==== TEST_CRITERIA MC
 
 test(function () {
-    var dataToWrite = new Uint8Array([11, 21, 31, 71, 81, 91]), fileHandleWrite, fileHandleRead;
-
-    add_result_callback(function () {
-        try {
-            fileHandleRead.close();
-            tizen.filesystem.deleteFile("documents/file");
-        } catch (err) {
-        }
-    });
-
-    fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
-    fileHandleWrite.writeData(dataToWrite);
-    fileHandleWrite.close();
-
-    fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
-    assert_throws(INVALID_VALUES_EXCEPTION, function () {
-        fileHandleRead.readData(0xfffffffffffffffff);
-    }, "InvalidValuesError should be thrown - invalid count.");
+    var arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+    if (arch !== "aarch64" && arch !== "armv8") {
+        var dataToWrite = new Uint8Array([11, 21, 31, 71, 81, 91]), fileHandleWrite, fileHandleRead;
+
+        add_result_callback(function () {
+            try {
+                fileHandleRead.close();
+                tizen.filesystem.deleteFile("documents/file");
+            } catch (err) {
+            }
+        });
+
+        fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+        fileHandleWrite.writeData(dataToWrite);
+        fileHandleWrite.close();
+
+        fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+        assert_throws(INVALID_VALUES_EXCEPTION, function () {
+            fileHandleRead.readData(0x7fffffffffffffff);
+        }, "InvalidValuesError should be thrown - invalid count.");
+    }
 }, document.title);
 
 </script>
index e212d9dcaec3ec22572f3247bd1fcffbc2e74c4d..925096b79073fc66019db0913a04bc7d9f1dd24d 100755 (executable)
@@ -36,30 +36,33 @@ Authors:
 //==== ONLOAD_DELAY 90
 //==== TEST_CRITERIA MC
 
-var t = async_test(document.title), readStringNonBlockingSuccess, readStringNonBlockingError, fileHandle;
+var t = async_test(document.title), readStringNonBlockingSuccess, readStringNonBlockingError, fileHandle, arch;
 
 t.step(function () {
-    add_result_callback(function () {
-        try {
-            fileHandle.close();
-            tizen.filesystem.deleteFile("documents/file");
-        } catch (err) {
-        }
-    });
+    arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+    if (arch !== "aarch64" && arch !== "armv8") {
+        add_result_callback(function () {
+            try {
+                fileHandle.close();
+                tizen.filesystem.deleteFile("documents/file");
+            } catch (err) {
+            }
+        });
 
-    readStringNonBlockingSuccess = t.step_func(function (output) {
-    });
+        readStringNonBlockingSuccess = t.step_func(function (output) {
+        });
 
-    readStringNonBlockingError = t.step_func(function (error) {
-        assert_unreached("readStringNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
-    });
+        readStringNonBlockingError = t.step_func(function (error) {
+            assert_unreached("readStringNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+        });
 
-    fileHandle = tizen.filesystem.openFile("documents/file", "w");
-    fileHandle.close();
-    fileHandle = tizen.filesystem.openFile("documents/file", "r");
-    assert_throws(INVALID_VALUES_EXCEPTION, function () {
-        fileHandle.readStringNonBlocking(readStringNonBlockingSuccess, readStringNonBlockingError, 0xfffffffffffffffff);
-    }, "InvalidValuesError should be thrown - invalid count.");
+        fileHandle = tizen.filesystem.openFile("documents/file", "w");
+        fileHandle.close();
+        fileHandle = tizen.filesystem.openFile("documents/file", "r");
+        assert_throws(INVALID_VALUES_EXCEPTION, function () {
+            fileHandle.readStringNonBlocking(readStringNonBlockingSuccess, readStringNonBlockingError, 0x7fffffffffffffff);
+        }, "InvalidValuesError should be thrown - invalid count.");
+    }
     t.done();
 });
 
index 00415f791c95093f75d8f3e290f050254185c95f..d0dabc10f6bde2f087f9ed43126c84bf9c6c3216 100755 (executable)
@@ -36,24 +36,27 @@ Authors:
 //==== TEST_CRITERIA MC
 
 test(function () {
-    var fileHandleWrite, fileHandleRead, fileContents, content = "Lorem ipsum dolor sit amet...";
-
-    add_result_callback(function () {
-        try {
-            fileHandleRead.close();
-            tizen.filesystem.deleteFile("documents/file");
-        } catch (err) {
-        }
-    });
-
-    fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
-    fileHandleWrite.writeString(content);
-    fileHandleWrite.close();
-
-    fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
-    assert_throws(INVALID_VALUES_EXCEPTION, function () {
-        fileHandleRead.readString(0xfffffffffffffffff);
-    }, "InvalidValuesError should be thrown - invalid count.");
+    var arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+    if (arch !== "aarch64" && arch !== "armv8") {
+        var fileHandleWrite, fileHandleRead, fileContents, content = "Lorem ipsum dolor sit amet...";
+
+        add_result_callback(function () {
+            try {
+                fileHandleRead.close();
+                tizen.filesystem.deleteFile("documents/file");
+            } catch (err) {
+            }
+        });
+
+        fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+        fileHandleWrite.writeString(content);
+        fileHandleWrite.close();
+
+        fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+        assert_throws(INVALID_VALUES_EXCEPTION, function () {
+            fileHandleRead.readString(0x7fffffffffffffff);
+        }, "InvalidValuesError should be thrown - invalid count.");
+    }
 }, document.title);
 
 </script>