Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/debug-bind-mount.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env cram.sh

[DO-NOT-MERGE] Debug bind mount environment

Host /dev/shm state

$ findmnt /dev/shm 2>&1 || true
$ grep '/dev/shm\|/mnt' /proc/self/mountinfo || echo "no /dev/shm or /mnt in host mountinfo"

Inside bst with bind mount: mountinfo lines for /dev/shm and /mnt

$ bst --mount /dev/shm,/mnt,none,bind sh -c 'grep "/dev/shm\|/mnt" /proc/self/mountinfo'

Inside bst with bind mount: /proc/mounts lines for /dev/shm and /mnt

$ bst --mount /dev/shm,/mnt,none,bind sh -c 'grep "/dev/shm\|/mnt" /proc/mounts'

The actual test assertion (should print OK if device IDs match)

$ bst --mount /dev/shm,/mnt,none,bind awk '/\/dev\/shm/ { shm=$3 } /\/mnt/ { mnt=$3 } END { printf "shm=%s mnt=%s => ", shm, mnt; if (shm == mnt) { print "OK" } else { print "KO" } }' /proc/self/mountinfo
Loading