<feed xmlns='http://www.w3.org/2005/Atom'>
<title>firewall4/tests/lib/mocklib, branch master</title>
<subtitle>OpenWrt nftables firewall</subtitle>
<id>https://git.openwrt.org/project/firewall4/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/firewall4/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/'/>
<updated>2022-08-12T12:35:58Z</updated>
<entry>
<title>fw4: support automatic includes</title>
<updated>2022-08-12T12:35:58Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-08-11T11:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=a4484d4612931800583a7219271b63224491244c'/>
<id>urn:sha1:a4484d4612931800583a7219271b63224491244c</id>
<content type='text'>
Introduce a new directory tree /usr/share/nftables.d/ which may contain
partial nftables files being included into the rendered ruleset.

The include position is derived from the file path;

 - Files in .../nftables.d/table-pre/ and .../nftables.d/table-post/ are
   included before and after the `table inet fw4 { ... }` declaration
   respectively

 - Files in .../nftables.d/ruleset-pre/ and .../nftables.d/ruleset-post/
   are included before the first chain and after the last chain
   declaration within the fw4 table respectively

 - Files in .../nftables.d/chain-pre/${chain}/ and .../chain-post/${chain}/
   are included before the first and after the last rule within the mentioned
   chain of the fw4 table respectively

Automatic includes can be disabled by setting the `auto_includes` option to
`0` in the global defaults section.

Also adjust testcases accordingly.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>fw4: add support for configurable includes</title>
<updated>2022-06-15T11:32:17Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-06-13T13:49:14Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=11256ff0374fb594e31b0a4e3857f3810ba2933d'/>
<id>urn:sha1:11256ff0374fb594e31b0a4e3857f3810ba2933d</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>fw4: simplify `is_loopback_dev()`</title>
<updated>2022-06-14T14:54:06Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-06-13T13:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=5994466353ecbd4e6fac738aa956b2cbd9f6308b'/>
<id>urn:sha1:5994466353ecbd4e6fac738aa956b2cbd9f6308b</id>
<content type='text'>
Use `fs.readfile()` to simplify the code reading flag values from sysfs.

Also add a mock implementation of `fs.readfile()` using the same mock
data files as `fs.open()`.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>tests: fix mocked `fd.read("line")` api</title>
<updated>2022-05-09T08:49:43Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-05-09T08:49:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=7782017c19071f19419c10cc1d740515f6bf3bf8'/>
<id>urn:sha1:7782017c19071f19419c10cc1d740515f6bf3bf8</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>treewide: forward compatibility changes</title>
<updated>2022-03-22T20:05:17Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-03-22T18:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=fde80708d63d54be18037c598d1e6aef0c65ca08'/>
<id>urn:sha1:fde80708d63d54be18037c598d1e6aef0c65ca08</id>
<content type='text'>
Adapt testsuite code and fw4 wrapper to current ucode HEAD semantics,
in particular ensure that main.uc is invoked as template since ucode now
defaults to raw mode for cli invocations.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>tests: mocklib: forward compatibility change</title>
<updated>2022-02-11T16:41:00Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-02-11T16:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=93b710d49f57876f6885d8842178dbf1181b9330'/>
<id>urn:sha1:93b710d49f57876f6885d8842178dbf1181b9330</id>
<content type='text'>
Upstream ucode will change ord()'s return value type from array to integer,
add logic to handle both old and new cases.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>tests: implement fs.opendir() mock interface</title>
<updated>2022-02-05T23:33:04Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-02-05T23:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=eb9c25aaae63b18cb22783c5ba3260b1aabbcb96'/>
<id>urn:sha1:eb9c25aaae63b18cb22783c5ba3260b1aabbcb96</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>tests: fix mocked fs.popen() trace log</title>
<updated>2022-02-05T23:33:04Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-02-05T23:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=d30ff48e175fde570ffce5709bf4bf7a9893d00d'/>
<id>urn:sha1:d30ff48e175fde570ffce5709bf4bf7a9893d00d</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>tests: run testcases in strict mode</title>
<updated>2022-01-28T11:06:01Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-01-28T10:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=bd5dc4beaa9b4425f2074ca1f91cc9ecbcf76379'/>
<id>urn:sha1:bd5dc4beaa9b4425f2074ca1f91cc9ecbcf76379</id>
<content type='text'>
Since /sbin/fw4 invokes ucode in strict mode, we should do the same in
test cases.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>treewide: convert deprecated syntax</title>
<updated>2021-09-01T13:31:22Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2021-09-01T13:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=cf835cecc8a449b2d2019f1ef4f085e535d5c1c1'/>
<id>urn:sha1:cf835cecc8a449b2d2019f1ef4f085e535d5c1c1</id>
<content type='text'>
 - `local` has been deprecated in favor to `let`
 - `delete(obj, "prop")` has been depracted in favor to `delete obj.prop`

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
