<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/utils/attr/test-version.sh, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/'/>
<updated>2026-08-18T09:18:07Z</updated>
<entry>
<title>attr: check the version in test-version.sh</title>
<updated>2026-08-18T09:18:07Z</updated>
<author>
<name>Josef Schlehofer</name>
</author>
<published>2026-08-10T08:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=44a0ea3dd828d2eeea41be99dad7b8743cf7a0b4'/>
<id>urn:sha1:44a0ea3dd828d2eeea41be99dad7b8743cf7a0b4</id>
<content type='text'>
In actions-shared-workflows the version is now checked in
test-version.sh, while test.sh is left for the generic tests.

While moving it, assert the version where it can be asserted. The
package installs attr, getfattr and setfattr, and the latter two do
implement --version:

  printf("%s " VERSION "\\n", progname);

so only attr itself needs the presence check; its getopt string is
"s:V:g:r:lqLRS", where -V takes a value rather than printing a version.

The greps carry an explicit || exit 1: the harness uses only the exit
status of the whole script, so without it a failed match would be
discarded by the [ -x ] that ends the arm and the assertion would never
report anything.

Give libattr an arm of its own as well, so that an unknown sub-package
fails loudly instead of falling off the end of the case and returning 0.

Signed-off-by: Josef Schlehofer &lt;pepe.schlehofer@gmail.com&gt;
</content>
</entry>
</feed>
