/srv/irclogs.ubuntu.com/2014/12/04/#ubuntu-desktop.txt

=== duflu_ is now known as duflu
pittiGood morning06:05
didrocksgood morning!06:50
pittiça va didrocks, comment vas-tu ?07:12
didrockspitti: ça va bien, et toi ?07:15
pittije vais bien aussi07:16
didrockspitti: do you plan to go to the systemd hackfest?07:17
didrocks(at FOSDEM)07:17
pittididrocks: yes, I do07:17
pittiyou too?07:17
didrockspitti: yeah :)07:18
didrockspitti: I'm eager to add the topic about how to handle all our use-cases with presets, but I'm afraid for that to be quite late for vivid07:18
pittididrocks: that's ok, I think; we can do that for jessie+1/vivid+107:19
didrockspitti: meaning that our first implementation with purge/remove and so on would be broken, right?07:19
didrocksI'm unsure how much bad press that would have, probably less for us than for jessie (and it's too late for jessie)07:19
pittididrocks: most probably none at all -- nobody complained about it in Debian so far07:20
didrocksok then :)07:20
* didrocks subscribed to the event and will add the topic07:20
mlankhorstmorning08:23
seb128good morning desktopers08:29
didrockshey mlankhorst, seb12808:29
pittibonjour seb12808:31
pittihey mlankhorst08:31
seb128hey didrocks pitti mlankhorst08:32
mlankhorstg'day08:33
didrockspitti: is there a simple way to rerun some tests when adt-run failed? (I want to have the same environment wrapper to have the PPID magic when rebooting the vm08:40
didrockspitti: I sshed into the env08:40
pittididrocks: you used -s?08:41
didrocksyeah08:41
pittididrocks: adt-run shows you the directory where the package is in the testbed (/tmp/adt-run.XXXX/...)08:41
pittididrocks: cd there, and call debian/tests/foo (perhaps with sudo if the test needs root)08:41
didrockspitti: ok, no wrapper needed, nothing magic?08:42
didrocks(even for reboots)08:42
didrocksI'm asking because it doesn't seem that the call for rebooting the testbed works when directly executing like in sudo python3 debian/tests/display-managers08:43
pittididrocks: if your test needs $ADTTMP, you need to set that; but that's about the only thing08:44
pittididrocks: it should08:44
didrocksor maybe 'autopkgtest-reboot boot-systemd' only works under upstart?08:44
pittididrocks: oh wait -- rebooting kills your ssh session, of course08:44
pittididrocks: no, it works under any init08:44
didrockspitti: well, it doesn't do anything, like if it ignored the subprocess call08:45
pittididrocks: ah right, sorry08:45
didrocksand run all the tests, but without rebooting in between (only when I sshed to it, working well under adt-run)08:45
pittididrocks: so yes, manually running a test like this with reboot isn't going to work08:45
didrocksah ;)08:45
pittididrocks: what you can do is to reboot, and call your test with ADT_REBOOT_MARK=whatever08:45
pittididrocks: that's the same effect as what adt-run does08:46
pittididrocks: I mean autopkgtest-reboot08:46
pittididrocks: so run your test, reboot manually, re-run with ADT_REBOOT_MARK=whatever08:46
didrockspitti: well, the reboot is in the middle of the tests, so not going to work08:46
didrocksas I prepared the test setup08:46
didrocksreboot08:46
pittididrocks: autopkgtest-reboot will at least kill the test at the right time08:46
didrocksand check status08:46
pittididrocks: otherwise, it seems way easier to just comment out all other tests from debian/tests/control and run with adt-run08:47
didrockspitti: but rebooting during one test isn't supported from what you told? (even with adt-run)08:47
pittididrocks: sure it is, that's the whole point of it08:48
pittididrocks: it's just tricker to do if you run a test manually08:48
pittididrocks: so, what happens:08:48
pitti- test gets started08:48
pitti- test calls autopkgtest-reboot; that SIGKILLs its parent (i. e. your test)08:48
didrocksyeah08:49
pitti- [*] adt-run sees that the test was killed, and that there is a reboot marker set08:49
pitti- [*] adt-run reboots the test bed and re-runs the test with ADT_REBOOT_MARK=whatever08:49
pitti- your test starts again, checks $ADT_REBOOT_MARK and resumes at the right place08:49
pittididrocks: if you run a test manually, you need to do the steps [*] manually08:49
pittididrocks: i. e. reboot, and re-run test with ADT_REBOOT_MARK set08:49
didrockspitti: will be a little bit harder as I'm rebooting inside some unittests tests (not sure what you use as a terminology for this)08:50
didrocksso basically, I have08:50
didrocksclass FooTests:08:50
didrocks    def test_1(self):08:50
didrocks       doing some stuff08:50
didrocks       reboot()08:50
didrocks       check08:50
didrockssame for def test_2(selfà…08:50
pittididrocks: yeah, I guess you can't use the simple unittest.main(), but might need to load individual classes depending on where you are in the reboot state08:50
pittididrocks: alternatively you can skip the whole class with08:50
pitti@unittest.skipUnless(os.environ.get('ADT_REBOOT_MARK') == 'stage3')08:51
meetingologypitti: Error: "unittest.skipUnless(os.environ.get('ADT_REBOOT_MARK')" is not a valid command.08:51
pittioh, shut up meetingology :)08:51
didrocksahah :)08:51
pittididrocks: or your main() needs to look like08:51
didrockspitti: I wonder if then, it's not cleanup/more effective to investigate in nsspawn?08:51
didrockss/cleanup/more clean/08:51
pittiif 'ADT_REBOOT_MARK' not in os.environ:08:52
pitti   # run initial tests/setup08:52
didrocksyeah, I see what you mean :)08:52
pittielif os.environ['ADT_REBOOT_MARK'] == 'stage1':08:52
pitti   # run stage 1 tests08:52
pittielif os.environ['ADT_REBOOT_MARK'] == 'stage2':08:52
pitti   # run stage 2 tests08:52
pittietc.08:52
pittididrocks: maybe, but I thought you wanted to have a full end-to-end test08:53
didrockspitti: actually, I'm starting to fake the dm services in the end08:53
pittididrocks: note that you can also split your test into multiple .py files, and the "master" test script just runs the right one according to the reboot mark08:53
didrockspitti: because we want to test the service (eventually created from sysvinit) state08:53
didrockspitti: not the dm scripts which are going to change08:53
didrocksyeah, the thing is that I will have ~10 of them08:54
pittididrocks: oh, I thought you wanted to install three DMs and check that they behave as expected08:56
pittii. e. end-to-end test08:56
didrockspitti: there are multiple combinations, like one systemd dm, multiple systemd dms, one init-only dm, one init + one systemd dm and different /etc/X11/d-d-m states08:57
pittididrocks: they would reflect as different test cases then? either autopkgtest tests, or unittest tests; the former takes longer but is isolated, the latter also checks that purging a DM works right and is fater08:58
pittifaster08:58
didrockspitti: I was thinking implementing them thanks to an unittest class, piloting those scenarios (to avoid code duplication between multiple tests)08:59
didrocksas 90% is just about "dropping some files, reboot, check systemd state"08:59
pittididrocks: if you don't actually install DMs, do you actually need to reboot?09:04
pittididrocks: instead of just re-running the generators and checking the results?09:04
didrockspitti: I'm checking the active unit state (as it's really what matters from systemd side), that means I need systemd to boot to that target09:05
pittididrocks: ah, ok; so reboot ladder then?09:06
pittiifelse ladder or @unittest.skipUnless09:06
didrockspitti: I can maybe systemctl isolate default.target?09:07
pittiI don't know what that does09:07
didrocksit's equivalent to systemctl default, meaning: "build the default job transaction" (as during boot) and stop everything that isn't part of it09:08
didrockshum, isolate doesn't enable to restart ssh from adt-run, that's weird…09:41
didrockspitti: I wonder if there is any magic in the way you are starting ssh from the testbed? ^09:48
pittididrocks: how do you mean?09:49
pittididrocks: unless you build-depend on it, ssh isn't even guaranteed to be installed09:49
pittididrocks: I think it is for our cloud VMs, but adt isn't using that09:49
pittierr, test-depend, not build-depend09:49
didrockspitti: I think isolate default is killing the ssh that you start up so that we can access to it with -s09:49
didrocksdaemon*09:50
pittididrocks: aah, that09:50
pittididrocks: well, then don't use ssh, use minicom or netcat (although their terms suck a lot for doing actual work)09:50
pittibut at least it should be enough to bring ssh back up09:50
didrockspitti: yeah, will do that then, not trying to restart it myself :)09:50
pittididrocks: btw, how is it easier/more efficient to run with -s and manually start the test 5 times than just using adt-run?09:51
pittididrocks: if you comment out all other tests, and perhaps build a VM with your test deps already pre-installed (so that you don't have to wait for apt for long), it seems a lot easier to just run the whole thing?09:52
pittirebooting should take 20 s or os09:52
pitti"so"09:52
didrockspitti: I already commented all other tests a long time ago :)09:52
didrockspitti: it's just to look at the FHS status isn't the one I expected09:52
didrocksif*09:53
didrocksminicom is enough anyway for that09:53
=== hikiko-lpt is now known as hikiko
willcookeurgh11:21
willcookeThat took a lot longer than I expected.11:21
willcookeOnly just got to London11:21
=== alan_g is now known as alan_g|lunch
desrtgood morning linux distribution desktop environment team chat room13:11
larsugood morning software library maintainer13:12
seb128hey desrt13:12
desrthi hi13:13
didrocksgood morning desrt!13:15
desrtseems like a slow morning :)13:17
larsudesrt: how can mardy take a ref on an unowned hash table in vala13:24
desrtcreate a non-unowned version of the variable and assign it13:25
larsuhe says that throws an error13:25
desrtthat seems curious.13:25
larsuerror: Reference transfer not supported for this  expression13:25
desrt?!13:25
larsuya...13:25
desrtthere's something else wrong there13:25
larsuprobably. He says it's no big deal, he was just wondering if we have a quick solution13:26
larsu(and I don't)13:26
desrtis he getting the generics right?13:26
desrt'show me the code'?13:26
larsudon't have it13:27
larsushould work in a return, no=?13:27
desrtshow him this as an example of something that works: http://ur1.ca/iza0d13:28
larsuok13:28
larsuthanks13:28
* desrt loves this broken telephone game :)13:28
* larsu doesn't13:28
larsudesrt: did you check whether it calls g_hash_table_ref()13:29
desrtit does13:29
desrthere's the C: http://ur1.ca/iza0o13:29
desrt(warning to children and the faint of heart: don't look)13:29
larsuerr, why?13:29
larsuit's not _that_ bas13:29
larsu*bad13:29
desrtit's pretty ugly :)13:30
larsuhm, you mean it would be cool if vala spat out code that could have been written by a human?13:30
larsuI don't see what purpose that would serve13:31
larsuother than easier debugging, mybe13:31
larsuI wonder why it needs the ref0 version13:31
desrtporting to C when you eventually get pissed off with vala :)13:31
larsuhaha. Which you will eventually13:31
mardylarsu, desrt: that worked, thanks (declaring a local HashTable)13:35
larsumardy: hm? I thought you tried that before?13:36
larsuin any case, nice that it works now :)13:36
=== alan_g|lunch is now known as alan_g
tedglarsu, desrt, can we have a "dbus_escape_string" or some such in GLib to avoid cut-and-pasting code to do it around?14:41
tedgOr worse, people rewriting it.14:42
larsutedg: yes, I've been meaning to write one for a while14:43
larsufor object paths, you mean, right?14:43
tedgYeah, just to handle the dbus naming requirements.14:45
tedgAnd the matching unescape of course.14:45
larsuyep14:45
tedgI think that I've personally written it once for GLib, once for std::string and once for QString.14:45
tedgBecause… it's so much fun…14:46
larsu\o/14:46
* tedg does it for the LOLs14:46
mardydesrt: hi! in Vala, given a Variant of type a{sv}, is there any shorter way to get a string out of it, than data.lookup_value("key", null).get_string()?14:51
desrtyes15:00
desrtyou can '.lookup_value ("key", null) as string'15:01
desrtor you can, if it is more convenient, do:15:01
desrtstring x;15:01
desrt.lookup ("key", "s", out x);15:01
desrtthere is not anything like data["key"] if that's what you mean15:02
mardydesrt: yes, I was looking for that, or at least for a way to not specify the VariantType (the GLib method accepts null there, so I hoped that there was a way to avoid passing anything at all, in Vala)15:09
desrtah.  right.15:10
desrtthe lookup ("key", "s", out  ...) thing is your best approach then15:10
desrtreturns boolean if successful (and you have a string) or false otherwise15:10
desrtthe trouble is that you don't know what type of thing might be in that dictionary, so you really do need to check it...15:11
desrt(the APIs strongly suggest the recommended convention of treating an existing-but-wrongly-typed value as if it was missing)15:12
mardyseb128: I attached a branch to bug 1382843, with an updated 06_uoa.patch which should fix the issue15:17
ubot5bug 1382843 in shotwell (Ubuntu) "uoa publishing on flickr, corrupted double-linked list error" [High,In progress] https://launchpad.net/bugs/138284315:17
mardyseb128: I tested it with Facebook, Flickr and Picasa15:17
=== CrazyMelon is now known as CrazyLemon
=== JMulholland_ is now known as JMulholland
=== Saviq_ is now known as Saviq
seb128mardy, great, thanks for looking at that one! I can upload that and take care of the SRUs ;-)16:26
sil2100Hey! Does anyone know if Didier will be around today still?16:45
willcookesil2100, I think he had an appointment this afternoon - probably wont be back until tomorrow.  Probably just email him?16:55
sil2100willcooke: hey, we had an emergency, but we were able to sort it out with the help of #webops16:56
sil2100Thanks for the info!16:56
willcookeah cool16:56
willcookeno worries sil210016:57
* willcooke -> Train18:01
=== alan_g_ is now known as alan_g|EOD
=== jhodapp_ is now known as jhodapp
Noskcajseb128, The lintian change was from lp:ubuntu/ to lp:~ubuntu-desktop/ it mustn't have been added when the bzr was most recently updated19:36
seb128Noskcaj, k19:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!