<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2082</bug_id>
          
          <creation_ts>2012-03-13 15:47:04 +0000</creation_ts>
          <short_desc>Additional test case: shared sstate-cache between users</short_desc>
          <delta_ts>2026-03-19 00:22:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Build Testing</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>  </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hatle">mark.hatle</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>gizero</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>laurentiu.serban</cc>
    
    <cc>lee_ballard</cc>
    
    <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>sivan.wang</cc>
    
    <cc>song.liu</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19000</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-03-13 15:47:04 +0000</bug_when>
    <thetext>The following is a new proposed test case to further validate the behavior of the sstate-cache.

Step 1:

(as root) add a new user: test1
(as root) add a new user: test2

Step 2:

(as user test1) 
* make sure that the test1 directory is only accessible by the test1 user:
  chmod 0700 ~test1
* clone the Poky repository
* setup conf/local.conf
* perform core-image-minimal build
  bitbake core-image-minimal

Step 3:

(as root) copy the sstate-cache and downloads to a location accessible by multiple users (i.e. a new /test directory)

Set the directories and files as only readable, not writeable.

chown -R root:root /test/sstate-cache  /test/downloads
chmod -R ugo+rx /test/sstate-cache  /test/downloads
chmod -R go-w /test/sstate-cache  /test/downloads

Step 4:

(as user test1)
* remove the poky directory, and build directory
(this ensures that none of the previous paths exist on the disk...)

Step 5:

(as user test2)

* make sure that the test1 directory is only accessible by the test1 user:
  chmod 0700 ~test1
* clone the Poky repository
* setup conf/local.conf -- add the following (adjust directories as necessary)

SSTATE_MIRRORS ?= &quot;\
file://.* file:///test/sstate-cache/&quot;

PREMIRRORS ?= &quot;\
bzr://.*/.*   file:///test/downloads/ \n \
cvs://.*/.*   file:///test/downloads/ \n \
git://.*/.*   file:///test/downloads/ \n \
hg://.*/.*    file:///test/downloads/ \n \
osc://.*/.*   file:///test/downloads/ \n \
p4://.*/.*    file:///test/downloads/ \n \
svk://.*/.*   file:///test/downloads/ \n \
svn://.*/.*   file:///test/downloads/ \n \
ftp://.*/.*      file:///test/downloads/ \n \
http://.*/.*     file:///test/downloads/ \n \
https://.*/.*    file:///test/downloads/ \n&quot;

* perform the core-image-minimal build [expected results is this will pass, and be considerably quicker then the original build.  It should re-use the sstate-cache for everything.]
  bitbake core-image-minimal

* perform additional builds to verify behavior of the sysroot, i.e. build psplash
  bitbake psplash

