Open camuel opened 11 years ago
On Sun, Sep 30, 2012 at 6:53 PM, Yaroslav Litvinov <notifications@github.com
wrote:
We needed test suite to test folowing cases: case 1. Whole file system; case 2. File system loaded via channel: Need to be tested integrity of data loaded via channel and was saved into fs;
For case1 I suggest to use ( http://www.tuxera.com/community/posix-test-suite/, "pjd fstests") that supports UFS, ZFS, ext3, XFS and the NTFS-3G file systems. That test suite has been writen in c language and can be easily ported into project. Since Native Client doesn't support folowing syscalls: create, mkdir, unlink, rmdir, fsync; we can modify pjd tests that will skip unsupported functions during tests of our own filesystem .
we should support it! If we don't support it then a lot of ported program will choke on them. Why we cannot support them?
For case2 any recommendations are welcome. As for me: It can be just self-test of all files loaded from channel were added to filesystem, and at the next step were read again and performs bitwise compare for every loaded file;
what do you mean by files loaded from channels?
— Reply to this email directly or view it on GitHubhttps://github.com/Dazo-org/zrt/issues/12#issuecomment-9015412.
In order to use second storage archive, it's should be added into manifest file, where "/tarimage.tar" full path to archive: Channel = /tarimage.tar, /dev/tarimage, 1, 9999999, 9999999, 0, 0
I've found out that nacl glibc functions use weak_alias macro to alias their functions, which means that we can overwrite their implementation in zrt just by using same symbols and nothing else. Yaroslav tested it and it seems to work.
Ok, I see that it's executing fstest binary and using sh and expect to test the results. It cannot be run in zerovm, but we can rewrite the tests as a C program. It doesn't look too complicated. For example:
expect 0 create ${n0} 0644 expect none stat ${n0} flags
Can be rewritten as something along the lines of:
assert_errno(creat(n0, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH), 0); assert(stat(n0, flags));
Currently pjd-fstests can't be launched on last zerovm version, because any zerovm channel contents can't be altered after zerovm started. That is all due to zerovm determinism; To solve this problem in non-deterministic way and get filesystem test suite working, it's required:
pipes support now is available in zerovm, so filesystem test suite should become working, make changes if that needs.
waiting support from zerovm, changes related to issue in commit: https://github.com/zerovm/zrt/commit/03e1af6f3770dfdcc9ca747c0df5793b473d195b
We needed test suite to test folowing cases: case 1. Whole file system; case 2. File system loaded via channel: Need to be tested integrity of data loaded via channel and was saved into fs;
For case1 I suggest to use (http://www.tuxera.com/community/posix-test-suite/, "pjd fstests") that supports UFS, ZFS, ext3, XFS and the NTFS-3G file systems. That test suite has been writen in c language and can be easily ported into project. Since Native Client doesn't support folowing syscalls: create, mkdir, unlink, rmdir, fsync; we can modify pjd tests that will skip unsupported functions during tests of our own filesystem .
For case2 any recommendations are welcome. As for me: It can be just self-test of all files loaded from channel were added to filesystem, and at the next step were read again and performs bitwise compare for every loaded file;