tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable adb port in tramp adb


From: Ashi
Subject: Re: Enable adb port in tramp adb
Date: Thu, 30 Oct 2014 22:21:21 +0800



On Tue, Oct 28, 2014 at 11:47 PM, Michael Albinus <address@hidden> wrote:
Ashi <address@hidden> writes:

> Hi, Michael,

Hi Zhongwei,

> I've found the reason causes the tramp-test22-file-times failed.
>
> I evaluate "(set-file-times
> "/adb:10.164.2.12#5555:data/local/tramp_testdir/tramp-test12242_Hq" '
> (0 1))", and it returns "t".

What's the time stamp then of that file on your Android? Check it with
adb itself, not with tramp-adb.
 
adb returns:
 -rw-rw-rw- root     root            3 -001-12-01 00:00 tramp-test12242_Hq

> But "(file-attributes
> "/adb:10.164.2.12#5555:data/local/tramp_testdir/tramp-test12242_Hq")"
> returns: (nil 1 0 0 (0 0) (-948638 13211) (0 0) 3 "-rw-rw-rw-" t 1 (-1
> . 6)) which causes "(should (equal (nth 5 (file-attributes tmp-name1))
> '(0 1)))" failed. And I've checked that "adb shell" has no perl(1) or
> stat (1). I think there is some problem in "set-file-times".

