diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e975d7dd00b9..ba70ba085aad 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -5,7 +5,7 @@ on: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} cancel-in-progress: true jobs: diff --git a/.github/workflows/zfs-qemu-packages.yml b/.github/workflows/zfs-qemu-packages.yml index d8a95954fe1a..f8b8cee336d5 100644 --- a/.github/workflows/zfs-qemu-packages.yml +++ b/.github/workflows/zfs-qemu-packages.yml @@ -43,7 +43,7 @@ on: default: "" description: "(optional) repo URL (blank: use http://download.zfsonlinux.org)" concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} cancel-in-progress: true jobs: diff --git a/.github/workflows/zfs-qemu.yml b/.github/workflows/zfs-qemu.yml index 4ebb80af1f03..ccaf44c91ed2 100644 --- a/.github/workflows/zfs-qemu.yml +++ b/.github/workflows/zfs-qemu.yml @@ -12,7 +12,7 @@ on: description: "(optional) Experimental kernel version to install on Fedora (like '6.14' or '6.13.3-0.rc3')" concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} cancel-in-progress: true jobs: diff --git a/.github/workflows/zloop.yml b/.github/workflows/zloop.yml index 4ae3ccdc5484..76a3878e3755 100644 --- a/.github/workflows/zloop.yml +++ b/.github/workflows/zloop.yml @@ -5,7 +5,7 @@ on: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} cancel-in-progress: true jobs: diff --git a/lib/libshare/libshare_impl.h b/lib/libshare/libshare_impl.h index 79f081bb8312..d3d1e4884c92 100644 --- a/lib/libshare/libshare_impl.h +++ b/lib/libshare/libshare_impl.h @@ -27,6 +27,7 @@ */ #ifndef _LIBSPL_LIBSHARE_IMPL_H #define _LIBSPL_LIBSHARE_IMPL_H +#include /* boolean_t */ typedef const struct sa_share_impl { const char *sa_zfsname; diff --git a/lib/libshare/os/linux/nfs.c b/lib/libshare/os/linux/nfs.c index 6a9bb3788523..3ee7a6bac034 100644 --- a/lib/libshare/os/linux/nfs.c +++ b/lib/libshare/os/linux/nfs.c @@ -559,6 +559,7 @@ const sa_fstype_t libshare_nfs_type = { static boolean_t nfs_available(void) { +#ifdef TRUENAS_ENABLE_ZFS_SHARING static int avail; if (!avail) { @@ -569,11 +570,15 @@ nfs_available(void) } return (avail == 1); +#else + return (B_FALSE); +#endif } static boolean_t exports_available(void) { +#ifdef TRUENAS_ENABLE_ZFS_SHARING static int avail; if (!avail) { @@ -584,4 +589,7 @@ exports_available(void) } return (avail == 1); +#else + return (B_FALSE); +#endif } diff --git a/lib/libshare/os/linux/smb.c b/lib/libshare/os/linux/smb.c index 40996ecc8f89..874647504616 100644 --- a/lib/libshare/os/linux/smb.c +++ b/lib/libshare/os/linux/smb.c @@ -390,6 +390,7 @@ const sa_fstype_t libshare_smb_type = { static boolean_t smb_available(void) { +#ifdef TRUENAS_ENABLE_ZFS_SHARING static int avail; if (!avail) { @@ -404,4 +405,8 @@ smb_available(void) } return (avail == 1); +#else + /* TrueNAS: Disable SMB sharing */ + return (B_FALSE); +#endif } diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run index e2c681b080ec..4525b9be862b 100644 --- a/tests/runfiles/common.run +++ b/tests/runfiles/common.run @@ -335,12 +335,13 @@ tests = ['cache_001_pos', 'cache_002_neg', 'canmount_001_pos', 'zfs_set_feature_activation', 'zfs_set_nomount'] tags = ['functional', 'cli_root', 'zfs_set'] -[tests/functional/cli_root/zfs_share] -tests = ['zfs_share_001_pos', 'zfs_share_002_pos', 'zfs_share_003_pos', - 'zfs_share_004_pos', 'zfs_share_006_pos', 'zfs_share_008_neg', - 'zfs_share_010_neg', 'zfs_share_011_pos', 'zfs_share_concurrent_shares', - 'zfs_share_after_mount'] -tags = ['functional', 'cli_root', 'zfs_share'] +# TrueNAS: Disable share tests +# [tests/functional/cli_root/zfs_share] +# tests = ['zfs_share_001_pos', 'zfs_share_002_pos', 'zfs_share_003_pos', +# 'zfs_share_004_pos', 'zfs_share_006_pos', 'zfs_share_008_neg', +# 'zfs_share_010_neg', 'zfs_share_011_pos', 'zfs_share_concurrent_shares', +# 'zfs_share_after_mount'] +# tags = ['functional', 'cli_root', 'zfs_share'] [tests/functional/cli_root/zfs_snapshot] tests = ['zfs_snapshot_001_neg', 'zfs_snapshot_002_neg', @@ -360,11 +361,12 @@ tests = ['zfs_unmount_001_pos', 'zfs_unmount_002_pos', 'zfs_unmount_003_pos', 'zfs_unmount_all_001_pos', 'zfs_unmount_nested', 'zfs_unmount_unload_keys'] tags = ['functional', 'cli_root', 'zfs_unmount'] -[tests/functional/cli_root/zfs_unshare] -tests = ['zfs_unshare_001_pos', 'zfs_unshare_002_pos', 'zfs_unshare_003_pos', - 'zfs_unshare_004_neg', 'zfs_unshare_005_neg', 'zfs_unshare_006_pos', - 'zfs_unshare_007_pos'] -tags = ['functional', 'cli_root', 'zfs_unshare'] +# TrueNAS: Disable unshare tests +# [tests/functional/cli_root/zfs_unshare] +# tests = ['zfs_unshare_001_pos', 'zfs_unshare_002_pos', 'zfs_unshare_003_pos', +# 'zfs_unshare_004_neg', 'zfs_unshare_005_neg', 'zfs_unshare_006_pos', +# 'zfs_unshare_007_pos'] +# tags = ['functional', 'cli_root', 'zfs_unshare'] [tests/functional/cli_root/zfs_upgrade] tests = ['zfs_upgrade_001_pos', 'zfs_upgrade_002_pos', 'zfs_upgrade_003_pos', diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index ddacb59ef2bd..811f99808c98 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -53,14 +53,16 @@ tests = ['zfs_mount_006_pos', 'zfs_mount_008_pos', 'zfs_mount_013_pos', 'zfs_mount_014_neg', 'zfs_multi_mount'] tags = ['functional', 'cli_root', 'zfs_mount'] -[tests/functional/cli_root/zfs_share:Linux] -tests = ['zfs_share_005_pos', 'zfs_share_007_neg', 'zfs_share_009_neg', - 'zfs_share_012_pos', 'zfs_share_013_pos'] -tags = ['functional', 'cli_root', 'zfs_share'] - -[tests/functional/cli_root/zfs_unshare:Linux] -tests = ['zfs_unshare_008_pos'] -tags = ['functional', 'cli_root', 'zfs_unshare'] +# TrueNAS: Disable share tests +# [tests/functional/cli_root/zfs_share:Linux] +# tests = ['zfs_share_005_pos', 'zfs_share_007_neg', 'zfs_share_009_neg', +# 'zfs_share_012_pos', 'zfs_share_013_pos'] +# tags = ['functional', 'cli_root', 'zfs_share'] + +# TrueNAS: Disable unshare tests +# [tests/functional/cli_root/zfs_unshare:Linux] +# tests = ['zfs_unshare_008_pos'] +# tags = ['functional', 'cli_root', 'zfs_unshare'] [tests/functional/cli_root/zfs_sysfs:Linux] tests = ['zfeature_set_unsupported', 'zfs_get_unsupported', diff --git a/tests/test-runner/bin/zts-report.py.in b/tests/test-runner/bin/zts-report.py.in index 4a8506fc2e83..5de517fb0dfd 100755 --- a/tests/test-runner/bin/zts-report.py.in +++ b/tests/test-runner/bin/zts-report.py.in @@ -140,6 +140,9 @@ if sys.platform.startswith('freebsd'): else: cfr_cross_reason = 'copy_file_range(2) cross-filesystem needs kernel 5.3+' +# TrueNAS +truenas_skip = 'SKIP: Test not supported in TrueNAS' + # # These tests are known to fail, thus we use this list to prevent these # failures from failing the job as a whole; only unexpected failures @@ -164,6 +167,7 @@ known = { 'rootpool/setup': ['SKIP', na_reason], 'rsend/rsend_008_pos': ['SKIP', 6066], 'vdev_zaps/vdev_zaps_007_pos': ['FAIL', known_reason], + 'cli_root/zpool_import/zpool_import_012_pos': ['SKIP', truenas_skip], } if sys.platform.startswith('freebsd'): diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_002_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_002_pos.ksh index b3357fa81634..1ea7daffe684 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_002_pos.ksh @@ -121,7 +121,8 @@ while (( i < ${#dataset_pos[*]} )) ; do dataset=${dataset_pos[i]} set_n_check_prop "noauto" "canmount" "$dataset" log_must zfs set mountpoint=$tmpmnt $dataset - log_must zfs set sharenfs=on $dataset + # TrueNAS: sharenfs disabled and cannot test with log_must or log_mustnot + # log_must zfs set sharenfs=on $dataset if ismounted $dataset; then zfs unmount -a > /dev/null 2>&1 log_must mounted $dataset @@ -129,8 +130,8 @@ while (( i < ${#dataset_pos[*]} )) ; do log_must unmounted $dataset log_must zfs mount -a log_must unmounted $dataset - log_must zfs share -a - log_mustnot is_exported $tmpmnt + # log_must zfs share -a # TrueNAS: Do not share via ZFS + # log_mustnot is_exported $tmpmnt # TrueNAS: avoid false failure else log_must zfs mount -a log_must unmounted $dataset @@ -140,9 +141,10 @@ while (( i < ${#dataset_pos[*]} )) ; do log_must zfs mount $dataset log_must mounted $dataset - log_must zfs share -a - log_must is_exported $tmpmnt + # log_must zfs share -a # TrueNAS: Do not share via ZFS + # log_must is_exported $tmpmnt # TrueNAS: avoid false failure + # TrueNAS: set of sharenfs property tested here log_must zfs set sharenfs="${old_sharenfs[i]}" $dataset log_must zfs set canmount="${old_canmount[i]}" $dataset log_must zfs set mountpoint="${old_mnt[i]}" $dataset diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_012_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_012_pos.ksh index 20c1ed356a15..f18a064d24c4 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_012_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_012_pos.ksh @@ -52,6 +52,8 @@ verify_runnable "global" +log_unsupported "SKIP: sharenfs is disabled on TrueNAS" + set -A pools "$TESTPOOL" "$TESTPOOL1" set -A devs "" "-d $DEVICE_DIR" set -A options "" "-R $ALTER_ROOT"