ubuntu_stress_smoke_test:stress-smoke-test: line 35: [: too many arguments

Bug #1950630 reported by Stefan Bader
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned

Bug Description

This seems restricted to ppc64el nodes and I saw this first on ADT with the sru-20211108 cycle:

  Summary:
    Stressors run: 219
    Skipped: 2, binderfs smi
    Failed: 1, dev-shm
    Oopsed: 0,
    Oomed: 0,
    Passed: 216, access af-alg affinity aio aiol alarm bad-altstack bad-ioctl bigheap branch brk cache cap chattr chdir chmod chown chroot clock close context cpu crypt cyclic daemon dccp dentry dev dir dirdeep dirmany dnotify dup dynlib enosys env epoll eventfd exit-group fallocate fanotify fault fcntl fiemap fifo file-ioctl filename flock fork fp-error fpunch fstat full funcret futex get getdent getrandom handle hdd hrtimers icache icmp-flood inode-flags inotify io iomix ioprio io-uring ipsec-mb itimer judy key kill klog landlock lease link list loadavg locka lockbus lockf lockofd loop madvise malloc mcontend membarrier memfd memhotplug memrate memthrash mergesort mincore misaligned mknod mlock mmap mmapaddr mmapfixed mmapfork mmaphuge mmapmany mq mremap msg msync munmap nanosleep netdev netlink-proc netlink-task nice null open pci personality physpage pidfd ping-sock pipe pipeherd pkey poll prctl prefetch procfs pthread ptrace pty radixsort ramfs rawdev rawpkt rawsock rawudp readahead reboot rename revio rlimit rmap rseq rtc schedpolicy sctp seal seccomp secretmem seek sem sem-sysv sendfile session set shellsort shm shm-sysv sigabrt sigchld sigfd sigfpe sigio signal signest sigpending sigpipe sigq sigrt sigsegv sigsuspend sigtrap skiplist sleep sock sockabuse sockdiag sockmany softlockup splice stackmmap stream swap switch symlink sync-file sysbadaddr sysfs tee timer timerfd tlb-shootdown tmpfs tree tsearch tun udp udp-flood unshare urandom userfaultfd utime vdso verity vfork vm vm-addr vm-rw vm-segv vm-splice wait x86syscall yield zero zombie
    Badret: 0,

  Tests took 352 seconds to run
  stderr:
  /tmp/autopkgtest.NnvRDX/build.dmy/src/autotest/client/tests/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test.sh: line 35: [: too many arguments
01:04:38 INFO | END ERROR ubuntu_stress_smoke_test.stress-smoke-test ubuntu_stress_smoke_test.stress-smoke-test timestamp=1636592678 localtime=Nov 11 01:04:38

Stefan Bader (smb)
summary: - ubuntu_stress_smoke_test;stress-smoke-test: line 35: [: too many
+ ubuntu_stress_smoke_test:stress-smoke-test: line 35: [: too many
arguments
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Line 35 in this script is:

if [ $CGROUP == "cgroup2" ]; then

So, it looks like the following line didn't return the expected value.
CGROUP=$(grep "/sys/fs/cgroup" /proc/mounts | cut -d' ' -f1)

Revision history for this message
Cory Todd (corytodd) wrote :

I noticed this bug too on f/oracle-5.15 on Oracle BM.Standard2.52. The root cause is that $CGROUP may contain multiple lines, e.g.

tempfs
cgroup2
cgroup
cgroup

which doesn't make sense with the check. More concerning though is that if we fix this up (quote string then check for substring) we may hit another error if we cannot create the cgroup memory limit file. This makes the test run without any memory limits. I'm not not sure yet what the right fix is yet because I don't know if these tests are even valid without having a memory limit set.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.