On Tue, Nov 12, 2019 at 10:19:57PM +0100, Phil Sutter wrote: > On Tue, Nov 12, 2019 at 08:35:57PM +0100, Florian Westphal wrote: > > Phil Sutter <phil@xxxxxx> wrote: > > > Hi, > > > > > > On Thu, Aug 29, 2019 at 04:09:03PM +0200, Florian Westphal wrote: > > > [...] > > > > diff --git a/tests/py/any/meta.t.payload b/tests/py/any/meta.t.payload > > > > index 1d8426de9632..402caae5cad8 100644 > > > > --- a/tests/py/any/meta.t.payload > > > > +++ b/tests/py/any/meta.t.payload > > > [...] > > > > +# meta hour "17:00" drop > > > > +ip test-ip4 input > > > > + [ meta load hour => reg 1 ] > > > > + [ cmp eq reg 1 0x0000d2f0 ] > > > > + [ immediate reg 0 drop ] > > > > > > Does this pass for you? I'm getting such warnings: > > > > > > | 7: WARNING: line 3: 'add rule ip test-ip4 input meta hour "17:00" drop': > > > | '[ cmp eq reg 1 0x0000d2f0 ]' mismatches '[ cmp eq reg 1 0x0000e100 ]' > > > > > > On my system, "17:00" consistently translates into 0xe100. > > > > Argh, DST :-( > > > > We will need to add change the test so nft-test.py runs with a fixed > > time zone. > > Isn't this thing translating to UTC before submitting to kernel? I would > assume netlink debug output to be consistent between different > timezones. Timezones and DST obviously exceed my abilities. It just took a while for me to realize that "17:00" in DST means a different point in time than the same value in non-DST. Anyway, this seems to work: | diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py | index ce42b5ddb1cca..1b1db7aa596f3 100755 | --- a/tests/py/nft-test.py | +++ b/tests/py/nft-test.py | @@ -24,6 +24,7 @@ import tempfile | | TESTS_PATH = os.path.dirname(os.path.abspath(__file__)) | sys.path.insert(0, os.path.join(TESTS_PATH, '../../py/')) | +os.environ['TZ'] = 'UTC-2' | | from nftables import Nftables | Choosing UTC-2 fixes most of the warnings. Not all of them, who knows why. (Choosing the right offset was already challenging enough.) Cheers, Phil