mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f5f866266 | |||
| 8829ba19b7 | |||
| 642d86af0d | |||
| 07ca7592ad | |||
| fb0d807477 | |||
| 858ea8861c | |||
| 549841ef9a | |||
| 96f322e7e2 |
@@ -0,0 +1,64 @@
|
||||
name: zfs-tests-functional
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
tests-functional-ubuntu:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [18.04, 20.04]
|
||||
runs-on: ubuntu-${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes -qq build-essential autoconf libtool gdb lcov \
|
||||
git alien fakeroot wget curl bc fio acl \
|
||||
sysstat mdadm lsscsi parted gdebi attr dbench watchdog ksh \
|
||||
nfs-kernel-server samba rng-tools xz-utils \
|
||||
zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
|
||||
xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
|
||||
libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
|
||||
libpam0g-dev pamtester python-dev python-setuptools python-cffi \
|
||||
python3 python3-dev python3-setuptools python3-cffi
|
||||
- name: Autogen.sh
|
||||
run: |
|
||||
sh autogen.sh
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --enable-debug --enable-debuginfo
|
||||
- name: Make
|
||||
run: |
|
||||
make --no-print-directory -s pkg-utils pkg-kmod
|
||||
- name: Install
|
||||
run: |
|
||||
sudo dpkg -i *.deb
|
||||
# Update order of directories to search for modules, otherwise
|
||||
# Ubuntu will load kernel-shipped ones.
|
||||
sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
|
||||
sudo depmod
|
||||
sudo modprobe zfs
|
||||
- name: Tests
|
||||
run: |
|
||||
/usr/share/zfs/zfs-tests.sh -v -s 3G
|
||||
- name: Prepare artifacts
|
||||
if: failure()
|
||||
run: |
|
||||
RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
|
||||
sudo dmesg > $RESULTS_PATH/dmesg
|
||||
sudo cp /var/log/syslog $RESULTS_PATH/
|
||||
sudo chmod +r $RESULTS_PATH/*
|
||||
# Replace ':' in dir names, actions/upload-artifact doesn't support it
|
||||
for f in $(find $RESULTS_PATH -name '*:*'); do mv "$f" "${f//:/__}"; done
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: Test logs Ubuntu-${{ matrix.os }}
|
||||
path: /var/tmp/test_results/20*/
|
||||
if-no-files-found: ignore
|
||||
@@ -50,6 +50,8 @@ jobs:
|
||||
sudo dmesg > $RESULTS_PATH/dmesg
|
||||
sudo cp /var/log/syslog $RESULTS_PATH/
|
||||
sudo chmod +r $RESULTS_PATH/*
|
||||
# Replace ':' in dir names, actions/upload-artifact doesn't support it
|
||||
for f in $(find $RESULTS_PATH -name '*:*'); do mv "$f" "${f//:/__}"; done
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
@@ -1,7 +1,7 @@
|
||||
Meta: 1
|
||||
Name: zfs
|
||||
Branch: 1.0
|
||||
Version: 2.0.2
|
||||
Version: 2.0.3
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: CDDL
|
||||
|
||||
@@ -59,4 +59,12 @@ echo "zfs-generator: writing extension for sysroot.mount to $GENERATOR_DIR"/sysr
|
||||
[ -d "$GENERATOR_DIR"/initrd-root-fs.target.requires ] || mkdir -p "$GENERATOR_DIR"/initrd-root-fs.target.requires
|
||||
ln -s ../sysroot.mount "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount
|
||||
|
||||
|
||||
[ -d "$GENERATOR_DIR"/dracut-pre-mount.service.d ] || mkdir "$GENERATOR_DIR"/dracut-pre-mount.service.d
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "After=zfs-import.target"
|
||||
} > "$GENERATOR_DIR"/dracut-pre-mount.service.d/zfs-enhancement.conf
|
||||
|
||||
echo "zfs-generator: finished" >> /dev/kmsg
|
||||
|
||||
@@ -8,7 +8,7 @@ After=cryptsetup.target
|
||||
After=multipathd.target
|
||||
After=systemd-remount-fs.service
|
||||
Before=zfs-import.target
|
||||
ConditionPathExists=@sysconfdir@/zfs/zpool.cache
|
||||
ConditionFileNotEmpty=@sysconfdir@/zfs/zpool.cache
|
||||
ConditionPathIsDirectory=/sys/module/zfs
|
||||
|
||||
[Service]
|
||||
|
||||
@@ -7,7 +7,7 @@ After=systemd-udev-settle.service
|
||||
After=cryptsetup.target
|
||||
After=multipathd.target
|
||||
Before=zfs-import.target
|
||||
ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
|
||||
ConditionFileNotEmpty=!@sysconfdir@/zfs/zpool.cache
|
||||
ConditionPathIsDirectory=/sys/module/zfs
|
||||
|
||||
[Service]
|
||||
|
||||
+8
-3
@@ -63,12 +63,17 @@ If specified, you can list property information by the absolute pathname or the
|
||||
relative pathname.
|
||||
By default, all file systems and volumes are displayed.
|
||||
Snapshots are displayed if the
|
||||
.Sy listsnaps
|
||||
property is
|
||||
.Sy listsnapshots
|
||||
pool property is
|
||||
.Sy on
|
||||
.Po the default is
|
||||
.Sy off
|
||||
.Pc .
|
||||
.Pc ,
|
||||
or if the
|
||||
.Fl t Sy snapshot
|
||||
or
|
||||
.Fl t Sy all
|
||||
options are specified.
|
||||
The following fields are displayed:
|
||||
.Sy name Ns \&, Sy used Ns \&, Sy available Ns \&, Sy referenced Ns \&, Sy mountpoint Ns .
|
||||
.Bl -tag -width "-H"
|
||||
|
||||
@@ -528,6 +528,7 @@ zfs_write(znode_t *zp, uio_t *uio, int ioflag, cred_t *cr)
|
||||
((zp->z_mode & S_ISUID) != 0 && uid == 0)) != 0) {
|
||||
uint64_t newmode;
|
||||
zp->z_mode &= ~(S_ISUID | S_ISGID);
|
||||
newmode = zp->z_mode;
|
||||
(void) sa_update(zp->z_sa_hdl, SA_ZPL_MODE(zfsvfs),
|
||||
(void *)&newmode, sizeof (uint64_t), tx);
|
||||
}
|
||||
|
||||
@@ -127,6 +127,11 @@ trim_reason = 'DISKS must support discard (TRIM/UNMAP)'
|
||||
#
|
||||
na_reason = "Not applicable"
|
||||
|
||||
#
|
||||
# Some test cases doesn't have all requirements to run on Github actions CI.
|
||||
#
|
||||
ci_reason = 'CI runner doesn\'t have all requirements'
|
||||
|
||||
summary = {
|
||||
'total': float(0),
|
||||
'passed': float(0),
|
||||
@@ -274,6 +279,35 @@ elif sys.platform.startswith('linux'):
|
||||
})
|
||||
|
||||
|
||||
# Not all Github actions runners have scsi_debug module, so we may skip
|
||||
# some tests which use it.
|
||||
if os.environ.get('CI') == 'true':
|
||||
known.update({
|
||||
'cli_root/zpool_expand/zpool_expand_001_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_expand/zpool_expand_003_neg': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_expand/zpool_expand_005_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/setup': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/zpool_reopen_001_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/zpool_reopen_002_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/zpool_reopen_003_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/zpool_reopen_004_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/zpool_reopen_005_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/zpool_reopen_006_neg': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_reopen/zpool_reopen_007_pos': ['SKIP', ci_reason],
|
||||
'cli_root/zpool_split/zpool_split_wholedisk': ['SKIP', ci_reason],
|
||||
'fault/auto_offline_001_pos': ['SKIP', ci_reason],
|
||||
'fault/auto_online_001_pos': ['SKIP', ci_reason],
|
||||
'fault/auto_replace_001_pos': ['SKIP', ci_reason],
|
||||
'fault/auto_spare_ashift': ['SKIP', ci_reason],
|
||||
'fault/auto_spare_shared': ['SKIP', ci_reason],
|
||||
'procfs/pool_state': ['SKIP', ci_reason],
|
||||
})
|
||||
|
||||
maybe.update({
|
||||
'events/events_002_pos': ['FAIL', '11546'],
|
||||
})
|
||||
|
||||
|
||||
def usage(s):
|
||||
print(s)
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user