(psplash should build and package properly... in existing tests this is where the failure has occurred, indicating a problem with the compiler or sysroot setup.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19001</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-03-13 15:47:27 +0000</bug_when>
    <thetext>Assigned to Darren to verify the test case...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19103</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-14 21:17:15 +0000</bug_when>
    <thetext>Following Mark&apos;s instructions:

Host OS: Fedora 15 64bit

[test2@f16-64 build]$   bitbake psplash
Loading cache: 100% |##############################################| ETA:  00:00:00
Loaded 1105 entries from dependency cache.

OE Build Configuration:
BB_VERSION        = &quot;1.15.1&quot;
TARGET_ARCH       = &quot;i586&quot;
TARGET_OS         = &quot;linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.1+snapshot-20120314&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta
meta-yocto        = &quot;master:cb771ef55afc9acb0babdc4237bf5320cdc8ff6b&quot;

...

ERROR: Function failed: do_configure (see /home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/temp/log.do_configure.23906 for further information)
ERROR: Logfile of failure stored in: /home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/temp/log.do_configure.23906
Log data follows:
| DEBUG: SITE files [&apos;endian-little&apos;, &apos;bit-32&apos;, &apos;ix86-common&apos;, &apos;common-linux&apos;, &apos;common-glibc&apos;, &apos;i586-linux&apos;, &apos;common&apos;]
| automake (GNU automake) 1.11.2
| Copyright (C) 2011 Free Software Foundation, Inc.
| License GPLv2+: GNU GPL version 2 or later &lt;http://gnu.org/licenses/gpl-2.0.html&gt;
| This is free software: you are free to change and redistribute it.
| There is NO WARRANTY, to the extent permitted by law.
|
| Written by Tom Tromey &lt;tromey@redhat.com&gt;
|        and Alexandre Duret-Lutz &lt;adl@gnu.org&gt;.
| AUTOV is 1.11
| NOTE: Executing autoreconf --verbose --install --force --exclude=autopoint -I/home/test2/poky/build/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.11 -I /home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/git/aclocal-copy/
| autoreconf: Entering directory `.&apos;
| autoreconf: configure.ac: not using Gettext
| autoreconf: running: aclocal -I /home/test2/poky/build/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.11 -I /home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/git/aclocal-copy/ -I /home/test2/poky/build/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.11 -I /home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/git/aclocal-copy/ --force --warnings=cross
| aclocal: unknown warning category `cross&apos;
| autoreconf: configure.ac: tracing
| autoreconf: configure.ac: not using Libtool
| autoreconf: running: /home/test2/poky/build/tmp/sysroots/x86_64-linux/usr/bin/autoconf --include=/home/test2/poky/build/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.11 --include=/home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/git/aclocal-copy/ --force --warnings=cross
| autoreconf: running: /home/test2/poky/build/tmp/sysroots/x86_64-linux/usr/bin/autoheader --include=/home/test2/poky/build/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.11 --include=/home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/git/aclocal-copy/ --force --warnings=cross
| autoreconf: running: automake --foreign --add-missing --copy --force-missing --warnings=cross
| automake: unknown warning category `cross&apos;
| configure.ac:3: installing `./install-sh&apos;
| configure.ac:3: installing `./missing&apos;
| Makefile.am: installing `./depcomp&apos;
| autoreconf: running: gnu-configize
| autoreconf: Leaving directory `.&apos;
| NOTE: Running /home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/git/configure  --build=x86_64-linux       --host=i586-poky-linux                   --target=i586-poky-linux                --prefix=/usr              --exec_prefix=/usr              --bindir=/usr/bin         --sbindir=/usr/sbin              --libexecdir=/usr/libexec               --datadir=/usr/share               --sysconfdir=/etc               --sharedstatedir=/com     --localstatedir=/var             --libdir=/usr/lib               --includedir=/usr/include                  --oldincludedir=/usr/include            --infodir=/usr/share/info                  --mandir=/usr/share/man                 --disable-silent-rules             --disable-dependency-tracking                   --with-libtool-sysroot=/home/test2/poky/build/tmp/sysroots/qemux86
| configure: WARNING: unrecognized options: --disable-silent-rules, --with-libtool-sysroot
| configure: loading site script /home/test2/poky/meta/site/endian-little
| configure: loading site script /home/test2/poky/meta/site/ix86-common
| configure: loading site script /home/test2/poky/meta/site/common-linux
| configure: loading site script /home/test2/poky/meta/site/common-glibc
| configure: loading site script /home/test2/poky/meta/site/common
| configure: loading site script /home/test2/poky/build/tmp/sysroots/qemux86/usr/share/i586-poky-linux_config_site.d/eglibc_config
| configure: loading site script /home/test2/poky/build/tmp/sysroots/qemux86/usr/share/i586-poky-linux_config_site.d/ncurses_config
| checking for a BSD-compatible install... /usr/bin/install -c
| checking whether build environment is sane... yes
| checking for i586-poky-linux-strip... i586-poky-linux-strip
| checking for a thread-safe mkdir -p... /bin/mkdir -p
| checking for gawk... gawk
| checking whether make sets $(MAKE)... yes
| checking whether to enable maintainer-specific portions of Makefiles... no
| checkinERROR: Function failed: do_configure (see /home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/temp/log.do_configure.23906 for further information)
| g for style of include used by make... GNU
| checking for i586-poky-linux-gcc... ccache i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/home/test2/poky/build/tmp/sysroots/qemux86
| checking whether the C compiler works... yes
| checking for C compiler default output file name... a.out
| checking for suffix of executables...
| checking whether we are cross compiling... yes
| checking for suffix of object files... configure: error: in `/home/test2/poky/build/tmp/work/i586-poky-linux/psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2/git&apos;:
| configure: error: cannot compute suffix of object files: cannot compile
| See `config.log&apos; for more details
| ERROR: oe_runconf failed
NOTE: package psplash-0.1+git1+e05374aae945bcfc6d962ed0d7b2774b77987e1d-r2: task do_configure: Failed
ERROR: Task 6 (/home/test2/poky/meta/recipes-core/psplash/psplash_git.bb, do_configure) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 790 tasks of which 785 didn&apos;t need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/test2/poky/meta/recipes-core/psplash/psplash_git.bb, do_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code.



Taking a look at the config.log in the ${WORKDIR}/git I grepped for test1 and found:

[test2@f16-64 git]$ grep test1 *
config.log:Configured with: /home/test1/poky/build/tmp/work-shared/gcc-4.6.3+svnr184847-r23/gcc-4_6-branch/configure --build=x86_64-linux --host=x86_64-linux --target=i586-poky-linux --prefix=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr --exec_prefix=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr --bindir=/home/test /poky/build/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux --sbindir=/home/test /poky/build/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux --libexecdir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux --datadir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr/share --sysconfdir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/etc --sharedstatedir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/com --localstatedir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/var --libdir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr/lib/i586-poky-linux --includedir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr/include --oldincludedir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr/include --infodir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr/share/info --mandir=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/test1/poky/build/tmp/sysroots/x86_64-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=i586-poky-linux- --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-cheaders=c_global --with-local-prefix=/home/test1/poky/build/tmp/sysroots/qemux86/usr --with-gxx-include-dir=/home/test1/poky/build/tmp/sysroots/qemux86/usr/include/c++ --with-sysroot=/home/test1/poky/build/tmp/sysroots/qemux86 --with-build-sysroot=/home/test1/poky/build/tmp/sysroots/qemux86 --enable-poison-system-directories --with-headers=/home/test1/poky/build/tmp/sysroots/qemux86/usr/include --disable-libunwind-exceptions --with-mpfr=/home/test1/poky/build/tmp/sysroots/x86_64-linux/usr --with-system-zlib --disable-nls --enable-__cxa_atexit
config.log:cc1: error: /home/test1/poky/build/tmp/sysroots/qemux86/home/test1/poky/build/tmp/sysroots/qemux86/usr/include: Permission denied
config.log:cc1: error: /home/test1/poky/build/tmp/sysroots/qemux86/usr/include: Permission denied


Hopefully this provides some additional detail validating Mark&apos;s initial report. I&apos;m handing this off to Jiajun now for further review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19140</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-03-15 14:47:09 +0000</bug_when>
    <thetext>Darren was able to reproduce the failure using the proposed test-case.

Note: To be clear, this default is not about the failure (there is already another defect covering that), but instead about adding this additional test to ensure we don&apos;t get failures like this in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19141</commentid>
    <comment_count>4</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2012-03-15 15:20:07 +0000</bug_when>
    <thetext>I will add the testing into QA 1.2 M4 cycle. And we are setting up the regression test server for some build feature testing automation. According to the description for the failure, we could add a case on regression test server to cover the case in regular testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21447</commentid>
    <comment_count>5</comment_count>
    <who name="Laurentiu Serban">laurentiu.serban</who>
    <bug_when>2012-05-18 12:02:54 +0000</bug_when>
    <thetext>To be automated by the RO QA team.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36971</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-09-19 14:03:14 +0000</bug_when>
    <thetext>Moving this to future. 
This was tested manually, but the intention is to have it automated. 

The initial idea was to test this with autotest but the idea of using autotest with yocto has been dropped. We will investigate more ways into the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39667</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2014-01-06 10:54:39 +0000</bug_when>
    <thetext>Corneliu will look into it, to see if this worth being automated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40048</commentid>
    <comment_count>8</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2014-01-27 15:09:57 +0000</bug_when>
    <thetext>Looking into a way to automate this with oe-selftest.

Initial thoughts: The test should check for the existance of 2 pre-existing test users (ex: selftest_user_1 and selftest_user_2) and will run commands on their behalf. 

Specifics about the shell environment and permissions of these users will be determined along the way.

Any thoughts on this are welcome!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40162</commentid>
    <comment_count>9</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2014-02-03 11:09:18 +0000</bug_when>
    <thetext>Hello Mark,

We have been working on a similar test that has been merged in master: https://bugzilla.yoctoproject.org/show_bug.cgi?id=2081

We are thinking at molding this test to be similar to the others. Here is the proposed process:

We will use only 1 user
1) create poky/build1
2) in poky/build1 create core-image-minimal
3) move poky/build1/sstate-cache and poky/build1/downloads to a world-readable location, say /test/sstate-cache/ respectively /test/downloads/ and also make them world-readable
*NOTE: Because we will use these as MIRRORS, is there any point in making them read-only? Would bitbake attempt to modify mirror sources? 
4) remove poky/build1
5) create poky/build2 and make test/sstate-cache and test/downloads mirrors for it
6) create core-image-minimal in poky/build2

Will the above test scenario detect the issues you have in mind?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40166</commentid>
    <comment_count>10</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2014-02-03 16:37:09 +0000</bug_when>
    <thetext>The general test looks fine, but it needs to be done over two users.

We have found (in the past) some cases where being the same user worked, being a different use did not.  

Being the same user allows things to be written to the &quot;old&quot; compile paths it didn&apos;t detect the issue.

Once we switched to two different users, then it would fail as it couldn&apos;t read/write the other users directory due to permissions protections.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42119</commentid>
    <comment_count>11</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2014-04-02 07:15:27 +0000</bug_when>
    <thetext>Moving to 1.7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50360</commentid>
    <comment_count>12</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2015-04-16 16:01:13 +0000</bug_when>
    <thetext>I think this test is still needed.  As commented on last time, the only piece missing to the test case proposal is running it with two different user ids.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96807</commentid>
    <comment_count>13</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:21 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>