All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH] tests: shell: Run tests with a fixed TZ
@ 2026-06-18 11:17 Phil Sutter
  2026-06-18 11:21 ` Phil Sutter
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2026-06-18 11:17 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

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                             | 1 +
 .../shell/testcases/parsing/dumps/exclusive_start_cond.json-nft | 2 +-
 tests/shell/testcases/parsing/dumps/exclusive_start_cond.nft    | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/shell/helpers/test-wrapper.sh b/tests/shell/helpers/test-wrapper.sh
index cef38a59b776c..7a73e531f7e42 100755
--- a/tests/shell/helpers/test-wrapper.sh
+++ b/tests/shell/helpers/test-wrapper.sh
@@ -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 TZ='UTC-2'
 
 CLEANUP_UMOUNT_VAR_RUN=n
 
diff --git a/tests/shell/testcases/parsing/dumps/exclusive_start_cond.json-nft b/tests/shell/testcases/parsing/dumps/exclusive_start_cond.json-nft
index b0fffef2d2a33..a1fbaafd1aa13 100644
--- a/tests/shell/testcases/parsing/dumps/exclusive_start_cond.json-nft
+++ b/tests/shell/testcases/parsing/dumps/exclusive_start_cond.json-nft
@@ -1730,7 +1730,7 @@
                   "key": "time"
                 }
               },
-              "right": "1970-01-01 01:00:00"
+              "right": "1970-01-01 02:00:00"
             }
           }
         ]
diff --git a/tests/shell/testcases/parsing/dumps/exclusive_start_cond.nft b/tests/shell/testcases/parsing/dumps/exclusive_start_cond.nft
index 5cd2d1b3c576e..2b94feaa77d8e 100644
--- a/tests/shell/testcases/parsing/dumps/exclusive_start_cond.nft
+++ b/tests/shell/testcases/parsing/dumps/exclusive_start_cond.nft
@@ -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 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
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [nft PATCH] tests: shell: Run tests with a fixed TZ
  2026-06-18 11:17 [nft PATCH] tests: shell: Run tests with a fixed TZ Phil Sutter
@ 2026-06-18 11:21 ` Phil Sutter
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Sutter @ 2026-06-18 11:21 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

On Thu, Jun 18, 2026 at 01:17:43PM +0200, Phil Sutter wrote:
> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-18 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 11:17 [nft PATCH] tests: shell: Run tests with a fixed TZ Phil Sutter
2026-06-18 11:21 ` Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.