JuiceFS passed all of the 8813 tests in latest [pjdfstest](https://github.com/pjd/pjdfstest).
JuiceFS ensures POSIX compatibility with the help of pjdfstest and LTP.
## Pjdfstest
[Pjdfstest](https://github.com/pjd/pjdfstest) is a test suite that helps exercise POSIX system calls. JuiceFS passed all of its latest 8813 tests:
```
All tests successful.
...
...
@@ -16,10 +20,269 @@ Result: PASS
Besides the things covered by pjdfstest, JuiceFS provides:
- Close-to-open consistency. Once a file is closed, the following open and read are guaranteed see the data written before close. Within same mount point, read can see all data written before it immediately.
- Rename and all other metadata operations are atomic guaranteed by Redis transaction.
- Rename and all other metadata operations are atomic guaranteed by transaction of metadata engines.
- Open files remain accessible after unlink from same mount point.
- Mmap is supported (tested with FSx).
- Fallocate with punch hole support.
- Extended attributes (xattr).
- BSD locks (flock).
- POSIX record locks (fcntl).
## LTP
[LTP](https://github.com/linux-test-project/ltp)(Linux Test Project) is a joint project developed and maintained by IBM, Cisco, Fujitsu and others.
> The project goal is to deliver tests to the open source community that validate the reliability, robustness, and stability of Linux.
>
> The LTP testsuite contains a collection of tools for testing the Linux kernel and related features. Our goal is to improve the Linux kernel and system libraries by bringing test automation to the testing effort.
JuiceFS passed most of its file system related tests.
### Test Environment
- Host: Amazon EC2: c5d.xlarge (4C 8G)
- OS: Ubuntu 20.04.1 LTS (Kernel 5.4.0-1029-aws)
- Object storage: Amazon S3
- JuiceFS version: 0.17-dev (2021-09-16 292f2b65)
### Test Steps
1. Download LTP [release](https://github.com/linux-test-project/ltp/releases/download/20210524/ltp-full-20210524.tar.bz2) from GitHub
2. Unarchive, compile and install:
```bash
$ tar-jvxf ltp-full-20210524.tar.bz2
$ cd ltp-full-20210524
$ ./configure
$ make all
$ make install
```
3. Change directory to `/opt/ltp` since test tools are installed here:
```bash
$ cd /opt/ltp
```
The test definition files are located under `runtest`. To speed up testing, we delete some pressure cases and unrelated cases in `fs` and `syscalls` (refer to [Appendix](#Appendix), modified files are saved as `fs-jfs` and `syscalls-jfs`), then execute:
[LTP](https://github.com/linux-test-project/ltp)(Linux Test Project)是一个由 IBM,Cisco 等多家公司联合开发维护的项目,旨在为开源社区提供一个验证 Linux 可靠性和稳定性的测试集。LTP 中包含了各种工具来检验 Linux 内核和相关特性;本文仅执行部分与文件系统相关的测试例。
[LTP](https://github.com/linux-test-project/ltp)(Linux Test Project)是一个由 IBM,Cisco 等多家公司联合开发维护的项目,旨在为开源社区提供一个验证 Linux 可靠性和稳定性的测试集。LTP 中包含了各种工具来检验 Linux 内核和相关特性;JuiceFS 通过了其中与文件系统相关的大部分测试例。