Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ci
Path: blob/main/jobs/FreeBSD-main-amd64-test_ltp/meta/run.sh
1130 views
1
#!/bin/sh
2
3
METADIR=/meta
4
5
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
6
export PATH
7
8
# Enable services needed by tests
9
sysrc linux_enable="YES"
10
for i in proc sys tmp dev; do
11
mkdir -p /compat/linux/$i
12
done
13
service linux start
14
15
# runltp creates nobody, bin, and daemon users, but not root
16
echo 'root:x:0:0:root::' > /compat/linux/etc/passwd
17
18
# runltp creates nobody, bin, daemon, sys, and users groups, but not root
19
echo 'root:x:0:' > /compat/linux/etc/group
20
21
# Workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242955
22
kldload ext2fs
23
24
# Disable tests that hang undefinitely.
25
cat > /compat/linux/ltp-skipfile.conf << END
26
rt_sigtimedwait01 rt_sigtimedwait01
27
sigtimedwait01 sigtimedwait01
28
sigwaitinfo01 sigwaitinfo01
29
inotify06 inotify06
30
pidns05 pidns05
31
utstest_unshare_3 utstest_unshare_3
32
utstest_unshare_4 utstest_unshare_4
33
kill10 kill10
34
mmap_11-2 mmap_11-2
35
mmap_11-3 mmap_11-3
36
mmap_24-1 mmap_24-1
37
sigaction_16-1 sigaction_16-1
38
END
39
40
# Add Open POSIX to the default run.
41
echo "openposix" >> /compat/linux/opt/ltp/scenario_groups/default
42
43
mdconfig -s 512m
44
45
set +e
46
yes | chroot /compat/linux /opt/ltp/runltp -Q -S /ltp-skipfile.conf -b /dev/md0 -pl /ltp-results.log
47
echo $? > ${METADIR}/runltp.error
48
set -e
49
50
mv -v /compat/linux/ltp-results.log ${METADIR}
51
52