Skip to content
Snippets Groups Projects
Commit 1582a905 authored by Sören Tempel's avatar Sören Tempel
Browse files

testing/netsed: fix check()

* Requires ps(1) to support the ppid option which BusyBox doesn't have.
  Therefore, it needs to depend on procps-ng for check().
* Additionally, the tests are as-is not compatible with Ruby 3.3.0.
  A patch restoring compatibility with our package Ruby has been added.
parent 37760d53
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,13 @@ pkgdesc="The network packet stream editor"
url="http://silicone.homelinux.org/projects/netsed/"
arch="all"
license="GPL"
checkdepends="ruby ruby-test-unit"
checkdepends="ruby ruby-test-unit procps-ng"
makedepends="linux-headers"
source="http://silicone.homelinux.org/release/$pkgname/$pkgname-$pkgver.tar.gz
default-path.patch"
fix-tests-with-ruby-3.3.0.patch
default-path.patch"
builddir="$srcdir"/$pkgname-$pkgver
build() {
cd "$builddir"
make
......@@ -27,5 +29,8 @@ package() {
make DESTDIR="$pkgdir" install
}
sha512sums="5ffed86b462c6f89dac9d19184917b5b0759b49862ba0b34701ff2d3aa8cfe55502abb0b09594eb993c50a18962f0ca30c8e9cb96d2445f8c2877189b9a9ac79 netsed-1.3.tar.gz
a4c4cdcdaf8b5b6286d7b4870e06bf5b783e58f8ee19efee245aa3d2612b7257340799ac0fc188c928a11612591499759c477dfce7914cefd8e9403854dfd032 default-path.patch"
sha512sums="
5ffed86b462c6f89dac9d19184917b5b0759b49862ba0b34701ff2d3aa8cfe55502abb0b09594eb993c50a18962f0ca30c8e9cb96d2445f8c2877189b9a9ac79 netsed-1.3.tar.gz
cf8c5d746facce1b698def65b85105c05f648bbc8d8c5fac3d898364fbb23e9884cc3a8abbf221ae08602af80d19ca08b3b77134481b3a4b3da6e93741d496b9 fix-tests-with-ruby-3.3.0.patch
a4c4cdcdaf8b5b6286d7b4870e06bf5b783e58f8ee19efee245aa3d2612b7257340799ac0fc188c928a11612591499759c477dfce7914cefd8e9403854dfd032 default-path.patch
"
Ruby 3.3.0 changed the BasicSocket#recv method to return nil instead
of an empty string when used on a closed socket. The netsed tests need
to be adjusted to account for that.
See https://github.com/ruby/ruby/commit/2e4e4c82c282622a94b9499c182a7e52e21a23b4
diff -upr netsed-1.3.orig/test/tc_tcp.rb netsed-1.3/test/tc_tcp.rb
--- netsed-1.3.orig/test/tc_tcp.rb 2024-07-11 20:49:02.453610429 +0200
+++ netsed-1.3/test/tc_tcp.rb 2024-07-11 20:49:31.873686975 +0200
@@ -61,7 +61,7 @@ class TC_TCPTest < Test::Unit::TestCase
# Check when there is no server
def test_case_02_NoServer
datarecv = TCPSingleDataRecv(self.class::CONFIG[:SERVER], LPORT, 100)
- assert_equal('', datarecv)
+ assert_equal(nil, datarecv)
end
# Check when the client sends the data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment