Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test broken? #57

Open
ani-sinha opened this issue Aug 14, 2021 · 1 comment
Open

unit test broken? #57

ani-sinha opened this issue Aug 14, 2021 · 1 comment

Comments

@ani-sinha
Copy link
Contributor

ani-sinha commented Aug 14, 2021

--- command ---
05:44:32 /home/anisinha/workspace/bst/test/cram.sh /home/anisinha/workspace/bst/test
--- stdout ---
diff --git a/home/anisinha/workspace/bst/test/net.t b/home/anisinha/workspace/bst/test/net.t.err
index ed61ab5..5338901 100755
--- a/home/anisinha/workspace/bst/test/net.t
+++ b/home/anisinha/workspace/bst/test/net.t.err
@@ -19,8 +19,8 @@ MACVLANs
 IPVLANs
 
 	$ bst --nic parent,dummy,address=fe:ed:de:ad:be:ef bst --nic ipvlan,type=ipvlan,link=parent -- ip link show ipvlan
-	2: ipvlan@if2: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
-	    link/ether fe:ed:de:ad:be:ef brd ff:ff:ff:ff:ff:ff link-netnsid 0
+	2: ipvlan: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
+	    link/ether fe:ed:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
 
 Adding addresses
 
@@ -29,7 +29,7 @@ Adding addresses
 	    link/ether fe:ed:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
 	    inet 172.20.0.1/32 brd 172.20.0.1 scope global dummy
 	       valid_lft forever preferred_lft forever
-	    inet6 fe80::fced:deff:fead:beef/64 scope link tentative 
+	    inet6 fe80::fced:deff:fead:beef/64 scope link 
 	       valid_lft forever preferred_lft forever
 
 	$ bst --nic dummy,type=dummy,address=fe:ed:de:ad:be:ef --ip 172.20.0.1/16,dev=dummy -- ip addr show dummy
@@ -37,7 +37,7 @@ Adding addresses
 	    link/ether fe:ed:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
 	    inet 172.20.0.1/16 brd 172.20.255.255 scope global dummy
 	       valid_lft forever preferred_lft forever
-	    inet6 fe80::fced:deff:fead:beef/64 scope link tentative 
+	    inet6 fe80::fced:deff:fead:beef/64 scope link 
 	       valid_lft forever preferred_lft forever
 
 Adding routes
@@ -59,4 +59,4 @@ Adding routes
 	default via 172.20.0.1 dev lo 
 
 	$ bst --route dev=lo -- ip route show
-	default dev lo scope link 
+	default dev lo 
diff --git a/home/anisinha/workspace/bst/test/bst.t b/home/anisinha/workspace/bst/test/bst.t.err
index 230ba9d..d0e01cd 100755
--- a/home/anisinha/workspace/bst/test/bst.t
+++ b/home/anisinha/workspace/bst/test/bst.t.err
@@ -121,6 +121,8 @@ Testing hostname semantics
 Testing persistence
 
 	$ mkdir -p foo bar; trap 'bst-unpersist foo && rmdir foo bar' EXIT; bst --persist=foo sh -c 'mount -t tmpfs none bar && echo hello > bar/greeting' && [ ! -f bar/greeting ] && bst --share mnt,user=foo sh -c '[ "$(cat '"$PWD"'/bar/greeting)" = "hello" ]'
+	bst: bind-mount /proc/1173705/ns/mnt to foo/mnt: Invalid argument (is the destination on a private mount?)
+	[1]
 
 Testing --limit core / general tests
 	$ bst --limit core=0 test/print_limits core
-------


@Snaipe
Copy link
Member

Snaipe commented Aug 14, 2021

Some of these system tests are a bit machine-dependent, so the textual match can make them broken on some machines but not others.

A solution to the ip link output breakage would be to tell ip to output json, and then use jq to select the few fields that actually matter. Another would be to switch to python-cram (rather than the old cram.sh) and use regexp matching.

The second breakage is because your distro makes your rootfs & any submount have a shared propagation, which breaks --persist. A possible solution would be to wrap the test in another bst invocation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants