← Back to team overview

kernel-packages team mailing list archive

[Bug 1434528] Re: [utopic] btrfs: label should not contain return char

 

Fix tested, $ uname -a
Linux ubuntu 3.16.0-34-generic #45-Ubuntu SMP Mon Mar 23 17:21:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Works fine with the proposed kernel.

** Tags removed: verification-needed-utopic
** Tags added: verification-done-utopic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1434528

Title:
  [utopic] btrfs: label should not contain return char

Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Utopic:
  Fix Committed

Bug description:
  SRU Justification:

  [Impact]
  Minor impact: It is possible to introduce a newline into the btrfs label output from the btrfs sys file /sys/fs/btrfs/$UUID/label, this newline should be filtered out.

  [Fix]
  clean upstream cherry pick 48fcc3ff7dce0138c053833adf81670494f177f3 "btrfs: label should not contain return char".

  [Testcase]
  The commit contains a suitable testcase, see below:

  TEST_DEV=/dev/vdb
  TEST_DIR=/home/sat/mnt

  umount /home/sat/mnt

  mkfs.btrfs -f $TEST_DEV
  UUID=$(btrfs fi show $TEST_DEV | head -1 | sed -e 's/.*uuid: \([-0-9a-z]*\)$/\1/')
  mount $TEST_DEV $TEST_DIR
  LABELFILE=/sys/fs/btrfs/$UUID/label

  echo "Test for empty label..." >&2
  LINES="$(cat $LABELFILE | wc -l | awk '{print $1}')"
  RET=0

  if [ $LINES -eq 0 ] ; then
      echo '[PASS] Trailing \n is removed correctly.' >&2
  else
      echo '[FAIL] Trailing \n still exists.' >&2
      RET=1
  fi

  echo "Test for non-empty label..." >&2

  echo testlabel >$LABELFILE
  LINES="$(cat $LABELFILE | wc -l | awk '{print $1}')"

  if [ $LINES -eq 1 ] ; then
      echo '[PASS] Trailing \n is removed correctly.' >&2
  else
      echo '[FAIL] Trailing \n still exists.' >&2
      RET=1
  fi

  exit $RET

  This is to be SRU'd for utopic only, trusty does not have this
  interface supported and this fix is carried in vivid.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1434528/+subscriptions


References