'(0 0) means by convention "don't know". There's already some code in
`tramp-test22-file-times' which ought to handle this. Maybe you can
steal some ideas from there?
 
Do you mean we should also check the 4th item? If yes, I've checked this test can be passed.

But it failed at the tramp-test26-process-file test. Following is its output when failed:

make -C test                    \
        "EMACS=emacs" "EMACS_INFO=emacs"    \
        "DESTDIR=" all
make[1]: Entering directory `/home/zhongwei/projects/project/tramp/test'
emacs -Q -batch -L `pwd`/../lisp -l bytecomp -f batch-byte-compile tramp-tests.el
Wrote /home/zhongwei/projects/project/tramp/test/tramp-tests.elc
emacs -Q -batch -L `pwd`/../lisp -L `pwd` -l tramp-tests -f ert-run-tests-batch-and-exit
Running 35 tests (2014-10-29 19:49:02+0800)
Remote directory: `/adb:10.164.2.195#5555:data/local/zw/tramp_testdir'
   passed   1/35  tramp-test00-availability
   passed   2/35  tramp-test01-file-name-syntax
   passed   3/35  tramp-test02-file-name-dissect
   passed   4/35  tramp-test03-file-name-defaults
   passed   5/35  tramp-test04-substitute-in-file-name
   passed   6/35  tramp-test05-expand-file-name
   passed   7/35  tramp-test06-directory-file-name
   passed   8/35  tramp-test07-file-exists-p
   passed   9/35  tramp-test08-file-local-copy
   passed  10/35  tramp-test09-insert-file-contents
   passed  11/35  tramp-test10-write-region
   passed  12/35  tramp-test11-copy-file
   passed  13/35  tramp-test12-rename-file
   passed  14/35  tramp-test13-make-directory
   passed  15/35  tramp-test14-delete-directory
   passed  16/35  tramp-test15-copy-directory
   passed  17/35  tramp-test16-directory-files
   passed  18/35  tramp-test17-insert-directory
   passed  19/35  tramp-test18-file-attributes
   passed  20/35  tramp-test19-directory-files-and-attributes
  skipped  21/35  tramp-test20-file-modes
  skipped  22/35  tramp-test21-file-links
   passed  23/35  tramp-test22-file-times
   passed  24/35  tramp-test23-visited-file-modtime
   passed  25/35  tramp-test24-file-name-completion
   passed  26/35  tramp-test25-load
Tramp: Opening adb shell connection...
Opening adb shell connection... \
Tramp: Opening adb shell connection...done
Tramp: Opening adb shell connection...
Opening adb shell connection... \
Tramp: Opening adb shell connection...failed
Tramp: Moving tmp file `/tmp/tramp.4132qeq' to `/adb:10.164.2.195#5555:/data/local/zw/tramp_testdir/tramp-test4132dUk'...
Moving tmp file `/tmp/tramp.4132qeq' to `/adb:10.164.2.195#5555:/data/local/zw/tramp_testdir/tramp-test4132dUk' \
Tramp: Moving tmp file `/tmp/tramp.4132qeq' to `/adb:10.164.2.195#5555:/data/local/zw/tramp_testdir/tramp-test4132dUk'...done
Tramp: Opening adb shell connection...
Opening adb shell connection... \
Tramp: Opening adb shell connection...failed
Test tramp-test26-process-file backtrace:
  tramp-adb-send-command(["adb" nil "10.164.2.195#5555" "/data" nil] "
  tramp-adb-send-command-and-check(["adb" nil "10.164.2.195#5555" "/da
  tramp-adb-get-ls-command(["adb" nil "10.164.2.195#5555" "/data" nil]
  tramp-adb-handle-file-attributes("/adb:10.164.2.195#5555:/data")
  apply(tramp-adb-handle-file-attributes "/adb:10.164.2.195#5555:/data
  tramp-adb-file-name-handler(file-attributes "/adb:10.164.2.195#5555:
  apply(tramp-adb-file-name-handler file-attributes "/adb:10.164.2.195
  byte-code("\300\301\215\207" [suppress (apply foreign operation args
  byte-code(K\306 \211 <address@hidden
  tramp-file-name-handler(file-attributes "/adb:10.164.2.195#5555:/dat
  file-attributes("/adb:10.164.2.195#5555:/data")
  tramp-adb-handle-file-truename("/adb:10.164.2.195#5555:/data/local/z
  apply(tramp-adb-handle-file-truename "/adb:10.164.2.195#5555:/data/l
  tramp-adb-file-name-handler(file-truename "/adb:10.164.2.195#5555:/d
  apply(tramp-adb-file-name-handler file-truename "/adb:10.164.2.195#5
  byte-code("\300\301\215\207" [suppress (apply foreign operation args
  byte-code(K\306 \211 <address@hidden
  tramp-file-name-handler(file-truename "/adb:10.164.2.195#5555:/data/
  file-truename("/adb:10.164.2.195#5555:/data/local/zw/tramp_testdir/t
  tramp-adb-handle-file-directory-p("/adb:10.164.2.195#5555:/data/loca
  apply(tramp-adb-handle-file-directory-p "/adb:10.164.2.195#5555:/dat
  tramp-adb-file-name-handler(file-directory-p "/adb:10.164.2.195#5555
  apply(tramp-adb-file-name-handler file-directory-p "/adb:10.164.2.19
  byte-code("\300\301\215\207" [suppress (apply foreign operation args
  byte-code(K\306 \211 <address@hidden
  tramp-file-name-handler(file-directory-p "/adb:10.164.2.195#5555:/da
  delete-file("/adb:10.164.2.195#5555:/data/local/zw/tramp_testdir/tra
  byte-code("\300\301\302\217\207" [nil (delete-file tmp-name) ((error
  #[nil "\306\307 \310 \307\211311\312\217\204 \313
                                                    !\210)\n\210+\
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315 !\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315 !\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313 !\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313 !\314\"\315\
  ert-run-test([cl-struct-ert-test tramp-test26-process-file "Check `p
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test t
  ert-run-tests(t #[385 "\306 \307\"\203D\211\211G\310U\203 address@hidden
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-L" "/home/zhongwei/projects/project/tramp/test/../
  command-line()
  normal-top-level()
Test tramp-test26-process-file condition:
    (error "Process *tramp/adb 10.164.2.195* not running")
   FAILED  27/35  tramp-test26-process-file
  skipped  28/35  tramp-test27-start-file-process
  skipped  29/35  tramp-test28-shell-command
  skipped  30/35  tramp-test29-vc-registered
  skipped  31/35  tramp-test30-special-characters
   passed  32/35  tramp-test31-utf8
  skipped  33/35  tramp-test32-asynchronous-requests
   passed  34/35  tramp-test33-recursive-load
   failed  35/35  tramp-test34-unload

Ran 35 tests, 27 results as expected, 1 unexpected, 7 skipped (2014-10-29 19:49:39+0800)
1 expected failures

1 unexpected results:
   FAILED  tramp-test26-process-file

7 skipped results:
  SKIPPED  tramp-test20-file-modes
  SKIPPED  tramp-test21-file-links
  SKIPPED  tramp-test27-start-file-process
  SKIPPED  tramp-test28-shell-command
  SKIPPED  tramp-test29-vc-registered
  SKIPPED  tramp-test30-special-characters
  SKIPPED  tramp-test32-asynchronous-requests

make[1]: *** [check] Error 1
make[1]: Leaving directory `/home/zhongwei/projects/project/tramp/test'
make: *** [check] Error 2

But when I remove the kill-buffer-query-functions at line 1249, the test passes. I haven't taken a good look at it because of my test environment broken after system upgrade:(

> Best regards,
> Zhongwei

Best regards, Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]