]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: Run tests with a fixed TZ master
authorPhil Sutter <phil@nwl.cc>
Thu, 18 Jun 2026 10:41:34 +0000 (12:41 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 18 Jun 2026 11:18:07 +0000 (13:18 +0200)
Inheriting the system's local TZ is problematic with meta time/hour
expressions in dumps. Use UTC-2 since that matches what py test suite is
using.

While at it, fix up the first two dumps containing such expressions.

Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/shell/helpers/test-wrapper.sh
tests/shell/testcases/parsing/dumps/exclusive_start_cond.json-nft
tests/shell/testcases/parsing/dumps/exclusive_start_cond.nft

index cef38a59b776c3d294cc1227560a56258c7a50fd..7a73e531f7e42a4c9c0428e7e1f5ac94f9e5a699 100755 (executable)
@@ -62,6 +62,7 @@ START_TIME="$(cut -d ' ' -f1 /proc/uptime)"
 
 export TMPDIR="$NFT_TEST_TESTTMPDIR"
 export NFT_TEST_LIBRARY_FILE="$NFT_TEST_BASEDIR/helpers/lib.sh"
 
 export TMPDIR="$NFT_TEST_TESTTMPDIR"
 export NFT_TEST_LIBRARY_FILE="$NFT_TEST_BASEDIR/helpers/lib.sh"
+export TZ='UTC-2'
 
 CLEANUP_UMOUNT_VAR_RUN=n
 
 
 CLEANUP_UMOUNT_VAR_RUN=n
 
index b0fffef2d2a33607668b1c962286a71ee59a138f..a1fbaafd1aa13bd5c865bfcd4977cc42e9c5e6b2 100644 (file)
                   "key": "time"
                 }
               },
                   "key": "time"
                 }
               },
-              "right": "1970-01-01 01:00:00"
+              "right": "1970-01-01 02:00:00"
             }
           }
         ]
             }
           }
         ]
index 5cd2d1b3c576e913efce467b5a4a51737884995a..2b94feaa77d8ee8cc195dab735fbd588c54a01a5 100644 (file)
@@ -73,7 +73,7 @@ table ip t {
                limit rate 1/second burst 5 packets oifgroup "default"
                limit rate 1/second burst 5 packets meta cgroup 0
                limit rate 1/second burst 5 packets meta ipsec missing
                limit rate 1/second burst 5 packets oifgroup "default"
                limit rate 1/second burst 5 packets meta cgroup 0
                limit rate 1/second burst 5 packets meta ipsec missing
-               limit rate 1/second burst 5 packets meta time "1970-01-01 01:00:00"
+               limit rate 1/second burst 5 packets meta time "1970-01-01 02:00:00"
                limit rate 1/second burst 5 packets meta day "Sunday"
                limit rate 1/second burst 5 packets meta hour "02:00"
                limit rate 1/second burst 5 packets socket mark 0x00000000
                limit rate 1/second burst 5 packets meta day "Sunday"
                limit rate 1/second burst 5 packets meta hour "02:00"
                limit rate 1/second burst 5 packets socket mark 0x00000000