Skip to content

Commit d7cd524

Browse files
committed
exfat: add auto build-test and simple stability test using travis-CI
When backporting mainline exfat patch, there are build issue from low kernel version. This patch add auto build-test for exfat with 4.1 kernel and simple tests. Signed-off-by: Namjae Jeon <[email protected]>
1 parent a129bcc commit d7cd524

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

.travis.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
dist: bionic
2+
3+
language: c
4+
5+
notifications:
6+
- email: true
7+
8+
before_script:
9+
# Download the kernel
10+
- sudo apt-get install libelf-dev wget tar gzip python
11+
- wget https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-4.1.36.tar.gz
12+
- tar xf linux-4.1.36.tar.gz
13+
- mv linux-4.1.36 linux-stable
14+
- ./.travis_get_mainline_kernel
15+
- cp ./.travis_cmd_wrapper.pl ~/travis_cmd_wrapper.pl
16+
# Prerequisite for xfstests testing
17+
- sudo apt-get install linux-headers-$(uname -r)
18+
- sudo apt-get install autoconf libtool pkg-config libnl-3-dev libnl-genl-3-dev
19+
- sudo apt-get install xfslibs-dev uuid-dev libtool-bin xfsprogs libgdbm-dev gawk fio attr libattr1-dev libacl1-dev libaio-dev
20+
- git clone --branch=exfat-next https://github.com/exfat-utils/exfat-utils
21+
- git clone https://github.com/namjaejeon/exfat-testsuites
22+
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
23+
- export PATH=/usr/local/lib:$PATH
24+
- sudo useradd fsgqa
25+
- sudo useradd 123456-fsgqa
26+
27+
script:
28+
# Copy ksmbd source to kernel
29+
- mv linux-stable ../
30+
- mv linux ../
31+
- mkdir ../linux-stable/fs/exfat
32+
- cp -ar * ../linux-stable/fs/exfat/
33+
- cp -ar * ../linux/fs/exfat/
34+
35+
# Compile with 4.1 kernel
36+
- cd ../linux-stable
37+
- yes "" | make oldconfig > /dev/null
38+
- echo 'obj-$(CONFIG_EXFAT_FS) += exfat/' >> fs/Makefile
39+
- echo 'source "fs/exfat/Kconfig"' >> fs/Kconfig
40+
- echo 'CONFIG_EXFAT_FS=m' >> .config
41+
- echo 'CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"' >> .config
42+
- make -j$((`nproc`+1)) fs/exfat/exfat.ko
43+
44+
# Compile with latest Torvalds' kernel
45+
# - cd ../linux
46+
# - yes "" | make oldconfig > /dev/null
47+
# - echo 'obj-$(CONFIG_EXFAT) += exfat/' >> fs/Makefile
48+
# - echo 'source "fs/exfat/Kconfig"' >> fs/Kconfig
49+
# - echo 'CONFIG_EXFAT_FS=m' >> .config
50+
# - echo 'CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"' >> .config
51+
# - make -j$((`nproc`+1)) fs/exfat/exfat.ko
52+
53+
# Run xfstests testsuite
54+
- cd ../linux-exfat-oot
55+
- make > /dev/null
56+
- sudo make install > /dev/null
57+
- sudo modprobe exfat
58+
- cd exfat-utils
59+
- ./autogen.sh > /dev/null
60+
- ./configure > /dev/null
61+
- make -j$((`nproc`+1)) > /dev/null
62+
- sudo make install > /dev/null
63+
- sudo mkdir -p /mnt/scratch
64+
- sudo mkdir -p /mnt/test
65+
- sudo mkdir -p /mnt/full_test
66+
# create file/director test
67+
- truncate -s 10G full_test.img
68+
- sudo losetup /dev/loop22 full_test.img
69+
- sudo mkfs.exfat /dev/loop22
70+
- sudo mount -t exfat /dev/loop22 /mnt/full_test/
71+
- cd /mnt/full_test/
72+
- i=1;while [ $i -le 10000 ];do sudo touch file$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done
73+
- sync
74+
- sudo fsck.exfat /dev/loop22
75+
- sudo rm -rf *
76+
- i=1;while [ $i -le 10000 ];do sudo mkdir file$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done
77+
- sync
78+
- sudo rm -rf *
79+
- sudo fsck.exfat /dev/loop22
80+
- cd -
81+
- sudo umount /mnt/full_test/
82+
- sudo fsck.exfat /dev/loop22
83+
# run xfstests test
84+
- truncate -s 100G test.img
85+
- truncate -s 100G scratch.img
86+
- sudo losetup /dev/loop20 test.img
87+
- sudo losetup /dev/loop21 scratch.img
88+
- sudo mkfs.exfat /dev/loop20
89+
- sudo mkfs.exfat /dev/loop21
90+
- cd ..
91+
- cd exfat-testsuites/
92+
- tar xzvf xfstests-exfat.tgz > /dev/null
93+
- cd xfstests-exfat
94+
- make -j$((`nproc`+1)) > /dev/null
95+
- sudo ./check generic/001
96+
- sudo ./check generic/006

0 commit comments

Comments
 (0)