All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongxu Jia <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 0/6] fix xuser write to usb storage failed
Date: Fri, 12 Jul 2013 17:29:24 +0800	[thread overview]
Message-ID: <cover.1373599041.git.hongxu.jia@windriver.com> (raw)

Test Case

* Steps
1) preparation
...
one target: atom-pc
two usb sticks: one for boot and install, another for plug test, they are both vfat filesystem.
...

2) config 
conf/local.conf:
...
MACHINE ?= "atom-pc"
...

3) build image
bitbake core-image-sato

4) load image to atom-pc
Test Case TC-2927: boot and install from usb 

5) open a terminal/ssh of atom-pc
Test Case TC-2955: remote access by ssh 

6) hotplug test: usb stick with vfat filesystem is accessible
Test Case TC-2947: usb mount
Test Case TC-2950: usb write files
Test Case TC-2948: usb read files
Test Case TC-2949: usb umount

7) coldplug test: usb stick with vfat filesystem is accessible
plug usb stick
boot system
create files in usb
view files in usb by file browser

8) use systemd for the main image and use sysvinit for the rescue image
Modify conf/local.conf, and repeat step 3 to 7;
...
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
...

9) use systemd exclusively
Modify conf/local.conf, and repeat step 3 to 7;
...
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
...

* Expected Results:
1) build image success

2) the owner of plugin usb stick is `xuser', it will be automatically
mount/umount, and xuser could read files from usb and write files to it.

root@emenlow-noemgd:~# mount
/dev/sdc1 on /media/sdc1 type vfat (rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1000,fmask=0177,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,quiet,errors=remount-ro,user)
/dev/sdb on /media/realroot type vfat (rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1000,fmask=0177,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,quiet,errors=remount-ro)

root@emenlow-noemgd:~# ls /media/ -al
drwxr-xr-x    2 root     root         16384 Jan  1  1970 realroot
drwx------    3 xuser    xuser         1024 Jun  9 12:08 sdc1

root@emenlow-noemgd:~# su xuser
xuser@emenlow-noemgd:~$ echo "hello world" > /media/sdc1/test
xuser@emenlow-noemgd:~$ cat /media/sdc1/test 
hello world

//Hongxu


The following changes since commit a63229917a5708de2d161aba0d67168ce0da6365:

  meta-yocto-bsp: update reference board SRCREVs (2013-07-10 09:45:51 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib hongxu/fix-udev-xuser
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-udev-xuser

Hongxu Jia (6):
  pmount: add version 0.9.23
  atom-pc:fix xuser write to usb storage failed
  udev-extraconf:fix xuser write to usb storage failed
  udev: fix invoking pmount failed based on sysvinit
  pmount: allow users in disk group to perform pmount/pumount
  xuser-account: add xuser to disk group

 meta-yocto-bsp/conf/machine/atom-pc.conf           |   1 +
 meta/recipes-core/udev/udev-extraconf/mount.sh     |  31 +++++-
 meta/recipes-core/udev/udev/init                   |   1 +
 ...-option-f-to-mount-already-mounted-device.patch | 115 +++++++++++++++++++++
 meta/recipes-extended/pmount/pmount_0.9.23.bb      |  34 ++++++
 .../user-creation/xuser-account_0.1.bb             |   2 +-
 6 files changed, 181 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 meta/recipes-core/udev/udev-extraconf/mount.sh
 create mode 100644 meta/recipes-extended/pmount/files/pmount-add-option-f-to-mount-already-mounted-device.patch
 create mode 100644 meta/recipes-extended/pmount/pmount_0.9.23.bb

-- 
1.8.1.2



             reply	other threads:[~2013-07-12  9:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12  9:29 Hongxu Jia [this message]
2013-07-12  9:29 ` [PATCH 1/6] pmount: add version 0.9.23 Hongxu Jia
2013-07-12  9:29 ` [PATCH 2/6] atom-pc:fix xuser write to usb storage failed Hongxu Jia
2013-07-15  7:14   ` Saul Wold
2013-07-15  7:42     ` Hongxu Jia
2013-07-12  9:29 ` [PATCH 3/6] udev-extraconf:fix " Hongxu Jia
2013-07-12  9:29 ` [PATCH 4/6] udev: fix invoking pmount failed based on sysvinit Hongxu Jia
2013-07-12  9:29 ` [PATCH 5/6] pmount: allow users in disk group to perform pmount/pumount Hongxu Jia
2013-07-12  9:29 ` [PATCH 6/6] xuser-account: add xuser to disk group Hongxu Jia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1373599041.git.hongxu.jia@windriver.com \
    --to=hongxu.jia@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.